|
|
View previous topic :: View next topic |
Author |
Message |
ktallevi
Joined: 17 Dec 2005 Posts: 58
|
bootloader and application interrupt question |
Posted: Thu Mar 22, 2007 1:50 pm |
|
|
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
|
|
Posted: Thu Mar 22, 2007 3:41 pm |
|
|
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 |
|
|
|
|
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
|