|
|
View previous topic :: View next topic |
Author |
Message |
Franck26
Joined: 29 Dec 2007 Posts: 122 Location: Ireland
|
Disable Global Interrupt |
Posted: Fri Mar 14, 2008 3:15 am |
|
|
Hello everybody,
I was wondering:
If I Disable the global interrupt for a while and if some interrupts event append during this time, am I going to have these interrupt event when I will enable the global interrupt?
Example:
- enable global interrupt,
- Enable Timer0 overflow interrupt,
- Prog is running,
- Disable global interrupt,
- Prog is running,
- Timer0 overflow append.
- Prog is running,
- Enable global interrupt,
- Am I going to have a Tmer0 overflow interrupt immediately here?
- Prog running.
Thanks for your help. |
|
|
Ttelmah Guest
|
|
Posted: Fri Mar 14, 2008 4:21 am |
|
|
Basically, yes.
The interrupt dispatcher is called, if the following conditions are all met:
1) Global interrupt enable is true.
2) Individual interrupt enable is true.
3) Corresponding individual interrupt flag is set.
When you set '1', if the other two things are already true, the interrupt will be called.
The flags latch, so if you don't want interrupts that have occured in the interim to be called, you need to clear the corresponding interrupt bit (clear_interrupts). Beware also though, that some flags (INT_RDE for example), are also dependant on a further hardware event (the buffer containing a character), so this itself needs to be cleared, or the flag will remain set.
Best Wishes |
|
|
Franck26
Joined: 29 Dec 2007 Posts: 122 Location: Ireland
|
|
Posted: Fri Mar 14, 2008 5:24 am |
|
|
Hi Ttelmah,
Thanks for your answer, it's what I wanted to know.
Franck. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|