Dear all I am using Timer0 and external interrupt 0. Timer0 of having 10ms. External interrupt ISR required 50ms to compltet its task, so that I am not getting exactly 10ms interrupt of Timer0.
I also use IENABLE and IDISABLE as told in sample code examples.but still i am not getting result. I am working on LPC2378 and using "REAL VIEW MDK-ARM Ver 3.20"
Regards SS T. Pune India
you are attacking the problem from the wrong direction. 50[ms] as the execution time of an ISR is way too long. you are not waiting in that ISR, are you...?
Actualy i just giving an example. I want to know how to handle nested interrupts.Means How can timer0 will interrupt the ISR routine of ext0 interrupt?
regards SS T.
Actualy i just giving an example.
but you indicated a real problem, then said that you tried the supplied macros to no avail. so what's up? note that most problem can and should be solved without nested interrupts - which could introduce challenges that are not always evident (stack space violations for example).
Here is Ext0 ISR
void EXT0_ISR (void) __irq { EXTINT = 0x01;
IENABLE; TransmitChar0('E');
Timer1Delay(50); // delay for 50ms sec
TransmitChar0('I'); TransmitChar0('N'); TransmitChar0('T');
IDISABLE; VICVectAddr = 0; }
And Timer0 is 10ms. After putting IENABLE & IDISABLE. processor stop working.
I think first u need to disable interrupts when u enter ISR, and enable back when u getting out of that... anyway also with the defination of your IENABLE and IDISABLE macro make sure that u enable and disable ONLY current interrupt and remaining interrupts are open.
I think first u need to disable interrupts when u enter ISR
No. That is the default behavior.
View all questions in Keil forum