AnsweredAssumed Answered

SAI I2S blocking kl17, EDMA vs DMA

Question asked by Jacob Jennings on Apr 28, 2016
Latest reply on May 12, 2016 by Jacob Jennings

Hello,

 

I have a few questions surrounding the attached simple example project transmitting I2S data against an MKL17Z256VFM4. First, is it possible to transmit continuously without delay using a circular ping pong DMA buffer without using 2 DMA channels? Does that require EDMA (not on MKL17)? Why doesn't the __asm("bkpt #0") breakpoint in main ever trigger (why does SAI_DRV_SendDataDma block?)

 

This looks good…

Capture1.PNG

 

zoomed out - not so good:

Capture2.PNG

 

It looks like I could create a ping pong buffer using 2 dma channels per RX and 2 channels per TX like the sample code from is there any demo code for using I2S? , but I'm going to need all 4 dma channels on the MKL17 for my application (1 for SAI/I2S tx, 1 for SAI/I2S rx, 1 for FlexIO/TDM tx, 1 for FlexIO/TDM rx).

 

Edit: To clarify my application, I need to:

- Implement a 4-channel TDM driver using FlexIO

- Forward 2 (L,R) incoming I2S channels to outgoing TDM

- Forward 3 (L, R, Mic) incoming TDM channels to two outgoing I2S channels (one SAI, one FlexIO)

- No processing, just conversion between digital audio standards

 

I'm interested in the viability of this on an MKL17.

 

Thanks,

Jake Jennings

Original Attachment has been moved to: test-sai-i2s-dma.zip

Outcomes