2021-11-16 03:07 AM
I initiate reception from the microcircuit for stm32h723. However, the code hangs while waiting for the RXNE flag. In the debug, step by step, you can see that the flag is set after START, but is immediately reset to zero in the next step, before checking the flag. What could be the problem?
LL_I2C_SetTransferRequest(I2C3, LL_I2C_REQUEST_READ);
LL_I2C_SetTransferSize(I2C3, 1);
LL_I2C_GenerateStartCondition(I2C3);
// Flag set and clear there. "while" always true.
while(!LL_I2C_IsActiveFlag_RXNE(I2C3));
recieveData = LL_I2C_ReceiveData8(I2C3);
LL_I2C_GenerateStopCondition(I2C3);
2021-11-16 05:21 AM
> In the debug, step by step, you can see that the flag is set after START, but is immediately reset to zero in the next step, before checking the flag. What could be the problem?
Reading RXDR in the debugger will clear the flag.