cancel
Showing results for 
Search instead for 
Did you mean: 

NVIC_SystemReset() hangs after disabling BFB2.

YKuo.1
Associate II

Hi,

I'm using STM32F429 on a product. I'm doing a device firmware upgrade using the BFB2 feature. The exact steps I'm doing are:

  1. Boot from Bank1 or Bank2
  2. Erase the inactive Bank
  3. Write new FW to the inactive Bank
  4. Toggle BFB2
  5. Soft reset (NVIC_SystemReset())

I noticed when I'm booting from Bank2 and writing the new FW to Bank1, the MCU hangs on soft reset.

This only happens from Bank2 switch to Bank1. From Bank1 to Bank2, the MCU resets itself when I do HAL_FLASH_OB_Launch(). So I don't need to do NVIC_SystemReset().

I have to manually reset the MCU (pull NRST to low) to boot into the new FW. Alternatively, if I connect the MCU via an ST-Link and hit "Run", it would also work. I have external pull-up on the NRST pin, and pull-downs on Boot0/Boot1 pins.

Any suggestions?

Thanks,

0693W00000aHNR8QAO.png

0 REPLIES 0