AnsweredAssumed Answered

['F446 Cube/documentation] SAIxy_CR1.CKSTR

Question asked by waclawek.jan on Jan 3, 2018
Latest reply on Jun 13, 2018 by waclawek.jan

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;
  { /* Receive */
    hsai->Init.ClockStrobing     = SAI_CLOCKSTROBING_RISINGEDGE;


So, either the code in Cube, or the description in RM, is wrong.


Which one is it?