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 CCS Technical Support

bootloader and application interrupt question

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



Joined: 17 Dec 2005
Posts: 58

View user's profile Send private message

bootloader and application interrupt question
PostPosted: Thu Mar 22, 2007 1:50 pm     Reply with quote

Just to clarify an issue... is it possible to have seperate interrupts for both the bootloader and application?

example, using #int_rda { } to behave one way for the bootloader, but behave an entirely different way during the normal application?

much like other people on here, the whole #build, #org, interrupt thing is driving me nuts!



thanks
Ttelmah
Guest







PostPosted: Thu Mar 22, 2007 3:41 pm     Reply with quote

There is only one (pair for the 18 chips) hardware interrupt.
You use interrupts in the main code, by having an interrupt 'driver' present in the bootloader, which vectors the call, to the real handler in the main code.
You can have this driver, make the vector decision, based on the state of the bootloader. Hence it looks at a flag', and decides to call 'bootloader' handlers, or 'main' handlers based on this. Remember though that making such a decision, will add extra overhead to the time involved in handling the event.
In the 'main', you define interrupts as normal, but use the #build directive, to place them at the location the bootloader's handler jumps to (the second number in the #build).
In the bootloader, you must only really define the #global interrupt event, since it is the single actual interrupt entry point, that needs to be re-vectored. This implies that _you_ will need to include the code to decide what device ctually interrupted, and call the local routines based on this, after the 'vector' decision.

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