Hello, I am using IAR with an RT1050 SDK, version 2.3.0 (2017-11-16). Is there a way to make scatter gather eDMA transaction self-perpetuating, i.e. they require no software intervention to keep the transactions running indefinitely?
I have been working with the SDK scatter gather example and they appear to always stop after the last TCD even when linking appears to be set up correctly in the last TCD. There are some hints in the reference manual and API code that suggest this is expected behavior then other still suggest it is not.
Here is a comment in the API documentation that suggests this might not be possible:
For the last two continuous ISRs in a scatter/gather process, they both load
the last TCD (The last ISR does not load a new TCD) from the memory pool to the
eDMA engine when major loop completes. Therefore, ensure that the header and
tcdUsed updated are identical for them. tcdUsed are both 0 in this case as no
TCD to be loaded.
Lets try this another way. Below is the eDMA setup from the RT105x SDK scatter gather example. Could someone please point out the changes necessary to turn this into a self-perpetuating transfer, i.e. once TCD is complete it should re-trigger TCD, forever without SW intervention once set up.
EDMA_GetDefaultConfig(&userConfig); EDMA_Init(EXAMPLE_DMA, &userConfig); EDMA_CreateHandle(&g_EDMA_Handle, EXAMPLE_DMA, 0); EDMA_SetCallback(&g_EDMA_Handle, EDMA_Callback, NULL); EDMA_ResetChannel(g_EDMA_Handle.base, g_EDMA_Handle.channel); EDMA_InstallTCDMemory(&g_EDMA_Handle, tcdMemoryPoolPtr, TCD_QUEUE_SIZE); /* Configure and submit transfer structure 1 */ EDMA_PrepareTransfer(&transferConfig, srcAddr, sizeof(srcAddr), destAddr, sizeof(destAddr), sizeof(srcAddr), sizeof(srcAddr) * HALF_BUFFER_LENGTH, kEDMA_MemoryToMemory); EDMA_SubmitTransfer(&g_EDMA_Handle, &transferConfig); /* Configure and submit transfer structure 2 */ EDMA_PrepareTransfer(&transferConfig, &srcAddr, sizeof(srcAddr), &destAddr, sizeof(destAddr), sizeof(srcAddr), sizeof(srcAddr) * HALF_BUFFER_LENGTH, kEDMA_MemoryToMemory); EDMA_SubmitTransfer(&g_EDMA_Handle, &transferConfig); EDMA_StartTransfer(&g_EDMA_Handle);
I have tried using the API EDMA_TcdSetChannelLink and it does appear to correctly set MAJORELINK and MAJORLINKCH but no re-triggering occurs. On a whim, I have also tried forcing ESG on the last block without results.
Hello Yuri, yes I have read these sections and tried again and again. The problem is when a person is new to a processor and processor family they lack the context and "tribal knowledge" they need to assimilate the often obscure and voluminous documentation. In order to get past these issues they look to the NXP forum moderators and community for insight and clarification and perhaps a simple example.
There is little to no point at all in having a forum when the standard response is almost invariably "read the manual". Please see this post for some more feedback in this regard.
Have You followed recommendations of sections 220.127.116.11 (Dynamic channel linking)
and 18.104.22.168 (Dynamic scatter/gather) in i.MX RT1050 Processor Reference Manual,
Rev. 0, 10/2017 ?
Have a great day,
Note: If this post answers your question, please click the Correct Answer
button. Thank you!