I2S Full Duplex with STM32F301
Hello,
I try to use I2S in full duplex mode master with DMA but it doesn't work as expected.
The I2S is configured in 24 bits @32Khz.
DMA TX and RX are configured in half-word circular mode.
I can send data manually but if I loop the input to the output using software, nothing comes out even though there is data on PB4.
DMAs are started with :
HAL_I2S_Transmit_DMA(&hi2s3, I2S_DAC_Buffer, 2);
HAL_I2S_Receive_DMA( &hi2s3, I2S_ADC_Buffer, 2);
I used the function HAL_I2S_TxCpltCallback(I2S_HandleTypeDef *hi2s) in main.c like this :
void HAL_I2S_TxCpltCallback(I2S_HandleTypeDef *hi2s)
{
I2S_DAC_Buffer[0] = I2S_ADC_Buffer[0];
I2S_DAC_Buffer[1] = I2S_ADC_Buffer[1];
I2S_DAC_Buffer[2] = I2S_ADC_Buffer[2];
I2S_DAC_Buffer[3] = I2S_ADC_Buffer[3];
}
I checked by flashing an LED, the callback function is called as it should.
Why doesn't it work?
I can provide other parts of the code if needed.
