AnsweredAssumed Answered

Kinetis relocated vector table program counter

Question asked by William Deshaies on Sep 14, 2015
Latest reply on Feb 24, 2017 by vignesh balaji

Hi there,

 

I'm using a TRK-KEA128 evalboard and I have made a bootloader. Usually on S08/S12 family of microcontroller, I use the reset vector to start my application since this vector is not redirected. I was planning to do the same with the program counter with the Kinetis, but I don't know if a reset will cause the micro to restart directly at the application instead of the bootloader.

 

Ex:

Boot vector table

/* Interrupt vector table */

__attribute__ ((section (".isr_vector_boot"))) const tVectorTable __vect_table =

{ (uint32_t *) 0x1FFFF400,           // 0x00 0x00000000 -  Initial Stack Pointer

        {

        //        ISR name                         num    address     source

                (typ_ISRfunc) EntryPoint_Boot, // 0x01 0x00000004 -  Initial Program Counter

...

Appl vector table

/* Interrupt vector table */

__attribute__ ((section (".isr_vector_appl"))) const tVectorTable __vect_table =

{ (uint32_t *) 0x1FFFF400,           // 0x00 0x00004000 -  Initial Stack Pointer

        {

        //        ISR name                         num    address     source

                (typ_ISRfunc) EntryPoint_Appl, // 0x01 0x00004004 -  Initial Program Counter

...

I will than jump to address written in 0x00004004 when in boot to go to the application and than redirect the vector table.

 

My question, if I do that, when a reset occur, do the micro will restart in the boot or the appl?

 

Thanks

Outcomes