Skip to main content
Visitor II
March 29, 2024
Question

interrupt are miss or not ?

  • March 29, 2024
  • 3 replies
  • 1302 views

Hello STM32 community,

I am currently working on a project utilizing the STM32H757 microcontroller, which boasts 8 UART interfaces. In my application, I have configured all UARTs to operate in interrupt mode for receiving data.

My concern arises when multiple UART RX interrupts occur simultaneously. Specifically, if four RX interrupts are triggered at the same time, I would like to ensure that none of these interrupts are missed ?

please give answer

 

 

 

khodifad lalit

    This topic has been closed for replies.

    3 replies

    Graduate II
    March 29, 2024

    Missed how?

    The NVIC will keep forcing service until the source is cleared.

    Service will be in priority order, and usually best not to preempt. Service quickly, and do heavy processing elsewhere.

    Would suggest tracking overflow/underflow situations to understand if failing to keep up. Consider if DMA use would be appropriate. 

    Super User
    March 29, 2024

    As Tesla D. wrote, the NVIC and UARTS themselves ensure UART interrupts will not be "miss". But the received data can be lost unless the program reads it in time. Additional measures to avoid RX data loss:

    * Use DMA instead of interrupts, this eliminates the interrupt latency issues.

    * If still using interrupts, enable the FIFO of the UARTs.

     

    Technical Moderator
    April 2, 2024

    Hello @Pavel A. 

    You can manage the interrupt priorities among all UART instances by setting the NVIC priorities. Please see the instruction below as an example. 

     

    HAL_NVIC_SetPriority(UART4_IRQn, 0, 0);

      

    If your question is answered, please close this topic by clicking "Accept as Solution".

    Super User
    April 2, 2024

    @Saket_Om  thank you

    * Properly assigning interrupt priorities of the UARTs can help too, but not as efficiently as DMA.