In the EDMA API documentation it states "For an example to configure the loop mode, see the SAI module driver."
The SAI peripheral driver, does not show anything related to DMA as far as I can see. I'm 7 days deep on trying to get this thing up and running with no luck including following settings from AN4520 & AN4800. I've also followed the initialization sequence outlined in the EDSPI example for K22, and no luck.
It continually dumps in to default handler, despite the fact that I've included "fsl_edma_irq.c" and "fsl_sai_irq.c" - I posted an example of one initialization under this thread (Trying to work through SAI with DMA on Kinetis K22.) , and have tried many permutations in order to try to get this up and running. The k22 tower example is difficult to follow because it incorporates the soundcard API, something not available to those using k22 with an external codec. An example specifically written for this device, or using the API in this manner would be ideal at this point. Even a simple initialization sequence description using the SAI API with DMA, so that I could then troubleshoot from would be nice.
At some point someone had to have tested this configuration so I can't see why this wouldn't be readily available.
totally agree, I also need this information
Also, if you're using in stereo it might be interesting to see what is affected in terms of values.
Hi, Donald!
may be i don't understand what You want to say in this post, perhaps this is an incorrect translation? I read your posts about SAI before you write a comment, but i have a slightly different problem.
I try to read WAV file from Flash and send data to external DAC (CS4350) via SAI interface on my FRDM-K64f. Because i can't get any data from codec i can't use "SAI_demo" from SDK example or from Here's an example for using SAI w/EDMA without the SND API (K22).
I search for information how to use SAI in SDK , like "typical usage" in Codewarrior...
Oleg.
What I was telling you is there is no example, mine is the closest thing you're going to get.
1)If you're reading a wave file, you don't need to get data from the Codec, you need to get data TO the codec.
2)You should be able to use any settings I used, change them to transmit, but unfortunately you have to dissect the K64 Tower example to see how they buffer a wavefile into the TX Fifo.
I verified all of my settings by removing the abstraction from the SND API to see how they use a codec with the SAI, you probably need to do the same.
Hi All,
The sai demo in C:\Freescale\KSDK_1.1.0\demos\sai_demo is a loop configuration example for sai module, but this demo uses soundcard driver instead which integrates SAI driver and eDMA driver together, so I think maybe the statement should be "For an example to configure the loop mode, see the sai_demo." I will report this to KSDK team. XinyuChen
Sorry for the confusion that has caused.
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
You don't even want to see the answers I was given in the post I originally posted, however here is some information I created about how I got it up and running.
Here's an example for using SAI w/EDMA without the SND API (K22).