Skip to main content
Visitor II
May 11, 2022
Question

Why is the bootloader of STM32F072RB moving PB12 Pin? it's not mendioned in AN2606.

  • May 11, 2022
  • 2 replies
  • 866 views

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?

    This topic has been closed for replies.

    2 replies

    Super User
    May 11, 2022

    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

    Graduate II
    May 11, 2022

    Probably blind writes into a register.

    Perhaps find a secondary entry point into the loader, past where it initializes the RCC/GPIO