Getting continuous interrupts on USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-18 4: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
- Labels:
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-18 5: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-18 5:36 AM
Clear the reasons for the interrupt.
Check for RX errors, say parity, noise, framing etc and read the DR to clear them.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-18 1: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.
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
