cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 UART Error Handling

vikingtrav
Associate
Posted on April 11, 2015 at 22:09

I am working on a project that requires communication over UART. I am trying to get to the minimum time between UART messages coming in or going out that is possible. My problem is that sometimes the module gets into HAL_UART_BUSY_RX mode when it shouldn't have. I am assuming that this is because of interrupts getting triggered at exactly the wrong times. I need to find a way to clear this state and everything else that i need to clear so I can start normal operation again. I have tried simply setting the state back to ready, but as expected it doesn't work. I assume that there is more i have to change before I can resume normal operation.

#stm32 #stm32f4 #uart #stm32f407
2 REPLIES 2
gustavo23
Associate II
Posted on April 12, 2015 at 02:30

Are you using the Interrupt method? where you receive by issuing a HAL_UART_Receive_IT?

I think the state remains as HAL_UART_STATE_BUSY_RX, until the buffer is full and the interrupt callback is called. I might be wrong, but that is what I am seeing.

childresss
Associate II
Posted on April 12, 2015 at 06:25

yes. HAL has no conventional ring buffer UART receive ISR.