2022-05-11 05:56 AM
I'm working on a custom board with an STM32F072RB as microcontroller.
I'm testing the firmware update via USB and I found that as soon as I jump to the internal bootloader (address 0x1FFFC800) the CPU goes down.
Looking at the enables I found that the PB12 pin is going down, unfortunately this pin is connected to the main power enable.
I thought that this pin wasn't used by the bootloader since it's not mentioned in AN2606 document.
Is this correct?
Can I prevent the bootloader to move this pin?
2022-05-11 06:54 AM
Bootloader assumes that GPIO are in the reset state, thus it may change them to the same state as they are after reset (i.e. most of them as Input in 'F0).
You may need to use an external pullup or latched circuit or any other measure for this ocassion. Other option is to write your own bootloader, which would then behave exactly as you need.
JW
2022-05-11 08:24 AM
Probably blind writes into a register.
Perhaps find a secondary entry point into the loader, past where it initializes the RCC/GPIO