Hi, I am trying to use K64f120 (on FRDM K64f board) microcontroller to receive/send audio data to an audio CODEC. I used Processor Expert to generate the code for this component and it failed to run the code properly and all the time it is going through the loop of "saiCom1_TxCallback" although I did not start to send the data yet.
I set K64f120 is in slave mode and the CODEC is the master and I can see the data output from the CODEC data pin and also the correct frame clock and bit clock signal feeding to the K64f120 related pins. My question: is there any one have made it work in this way? Thanks.
KDS 3.0.0, KSDK 1.3.0, OS BareMetal
Hello Feibiao,
I widely recommend you to take a look into the soundcard device that is included in the Kinetis SDK 1.3.0, this is found in the path C:\Freescale\KSDK_1.3.0\platform\composite\src\soundcard, it uses the SAI driver to control the CODEC SGTL5000. It is an excellent example driver to build a new one.
Please let me know if this is useful, otherwise we can look for an alternative.
Best regards,
Earl Ramírez.
Thanks, Earl
The example is helpful. But I also would like to know is there any one who can generate the I2S (or SAI) module code with the Processor Expert successfully? I just cannot make it work. The PE makes life much easier and it helps to sort out the interrupt handlers as well.
Thanks again.
Feibiao
Hello Feibiao,
Perhaps the configuration in PEx is missing something, I recommend you to compare the code generated by PEx with the soundcard code to detect a potential difference which should be reflected in the PEx configurations.
\ER.
Thanks, Earl.
I am trying to check out that.
Feibiao