cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 I2S master receive clock problem

M_Squared
Visitor

Hi everyone,

I am working on an STM32H7A3ZI and I'm trying to to exchange audio data with an SGTL5000 audio codec. Because i want to both send and receive data from the codec i configured the I2S peripheral on the STM32 to Full-Duplex Master mode in Cube MX.

My problem:

Transmitting data using the HAL I2S functions (HAL_I2S_Transmit, or HAL_I2S_Transmit_DMA) works fine, but when i try to receive data (also using the HAL functions) the bit- and word-select-clock won't start. If i first transmit data and then try to receive everything works fine, because the clocks stay on. If i change the I2S config to Half-Duplex Master Receive mode, just receiving also starts the clocks.

So in Full-Duplex Master mode i have to transmit data first (or at least write some data into the transmit data register, which starts the clocks), before i can receive data.

My question:

This seems to be intended behavior, but i couldn't find any documentation on it. Why is this implemented like that?

0 REPLIES 0