Mask vs disable interrupts

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Mask vs disable interrupts

2,410 次查看
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

标记 (2)
0 项奖励
回复
2 回复数

2,033 次查看
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 项奖励
回复

2,033 次查看
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 项奖励
回复