Question
Use I2S in DMA mode(STM32f401 + PCM5102A)
I want to send audiodata from STM32f401 MCU to PCM5102A audio codec through I2S interface. Here are my settings in CubeMX:


Code I used is:
const uint16_t wavedata[] = { /* Random data, length 1024 */ };
void beep_blocking()
{
HAL_I2S_Transmit(&hi2s2, wavedata, sizeof(wavedata)/sizeof(wavedata[0]), HAL_MAX_DELAY);
}
void beep_dma()
{
//__HAL_DMA_ENABLE(&hdma_spi2_tx); // No difference
HAL_I2S_Transmit_DMA(&hi2s2, wavedata, sizeof(wavedata)/sizeof(wavedata[0]));
}When I use beep_blocking() function - everything is ok and I hear small peace of noise. But when I use beep_dma() function - nothing happens. What I am doing wrong?
P.S. I do not want to use this as "beep" actually, I want to send data continuously. This is just a test.