We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello all, Why is it that the boot code and the application code cannot share the same ISRs? I had a look at previously posted threads in the forum but I couldn't find a technical explanation. Can you? Thanks in advance, CactusBlip
For starters: because it must be possible to change the boot loader and the application independently from each other --- otherwise there would be no point making them separate entities.
A boot loader can't know beforehand what the application might need to do in which interrupt service handler. The application cannot generally restrict itself to those (few) ISRs the boot loader may use.
This offers two main possibilities:
1) to redirect interrupt invocations either into the boot loader or into the application, depending on which of them is running.
2) A boot loader that uses no interrupts at all
Just add another possibility that is available on the XC16x devices (and others) concerns the ability to change the base address of the interrupt vector table (via a SFR). This allows for a completely independent vector table between the two code sets, application and boot. It still requires the boot code to change the entry before running the application code and serves to reduce the interrupt latency of running shared code in the ISR or implementing a double jump table.
Thanks a lot !