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

Interrupts not working w/ new interrupt and reset vectors

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



Joined: 29 Oct 2008
Posts: 8
Location: Irvine, CA

View user's profile Send private message AIM Address

Interrupts not working w/ new interrupt and reset vectors
PostPosted: Mon Jan 12, 2009 11:56 am     Reply with quote

I'm using a PIC18F2480. I enabled the CAN Rx interrupts in order to receive messages as soon as they arrive (somewhat different from CCS's sample code). The interrupts work great. However, when i move the reset and interrupt vectors to different addresses in order to accommodate for my bootloader, the interrupts stop working. I don't even think they're enabled. The PIC does not reset nor stop functioning. Everything works great except for the interrupts. Is there anything I missed when shifting the reset and interrupt vectors to a different address space?

Thanks!
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Jan 12, 2009 1:27 pm     Reply with quote

The key here is the type of bootloader and how it works.

For example, the bootloaders I use are high memory bootloaders. Except for the initial reset vector, these bootloaders do not load any code into low memory and therefore there is no need to remap interrupt vectors. In fact, if you did remap the vectors, my bootloaders would have no way of knowing how to link the real interrupt vectors to the remapped vectors.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jan 12, 2009 1:52 pm     Reply with quote

Also see ckielstra's comments on high vs. low memory bootloaders:
http://www.ccsinfo.com/forum/viewtopic.php?t=32558
johnjohn7188



Joined: 29 Oct 2008
Posts: 8
Location: Irvine, CA

View user's profile Send private message AIM Address

PostPosted: Mon Jan 12, 2009 2:21 pm     Reply with quote

Thanks for the responses!

I read ckielstra's comments, but he does not mention the interrupt vectors not working after relocating them. He states that more memory is used/wasted, though, which is not really too big of a concern to me.

So it seems that the interrupts should be working correctly even w/ the interrupt vectors relocated to a different memory range.

Any other ideas why interrupts aren't working correctly? Thanks!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jan 12, 2009 3:38 pm     Reply with quote

Post a short test program so we can look at it. Make it as small as
possible. Put in only the lines that are necessary to show the problem.
But also, it must be compilable (with #include, #fuses, #use delay, main).

Post your compiler version.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Jan 12, 2009 4:15 pm     Reply with quote

johnjohn7188 wrote:
Thanks for the responses!

I read ckielstra's comments, but he does not mention the interrupt vectors not working after relocating them. He states that more memory is used/wasted, though, which is not really too big of a concern to me.

So it seems that the interrupts should be working correctly even w/ the interrupt vectors relocated to a different memory range.

Any other ideas why interrupts aren't working correctly? Thanks!


How are you telling the bootloader that the vectors are remapped and did you even need to remap them?
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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