2022-10-12 02:10 AM
We are using STM32L071CBT6TR controller.
We are receiving data through UART based on intterupt, for that we have enabled UART_IT_RXNE intterrupt.
We have just enabled UART_IT_RXNE. But still we are getting frame error intterupt, we dont want frame error intterupt.
2022-10-12 03:17 AM
I suspect what you get is not a frame error interrupt but rather RXNE interrupt with FE flag being set. The usual solution is to use SR value anded with CR1 value for checking the interrupt flags.
2022-10-12 04:17 AM
We are using HAL_UART_IRQHandler function to decode intterupt.
As per attached image we are getting frame error intterupt(Highlighted with yellow colour).
But as per attached image we haven't enable error intterupt(circled as red colour).
So, handler will not go to clear frame error intterrupt and we are getting continuously it.
Note : if we enable error interrupt then MCU is clearing frame error interrupt and we are not getting it continuously
2022-10-16 11:33 PM
Any Update ? Or anything else ?
2022-10-17 08:05 AM
The ISR of HAL_UART_Receive_IT assumes that the error interrupt is enabled.
Because HAL_UART_Receive_IT enables this interrupt:
So, you're breaking the contract.
2022-10-17 09:47 PM
But, I have't enable intterrupt through HAL_UART_Receive_IT.