btidey wrote:As has been mentioned in another thread there is also the interesting field called I2S_I2S_TX_DATA_NUM in the FIFO control register which can take values from 0 - 63.
I don't do anything with this at the moment and its purpose doesn't seem to be known or if it is relevant in dma mode. I'll try a few experiments to see if I can figure out what effect it has.
I think I can help with that one - in FIFO mode, this is the number of samples to transmit via the FIFO. Once you start the system it will transmit this number of samples. Whatever gets put on the FIFO will be transmitted, but if you put nothing on it then it'll transmit DATA_NUM samples of 0. If you put one value then it will be transmitted DATA_NUM times. If you put a bunch of values and stop before the end of the count then it'll keep transmitting the last value until it's done DATA_NUM.
I think the corresponding register for the receive side is I2SRXEOF_NUM
FIFO mode is most useful for displays and the like where you transmit data sporadically. DMA mode is best for continuous transmission.
**EDIT** Just looked in the i2s_reg.h file and it looks like there both TX and RX DATA_NUM register areas, so RXEOF_NUM isn't the same thing. Since it's set to the DMA buffer size when you're using DMA mode, I'm guessing it's used to count how many samples to transfer before flipping to the next buffer area, but now I'm not so sure.