cancel
Showing results for 
Search instead for 
Did you mean: 

Getting continuous interrupts on USART

bipin_g
Associate

Hello Folks,

I am working on STM32F1 series controller where we receive data on usart and perform actions accordingly. Few days back ,my system was getting rebooted due to watch dog timer. After debugging the issue,it was found that when i receive some data on usart, it gets stuck in its irq handler(irq handler gets called continuously even if i am not sending any data on usart from outside) due to which main function stops executing and WDT resets the controller. It is observed that every 2 micro seconds my usart irq is called. I am unable to understand why this handler is getting called so frequently even when no data is available on RX line.

Can someone guide me to identify the issue?

 

TIA.

Bipin

3 REPLIES 3
Christophe VRIGNAUD
ST Employee

Hello @bipin_g,

You should give at least your IRQ handler code if you want to get some answer.

As far, you can search for "irq handler gets called continuously" in your browser. I've found the following links which could perhaps help.

c - USART1_IRQHandler called continuously - Stack Overflow

serial port - USART3_IRQHandler() is continuously called with LL_USART_IsActiveFlag_TXE set - Stack Overflow

Solved: Serial interrupts call USART1_IRQHandler() continu... - STMicroelectronics Community

STM32 UART Continuous Receive with Interrupt – MolesBlog (the78mole.de)

Best regards

Clear the reasons for the interrupt.

Check for RX errors, say parity, noise, framing etc and read the DR to clear them.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Karl Yamashita
Lead III

Post some relevant code. Maybe you wrote some code in the IRQ that could be causing some issues? 

Check with an oscilloscope to be sure there isn't any data/noise coming from the outside.

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.