This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: 关于EDMA3 LLD的配置问题

Part Number: AM5728

  

/**
 * \brief   EDMA3 Initialization
 *
 * This function initializes the EDMA3 Resource Manager for the given EDMA3 controller
 * and opens a EDMA3 RM instance. It internally calls EDMA3_RM_create() and
 * EDMA3_RM_open(), in that order.
 *
 * It also registers interrupt handlers for various EDMA3 interrupts like 
 * transfer completion or error interrupts.
 *
 *  \param  edma3Id 	[IN]		EDMA3 Controller Instance Id (Hardware
 *									instance id, starting from 0)
 *  \param  errorCode 	[IN/OUT]	Error code while opening RM instance
 *  \return EDMA3_RM_Handle: If successfully opened, the API will return the
 *                            associated RM's instance handle.
 */
EDMA3_RM_Handle edma3init (uint32_t edma3Id, EDMA3_RM_Result *errorCode);

typedef enum
{
CSL_XBAR_DMA_CPU_ID_SYSTEM_DMA,
CSL_XBAR_DMA_CPU_ID_EDMA,
CSL_XBAR_DMA_CPU_ID_DSP1_DMA,
CSL_XBAR_DMA_CPU_ID_DSP2_DMA
} CSL_XbarDmaCpuId;

    我有多个外设需要用到EDMA,使用EDMA3 LLD库,遇到一些问题,希望TI工程师可以答疑。

    问题1:edma3init() 函数的第一个参数 edma3Id,应该如何配置?是否按照  Table 16-125. EDMA_TPCC_PID 里的instance id配置,还是与 CSL_XbarDmaCpuId enum一致?

    问题2:若多个外设都需要使用EDMA,每个外设都需要执行一次edma3init()吗?即EDMA3_RM_Handle是否是共用的?