2024-10-18 04:41 AM
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
2024-10-18 05:23 AM
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
Solved: Serial interrupts call USART1_IRQHandler() continu... - STMicroelectronics Community
STM32 UART Continuous Receive with Interrupt – MolesBlog (the78mole.de)
Best regards
2024-10-18 05:36 AM
Clear the reasons for the interrupt.
Check for RX errors, say parity, noise, framing etc and read the DR to clear them.
2024-10-18 01:09 PM
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.