AnsweredAssumed Answered

How can i restart i2s in slave mode after lost synchronization?

Question asked by Leo Novlev on May 26, 2017
Latest reply on May 29, 2017 by Leo Novlev

I'm use STM32F412RGT. IDE is IAR.

 

if(__HAL_I2S_GET_FLAG(&hi2s3, I2S_FLAG_FRE) && __HAL_I2S_GET_FLAG(&hi2s3, I2S_FLAG_CHSIDE))
{
__HAL_I2S_DISABLE(&hi2s3);
while(HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_4) != GPIO_PIN_SET)//WS
{
asm("nop;");
}
uint32_t tmpreg = hi2s3.Instance->SR;
__HAL_I2S_ENABLE(&hi2s3);
}

After executing this code, I again get a Frame error flag (FRE)

Outcomes