【电路笔记 TMS320C6***DSP】C6748EDMA 初始化函数 EDMA3Init(0x01C00000, 0);的实现细节

  • EDMA3主要包括EDMA3CC(通道控制器)和EDMA3TC(传输控制器),函数EDMA3Init();主要对EDMA3CC进行配置。

C6748的EDMA3 初始化:EDMA3Init(0x01C00000, 0);

  • EDMA3Init(0x01C00000, 0):配置EDMA3控制器的基本参数,如控制寄存器、通道使能等。
  • 如下如0x01C00000为EDMA3控制器的基地址,用于访问其内部寄存器
    在这里插入图片描述

EDMA3Init函数

// https://e2echina.ti.com/support/processors/f/processors-forum/185720/c6654-edma-ipr
/**
 * \file  edma.c
 *
 * \brief This file contains device abstraction layer APIs for the EDMA device.
 *        There are APIs here to enable the EDMA instance, set the required
 *        configurations for communication, transmit or receive data.
 */

/*  Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
 *  ALL RIGHTS RESERVED. */


/* Driver APIs */
#include "edma.h"

#include "hw_types.h"
#include "hw_edma3cc.h"
#include <c6x.h>

/****************************************************************************/
/*                         GLOBAL VARIABLES                                 */
/****************************************************************************/
unsigned int regionId;

/****************************************************************************/
/*                     API FUNCTION DEFINITIONS                             */
/****************************************************************************/

/**
 *  \brief   EDMA3 Initialization
 *  
 *  This function initializes the EDMA3 Driver
 *  Clears the error specific registers (EMCR/EMCRh, QEMCR, CCERRCLR) &
 *  initialize the Queue Number Registers
 *
 *  \param  baseAdd                  Memory address of the EDMA instance used.\n
 *								     EDMA3控制器的基地址,用于访问其内部寄存器
 *
 *  \param  queNum                   Event Queue Number to which the channel
 *                                   will be mapped (valid only for the
 *                                   Master Channel (DMA/QDMA) request).\n
 *                                   事件队列编号,指定哪个队列将用于映射通道(仅对主通道有效)。
 *
 *  \return None
 *
 *  \note   The regionId is the shadow region(0 or 1) used and the,
 *          Event Queue used is either (0 or 1). There are only four shadow 
 *          regions and only two event Queues
 */
void EDMA3Init(unsigned int baseAdd,
           unsigned int queNum)
{
   
   
    unsigned int count = 0;
    unsigned int i = 0;
    
#ifdef _TMS320C6X
    /* For DSP, regionId is assigned here and used globally in the driver */
    regionId = (unsigned int)1u;
#
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值