Skip to main content
Visitor II
October 18, 2024
Question

Getting continuous interrupts on USART

  • October 18, 2024
  • 3 replies
  • 1024 views

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

    This topic has been closed for replies.

    3 replies

    ST Employee
    October 18, 2024

    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

    Graduate II
    October 18, 2024

    Clear the reasons for the interrupt.

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

    Graduate II
    October 18, 2024

    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.