Question
['F446 Cube/documentation] SAIxy_CR1.CKSTR
Posted on January 03, 2018 at 22:43

For I2S, data are latched on the falling edge of CK (for the transmitter) and are read on the rising
edge (for the receiver). That, according to CKSTR's description above, means to set CKSTR=1 for both transmitter and receiver.However, [STM32Cube_FW_F4_V1.18.0]\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_sai.c has this to say in HAL_StatusTypeDef SAI_InitI2S():
/* Compute ClockStrobing according AudioMode */
if((hsai->Init.AudioMode == SAI_MODEMASTER_TX) || (hsai->Init.AudioMode == SAI_MODESLAVE_TX)) { /* Transmit */ hsai->Init.ClockStrobing = SAI_CLOCKSTROBING_FALLINGEDGE; } else { /* Receive */ hsai->Init.ClockStrobing = SAI_CLOCKSTROBING_RISINGEDGE; }So, either the code in Cube, or the description in RM, is wrong.
Which one is it?
JW