I have another question to the DMA.
When using the Channel API mode Non-transactional (API functions) with checkbox Channel link initialization, Enable transfer configuration and Initialize transfer enabled the following lines of code will be included in peripherals.c:
/* DMA channel linking initialization */
EDMA_SetChannelLink(DMA0_DMA_BASEADDR, DMA0_CH0_DMA_CHANNEL, kEDMA_MinorLink, DMA0_CH1_DMA_CHANNEL);
/* DMA0 transfer initialization */
EDMA_SetTransferConfig(DMA0_DMA_BASEADDR, DMA0_CH0_DMA_CHANNEL, &DMA0_CH0_transfer_config, NULL);
First function will set the ELINK and channel bits in CITER and BITER registers.
The second function will set up the transfer but overwrite the complete CITER and BITER settings for the channel link
// FROM FILE fsl_edma.c function EDMA_TcdSetTransferConfig
/* Current major iteration count */
tcd->CITER = (uint16_t)config->majorLoopCounts;
/* Starting major iteration count */
tcd->BITER = (uint16_t)config->majorLoopCounts;
Is the Channel API mode Non-transactional (API functions) not meant to be used with channel linking?
If yes it should be greyed out.
I think a possible workaround would be to to first set up the Transfer configuration and then call SetChannelLink (swap the above function calls in peripherals.c).
I have attached the MEX file to this post.
Solved! Go to Solution.
Thank you for your feedback, as you mentioned, there might be problem with function order call. I will check all the API functions and prepare the update of the component.