Hi, thank you so much for your reply,
Yes, I will connect an SD reader to the SPI interface.
I have been looking for a easier way to do it, and I found the example "sai_interrupt_transfer", that does not use DMA but I can start with interrupts that are easier and then switch to DMA.
Then in the main() function, after initializing everything, the buffer is filled here:
/* xfer structure */
temp = (uint32_t)music;
xfer.data = (uint8_t *)temp;
xfer.dataSize = MUSIC_LEN;
SAI_TransferSendNonBlocking(DEMO_SAI, &txHandle, &xfer);
/* Wait until finished */
The audio data is an array called music, ok, compiled and uploaded, and it is a simple sine wave that works perfect, now to start with something, I took an audio file and converted to a C header file with an array(as the music) and it makes strange noises, like saturated with a lot White Noise, I am now trying to solve that, but the problem is, when I call SAI_TransferSendNonBlocking(), it will start playing it, but what if I want to pause the sound? How can I stop it? I have thought of sending a "ZeroBuffer" so it won't play nothing audible, but when I set it to play again, how can I recover the last playing state?
Thank you so much