cancel
Showing results for 
Search instead for 
Did you mean: 

Reset vector in IAP application

Barbie
Associate II
Posted on April 11, 2013 at 12:40

I have wonder about the reset vector in IAP APP>

I understand that on reset the pointer always jump to the beginning of the FLASH 0x0 or 0x08000000 and from there it take the start of the main.

But if I put one time Boot APP start on 0x08000000, and then I put my first core applicvation start on 0x08010000 what will be the address point in the reset vector.

I look on address 0x0 and no metter which program I download first it always show to the Boot program.

I can't download only the Boot and with the boot bring my APP start on 0x08010000 because there are some ID data I should write at first time which shouldn't touch by the Boot after.

I was thinking to download always first the core APP and then the Boot so there the reset vector will have allways the Boot main location.

Can it work?

Bar.

#reset-vector-with-2-app #reset-vector-in-iap
6 REPLIES 6
Barbie
Associate II
Posted on April 14, 2013 at 09:10

Is anyboady has an answer about it?

To make it clear.

1. Where is locate the place hold the jump address after hard/soft reset?

2. If I have APP start on 0x08010000 does the MCU always first jump to 0x08000000 and there found where to actuly begin my APP or it jump directly  to 0x08010000 after reset?

Bar.

Posted on April 14, 2013 at 16:19

The boot device is determined by the BOOTx pins at start up. The address/device chosen is also mapped at ZERO, for flash the base is always 0x08000000. This is a function of the hardware design.

After reset you can relocate the vector table to any 512-byte boundary address using SCB->VTOR = or NVIC_SetVectorTable()

A reset will cause the original design configuration to be used, but all other interactions with the vector table (ie interrupts) will use the VTOR value you have defined.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
alexandr
Associate II
Posted on April 14, 2013 at 23:07

double.

alexandr
Associate II
Posted on April 14, 2013 at 23:09

Correct me, if I'm wrong:

1) After the HW reset or Power ON, CPU starts from 0x8000000, that is Bootloader (BL).

2) BL check that application exists at 0x8001000, and if yes - set the new vector table with NCVIC)SetVectorTable() to 0x8001000, then jumps to  AppStart (0x8001004).

Still OK?

3) If in application I make NVIC_SystemReset() to what I jump - to AppStart or to BL start?

4) If I want to jump from App to BL, do I need to set vector table to BL, with NVIC_SetVetorTable()  to 0x8000000, before I make NVIC_SystemReset() ?

Thanks.

Posted on April 15, 2013 at 18:21

4) If I want to jump from App to BL, do I need to set vector table to BL, with NVIC_SetVetorTable()  to 0x8000000, before I make NVIC_SystemReset() ?

No, NVIC_SystemReset() will cause all that to be reset, the device will boot per BOOTx pins, which nominally means the Boot Loader will be entered via SP/PC at 0x08000000

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
alexandr
Associate II
Posted on April 15, 2013 at 18:48

Tnahks!