Skip to main content
jephua
Associate III
October 17, 2014
Question

Multiple interrupts

  • October 17, 2014
  • 2 replies
  • 622 views
Posted on October 17, 2014 at 12:32

Hello, would like to ask if say using interrupts to read from STM32 ADC and there is an external UART device that is read using uart interrupt also on STM32, would there be a case whereby the processing will be stuck in say the ADC interrupt if it occurs faster than the uart interrupt?

    This topic has been closed for replies.

    2 replies

    chen
    Associate II
    October 17, 2014
    Posted on October 17, 2014 at 13:01

    ''would there be a case whereby the processing will be stuck in say the ADC interrupt if it occurs faster than the uart interrupt?''

    That would depend on the ISR code for both IRQs.

    Both MUST be written so that they do not block (ie no loops without a timeout).

    ISR must be written to run quickly (minimal code).

    IRQs must be set up with appropriate priority levels.

    ISR code should be written in a way that they can be interrupted by higher priority ISRs or MUST block all IRQs/ISRs in critical sections.

    jephua
    jephuaAuthor
    Associate III
    October 17, 2014
    Posted on October 17, 2014 at 13:19