Below is a code snippet used to start a transmission on the i2s module using dma.
My question is if i need to use these 3 commands within the i2s dma interrupt every time i start a new i2s/dma transmission.
The problem is that when the dma interrupt occurs, the i2s transmitter still remains sending data, because of the fifo memory that is configured, in this case, with 64 positions.
Code: Select all
// i2s dma interrupt
I2S0.conf.tx_start = 0; // Check if need to do this sequence at the end of the transmission within the dma interrupt.
I2S0.conf.tx_reset = 1; // The problem is that when the dma interrupt occurs, the i2s transmitter still remains
I2S0.conf.tx_reset = 0; // sending data, because of the fifo memory that is configured, in this case, with 64 positions.
Code: Select all
static inline void i2s_dma_trans_start_interrupt( uint32_t addr )
{
I2S0.out_link.addr = addr;
I2S0.out_link.start = 1;
I2S0.fifo_conf.dscr_en = 1; // Enable I2S DMA mode. Disable fifo mode.
I2S0.fifo_conf.dscr_en = 1;
I2S0.conf.tx_start = 1;
}
Thank's for the help.