We are trying to build an application for SAI DMA with 8Khz sampling frequency and 16 bits per sample.
We are working with the example project "sai_dma_demo" project in the location Freescale_MQX_4_1\mqx\examples\sai_dma_demo.
We were able to see the transmit working fine
Also we noted that in the Shell_play function the "sai:" device is being opened with the open type as "NULL"
/* Open audio device and set it up */
if ((device_ptr = fopen(argv, NULL)) == NULL)
printf(" Error: Unable to open a device \"%s\".\n", argv);
We are observing a frequency of approximately 8Khz for frame sync while we are trying to send the data.
But for the receive path that is in the Shell_record function it is opened with open type as "r"
/* Prepare device */
if ((device_ptr = fopen(argv, "r")) == NULL)
printf(" Error: Unable to open device \"%s\".\n", argv);
We are observing a frequency of approximately 120Khz for frame sync while we are trying to receive the data.
Note: I have disabled the sgtl500 codec configurations. As I need to interface K60 with my DSP. I just need to write/read data from DSP.
Due to this we are not able to receive any data from the other DSP device over the I2S port.
Please help us resolving this problem. Please suggest any changes that I need to do in the example code to receive at a sample frequency of 8KHz.
We also used the I2S_demo sample application. Even it showed the same behavior.