Associate III
July 6, 2023
Solved
SMT32G030 UART interrupt is triggered as soon as I enable the UART interrupt
- July 6, 2023
- 6 replies
- 4690 views
Hi,
I developed an application using the STM32G030 having UART working with interrupts. The UART initialization is done by the STM32CubeMX (attached). In addition, I have added code to enable the RXNE and Error interrupts using the LL functions "LL_USART_EnableIT_RXNE_RXFNE(USART1)" and "LL_USART_EnableIT_ERROR(USART1)". Everything works fine except that as soon as the UART is enabled, the CMF, RXNE and FE flags are set and an interrupt is generated (since I have previously enabled the RXNE and Error interrupts).
Is there any reason why the CMF, RXNE and FE flags are set as soon as the UART peripheral is enabled?
Thanks