UART Transmission Complete (TC) interrupt generated event if UART is disabled - STM32H7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-07-30 1:30 AM - edited 2024-07-30 9:37 AM
If you enable Transmission Complete (TC) interrupt flag TCIE in the UART_CR1 register before enabling UART itself, the interrupt will still be be generated.
It is not possible to clear TC flag using USART_ICR TCCF in such state. The interrupt handler will be invoked infinitely, unless interrupt is disabled back in the CR1 register.
Steps to reproduce:
1. Write USART_CR1=0x20000048; Uart is disabled here (UE=0).
2. Enable UARTx_IRQ in NVIC; At this point interrupt handler will be invoked.
3. Inside Interrupt Handler, Try to reset TC flag by writing USART_ICR=0x40; It will fail. TC flag will stay active, application will hang because interrupt handler will be called infinitely.
- Labels:
-
Bug-report
-
Interrupt
-
STM32H7 Series
-
UART-USART
