cancel
Showing results for 
Search instead for 
Did you mean: 

Usage of PRIMASK vs pending interrupts

justin239955_st
Associate III
Posted on July 02, 2013 at 20:57

In a project I have a periodic interrupt (5ms) that misses a beat from time to time (1-2min).

I have an os that will globally disable interrupts (set primask to 1) for very short time then re-enable them. I suspect it to be the source of my problem even though i'm not 100% yet.

I expected that when an interrupt happens while the primask is set, it would go in pending state then get serviced when the primask is cleared. It seems that this is not the case. The programming manual (PM0056) section 4.3.2 says that when a pending interrupt is enabled, it will trigger.

I'm a little confused about the terminology in that document. An interrupt can be ''active'' (4.3.6), ''enabled'' (4.3.2), ''pending'' (4.3.4). It can also be blocked by PRIMASK which prevent ''activation''.

Anybody can help with that matter?

Thanks for your time.

Justin

#stm32-interrupts-primask
1 REPLY 1
justin239955_st
Associate III
Posted on July 02, 2013 at 22:24

I'm sorry, please ignore the above question.

The interrupt always happen.