2021-08-12 12:54 AM
I am having problems receiving data through the USART port. It enters the interrupt well but when it enters the HAL_UART_Receive function the program is blocked in the UART_WaitOnFlagUntilTimeout function.
As I understand it, this works, it waits until the RXNE bit is set to zero, but it is set to zero as soon as we enter the HAL_UART_Receive function.
I attach images so that you can see how my project code is, if someone can give me some advice whether I am doing it wrong or it is necessary to change something I would be very grateful.
2021-08-12 04:46 AM
Don't seem to understand how interrupts work.
Don't use the blocking function, use the HAL_UART_ReceiveIT() externally, and manage the fill content of the array in the callback.
2021-08-12 05:57 AM
Look at examples in CubeMX to understand the correct way to call things.