This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Changing an Interrupt Vector

I have an application that uses CAPCOM Timer 0, and want to change the interrupt vector address during runtime to vector to another function. However, the CAPCOM Interrupt Vector Location is at 80h, which is in Flash. Is there any way to easily change the interrupt vector address for CAPCOM Timer 0?

Parents
  • Is there a way to move the entire interrupt table to RAM, and force the CPU to use that table?

    No, not with the C16x (ST10) family of microcontrollers. If you can't change code in flash, then I can see no way out for you. Unless you have loads of RAM and it's possible to copy the code from flash to RAM and remap RAM to replace flash, including interrupt vector table.

    - mike

Reply
  • Is there a way to move the entire interrupt table to RAM, and force the CPU to use that table?

    No, not with the C16x (ST10) family of microcontrollers. If you can't change code in flash, then I can see no way out for you. Unless you have loads of RAM and it's possible to copy the code from flash to RAM and remap RAM to replace flash, including interrupt vector table.

    - mike

Children
  • Mike

    Thanks again for the reply. Actually, I do have lots of RAM available. In fact, I have much more RAM than flash, and the RAM program is basically an update of the flash code. So I have enough RAM, and more, to duplicate all the flash code, including the interrupt table. With this configuration, is there a way to startup the whole application from a non-zero memory location which is in RAM? Thanks.

  • I don't know what particular microcontroller it is and whether the flash memory is internal or external. There is a catch: if it's internal flash memory, then there is no way to remap it at run-time (after the EINIT instruction has been executed.) If it is external flash memory, then remapping RAM in its place should be fairly straightforward.

    - mike