Timeline for Clearing USART (UART) interrupt flags in an STM32?
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 18, 2022 at 17:06 | comment | added | mrbean |
@peets - There is a way to clear the Framing Error (FE) flag. You need to call LL_USART_ClearFlag_ORE(USARTx_INSTANCE); which writes to the ICR register WRITE_REG(USARTx->ICR, USART_ICR_ORECF); . That should clear the Framing Error (FE) flag. Also, if you have Error Interrupt Enable (EIE) set, you may enter error handling code which sits forever. If you're getting framing errors check baud rate and line breaks (UART line staying low for period of time).
|
|
May 1, 2021 at 19:21 | comment | added | peets | Thanks for the good answer. BUT: I receive one character on STM32L476, no further bytes are received (no signal on oszi), but permanent receive a FE (framing error) interrupt. Cannot even clear this interrupt. Any ideas what's the reason? | |
Oct 18, 2018 at 7:27 | comment | added | bitsmack | Excellent, thank you! It looks like the function names have changed. Are you using a Standard Peripheral Library or one of the STMCube HALs? For which family of microcontrollers? | |
Oct 18, 2018 at 1:59 | comment | added | LostInCoding | I am sorry that I wrongly typed on the command,, it should be USART_GetFlagStatus() followed by USART_ReceiveData(), the original post was corrected. Thanks Bitsmack. | |
Oct 18, 2018 at 1:56 | history | edited | LostInCoding | CC BY-SA 4.0 |
added 11 characters in body
|
Oct 12, 2018 at 17:15 | review | Late answers | |||
Oct 12, 2018 at 18:01 | |||||
Oct 12, 2018 at 17:05 | comment | added | bitsmack | Thanks for your information! I don't recognize USART_GetFlat(). Can you tell me where it comes from? | |
Oct 12, 2018 at 17:04 | history | edited | LostInCoding | CC BY-SA 4.0 |
added 75 characters in body
|
Oct 12, 2018 at 17:00 | review | First posts | |||
Oct 12, 2018 at 18:08 | |||||
Oct 12, 2018 at 16:59 | history | answered | LostInCoding | CC BY-SA 4.0 |