2013-04-11 03:40 AM
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-iap2013-04-14 12:10 AM
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.2013-04-14 07:19 AM
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.2013-04-14 02:07 PM
double.
2013-04-14 02:09 PM
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.2013-04-15 09:21 AM
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 0x080000002013-04-15 09:48 AM
Tnahks!