Hi Matthias,
I reviewed your code, seems you didn't use EDMA_DRV_Init() and EDMA_DRV_RequestChannel() in the init stage, but per SDK API RM, the eDMA driver should be initialized as below:
To use the DMA driver, follow these steps:
1. Initialize the DMA module: EDMA_DRV_Init().
2. Request a DMA channel: EDMA_DRV_RequestChannel().
3. Configure the TCD:
• Configure the TCD chain in a scatter-gather list. UART transmit/receive is the common case.
• Configure the TCD chain in a loop way. Audio playback/Record is the common case.
• Configure software TCD and push it to registers. Use the DSPI case to configure and push the
TCD to registers.
4. Register callback function: EDMA_DRV_InstallCallback.
5. Start the DMA channel: EDMA_DRV_StartChannel.
6. [OPTION] Stop the DMA channel: EDMA_DRV_StopChannel.
7. Free the DMA channel: EDMA_DRV_ReleaseChannel.
and to interface with an audio codec, we recommend you using sound card driver instead, which also supports SAI+eDMA, you may refer to the sai_demo(C:\Freescale\KSDK_1.1.0\demos\sai_demo) and sound card driver(C:\Freescale\KSDK_1.1.0\platform\composite\src\soundcard) for more details.
Hope that helps,
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------