![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
hello188
Joined: 02 Jun 2010 Posts: 74
|
interrupt priority and IPR1, IPR2, IPR3 SFR's |
Posted: Mon Dec 09, 2013 3:20 am |
|
|
Hi, I used compiler directive to set the interrupt priority. However, looking at the special function registers for interrupt priority, and it looks like the priorities were not reflected onto the SFR's.
for example, I wanted UART1 RX interrupt to be high priority, so I declare my ISR as HIGH like below,
Code: |
#INT_RDA HIGH
void rda1_isr(void){
...
}
|
but If I check in the watch window, 5th bit of the IPR5(RCIP) is not set to 1, but 0.
Is it compiler bug? or Am i mistaking something??
Thank you. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19360
|
|
Posted: Mon Dec 09, 2013 3:49 am |
|
|
What chip?.
What compiler version?.
You need:
#device HIGH_INTS=TRUE
before the 'high' keyword will do anything.
Be aware of the limitation with most chips, that if you are also using INT_EXT, then _this_ will also be a high priority interrupt. Hardware limitation. No IPR bit.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|