2015-06-22 02:36 PM
I have a F4 chip that calls , The function initiates a system reset request to reset the MCU.
__STATIC_INLINE void NVIC_SystemReset(void){
__DSB(); /* Ensure all outstanding memory accesses included
buffered write are completed before reset */
SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) |
(SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) |
SCB_AIRCR_SYSRESETREQ_Msk); /* Keep priority group unchanged */
__DSB(); /* Ensure completion of memory access */
while(1); /* wait until reset */
} with MEMRM = 0. - should map Flash to 0x0000, thus rebooting into my App. However, the ST bootloader is called at (0 +4) = 0x1fff5163 (stbootloader). This then trashes the SRAM value that is placed there to provide information to the App for the reason there was a reset. The STbootloader is using the SRAM as scratch pad. My app is called by the STbloader but the RAM is now full of left overs. Is my re-maping correct or am I missing something else. (BOOT0 is pulled low). thanks in advance, Garry.
2015-06-22 09:23 PM
I would expect the mapping to be irrelevant, the state of BOOT0 and BOOT1 are controlling, and are latched by the signal generated on NRST
2015-06-23 12:28 PM
Thanks for the fast reply Clive,
We couldn't fault the hardware, BootPins etc or the code, so we lifted the chip. And it is all good. Don't know why it missed behaved. ESD maybe but the usual precautions are in place and used. 4Days for debugging on this. Learned a lot about how to control the booting and mapping to addr 0x000.. and a lot from the forum entries, mainly by yourself. Thanks again, Garry.