Mask vs disable interrupts

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mask vs disable interrupts

1,766 Views
zorandjokic
Contributor II

I am working with LPC2378. I would like to mask (not disable) timer interrupt (10ms) during few instructions and than to unmusk it, so if timer interrupt happens during execution of those instructions, CPU would enter timer int. routine, after being unmasked.

Could it be done with this ARM device ? The same question regarding UARTs.

Thanks

Tags (2)
0 Kudos
Reply
2 Replies

1,389 Views
zorandjokic
Contributor II

A little test that I've made can be described with next pseudocode lines:

--- Init UART0 and define int. routine ---
VICSWPrioMask &= ~(1<< VICVectPriority6); //mask
--- wait for (devel. board) key press ---
VICSWPrioMask |= (1<< VICVectPriority6); //unmask
while(1){}

After CPU RESET, processor is waiting for key to be pressed. Using terminal
program, I've sent single character from PC, after which I pressed the key.
When processor passes "unmask" part of code it branches to interrupt routine.


Regards

0 Kudos
Reply

1,389 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Zoran Djokic,

Thank you for your interest in NXP Semiconductor products and 
for the opportunity to serve you.
1) Could it be done with this ARM device ?
ARM7 architecture doesn't seem to support to suspend the masked interrupt, then execute it after be unmasked.
Hope this is clear.

Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply