|
|||||||||||
Technical Support Support Resources
Product Information |
C166: Share Interrupt Vector With BootloaderInformation in this article applies to:
QUESTIONI have implemented a bootloader that contains an interrupt handler for the vector address 0x20. However, the downloaded application also needs an interrupt service routine for the vector address 0x20. How can I share interrupt vectors so that I have a separate interrupt function in the bootloader and in the downloaded application? ANSWERThe following assembler program allows you to redirect an interrupt vector. When the bit boot is set, the interrupt function irq (which is part of your boot loader) is executed. When a boot is clear, the interrupt vector is redirected to 0x20020. All other interrupt vectors are redirected to a vector table at address 0x20000.
The bootloader may be implemented in C. Here is an example:
Note: You need to use the C166 Compiler Version 5.04 since it allows using the CACHED attribute even for non XC16x targets. The CACHED attribute disables the generation of an interrupt vector which is supplied in this example by an assembler module. You may download a complete application example from the attachment to this Knowledgebase Article. SEE ALSOATTACHED FILESRequest the files attached to this knowledgebase article. Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.