cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple interrupts

jephua
Associate II
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?

2 REPLIES 2
chen
Associate II
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
Associate II
Posted on October 17, 2014 at 13:19