Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Hello!
I want to use three EDMA3 channels. I use the following codes to request the channels.
// EDMA variables EDMA3_DRV_Handle hEDMA; EDMA3_DRV_Result EDMA_Result = EDMA3_DRV_SOK; uint32_t EDMA_ID = 0; EDMA3_DRV_PaRAMRegs EDMA_PaRAM_1 = {0,0,0,0,0,0,0,0,0,0,0,0}; EDMA3_DRV_PaRAMRegs EDMA_PaRAM_2 = {0,0,0,0,0,0,0,0,0,0,0,0}; EDMA3_DRV_PaRAMRegs EDMA_PaRAM_3 = {0,0,0,0,0,0,0,0,0,0,0,0}; // Initialisation EDMA hEDMA = edma3init(EDMA_ID, &EDMA_Result); // Request a Channel 1 from Resource Manager uint32_t EDMA_TCC_1 = EDMA3_DRV_TCC_ANY; // Transfer complete code (TCC) uint32_t EDMA_chID_1 = EDMA3_DRV_DMA_CHANNEL_ANY; // Channel ID EDMA_Result = EDMA3_DRV_requestChannel (hEDMA, &EDMA_chID_1, &EDMA_TCC_1, (EDMA3_RM_EventQueue)0, NULL, NULL); if (EDMA_Result == EDMA3_DRV_SOK) { printf("DMA channel %d request successful.\n", EDMA_chID_1); } else { printf("DMA channel %d request failed with code #%d!\n", EDMA_chID_1, EDMA_Result); } // Request a Channel 2 from Resource Manager uint32_t EDMA_TCC_2 = EDMA3_DRV_TCC_ANY; // Transfer complete code (TCC) uint32_t EDMA_chID_2 = EDMA3_DRV_DMA_CHANNEL_ANY; // Channel ID EDMA_Result = EDMA3_DRV_requestChannel (hEDMA, &EDMA_chID_2, &EDMA_TCC_2, (EDMA3_RM_EventQueue)0, NULL, NULL); if (EDMA_Result == EDMA3_DRV_SOK) { printf("DMA channel %d request successful.\n", EDMA_chID_2); } else { printf("DMA channel %d request failed with code #%d!\n", EDMA_chID_2, EDMA_Result); } // Request a Channel 3 from Resource Manager uint32_t EDMA_TCC_3 = EDMA3_DRV_TCC_ANY; // Transfer complete code (TCC) uint32_t EDMA_chID_3 = EDMA3_DRV_DMA_CHANNEL_ANY; // Channel ID EDMA_Result = EDMA3_DRV_requestChannel (hEDMA, &EDMA_chID_3, &EDMA_TCC_3, (EDMA3_RM_EventQueue)0, NULL, NULL); if (EDMA_Result == EDMA3_DRV_SOK) { printf("DMA channel %d request successful.\n", EDMA_chID_3); } else { printf("DMA channel %d request failed with code #%d!\n", EDMA_chID_3, EDMA_Result); }
Only two channels are allocated (chID_1 and chID_2), the third channel (chID3) have the error -132(EDMA3_DRV_E_DMA_CHANNEL_UNAVAIL).
DMA channel 0 request successful. DMA channel 1 request successful. DMA channel 1002 request failed with code #-132!
I am using:
- CCSv7.3
- Processor SDK RTOS v04.02.00
- Compiler TI v8.1.4
- EDMA3 LLD v 2.12.5.
How to request three EDMA3 channels?