CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

interrupt priority and IPR1, IPR2, IPR3 SFR's

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hello188



Joined: 02 Jun 2010
Posts: 74

View user's profile Send private message

interrupt priority and IPR1, IPR2, IPR3 SFR's
PostPosted: Mon Dec 09, 2013 3:20 am     Reply with quote

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.
Ttelmah



Joined: 11 Mar 2010
Posts: 19360

View user's profile Send private message

PostPosted: Mon Dec 09, 2013 3:49 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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