Solved
How can i restart i2s in slave mode after lost synchronization?
Posted on May 26, 2017 at 18:11
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)
#stm32f412rgt #i2s