Hi
I have a problem with the relocation of vector table with s12xdt. I have introduced a bootloader to a existing code and then I wanted to relocate my innterrupt vectors to be able to change these with the bootloader.
This is what I have done:
IVBR = 0xEE => Vectors is starting at 0xFFAE00'L
......
timer0Isr, /*8 Vtimch0 */
unusedIsr, /*7 Vrti */
isrIrq, /*6 Virq */
isrXIrq, /*5 Vxirq */
unusedIsr, /*4 Vswi */
unusedIsr, /*3 Vtrap */
unusedIsr, /*2 Vcop */
unusedIsr /*1 Vclkmon */
};
For some reason the compiler adds 0x00 between the addresses? but not on the first one?
Were are they coming from? I have checked the addresses that are written and they are ok, but when executing the code as soon as Enable Interrupts is set mcu escapes to 0x3800...
Have someone solved this problem or been in contact with this??? Am I doing something wrong???
Best regards
Micke
Solved! Go to Solution.
Hello
All interrupt function are supposed to be allocated in NON_BANKED memory.
So you need to define your vector table as an array of near function pointers.
typedef void (*near _PFunc)(void);
CrasyCat
Hello
All interrupt function are supposed to be allocated in NON_BANKED memory.
So you need to define your vector table as an array of near function pointers.
typedef void (*near _PFunc)(void);
CrasyCat
Thanks