View previous topic :: View next topic |
Author |
Message |
rikotech8
Joined: 10 Dec 2011 Posts: 376 Location: Sofiq,Bulgariq
|
Interrupting interruption. |
Posted: Mon Nov 26, 2012 6:41 am |
|
|
Is that possible one interuption (for example #INT_RDA) to interrupt another (for example #INT_RB)? In other words, If an interrupt is active, could it be interrupted? |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Mon Nov 26, 2012 9:16 am |
|
|
Yes and No. First we have to know which model PROCESSOR. Some have High
Priority Interrupts, some do not... _________________ Google and Forum Search are some of your best tools!!!!
Last edited by dyeatman on Mon Nov 26, 2012 9:17 am; edited 1 time in total |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Mon Nov 26, 2012 9:16 am |
|
|
PIC16 no.
PIC18, if you enable 'HIGH_INTS=TRUE' in #device, then you can flag individual interrupt handlers as high priority. A high priority handler can then interrupt a low priority one.
If HIGH_INTS is enabled, INT_EXT,_is always a high priority handler_. So in the example you give, INT_RDA can interrupt INT_RB, but could not interrupt INT_EXT. This is a feature of the hardware - nothing you can do about it.....
PIC24, yes.
Generally though, provided you exit handlers quickly, it is not needed. As soon as you exit one handler, the next will be called. The flag is remembered.
Key though is that you must get out of handlers quickly.....
Best |
|
|
|