2025-06-22 11:21 PM
Hi ST Community,
I'm encountering an issue using the following function in STM32Cube HAL v1.11.3:
In this version, I observed that the callback registration depends on huart->RxState:
However, RxState is not in the HAL_UART_STATE_READY state at the time of registration, which causes the callback not to be assigned—leading to broken UART behavior.
In contrast, previous versions (e.g., v1.11.0) checked gState, which allowed this registration to work as expected.
Questions:
Why was RxState chosen for the condition in v1.11.3 instead of gState?
What is the recommended workaround or best practice to ensure the callback can be registered successfully in this new version?
Appreciate your guidance on this.
Best regards,
Isaac
2025-06-23 5:53 AM
1+2) The callback should be set prior to starting communication. Otherwise you have a race condition.