Skip to main content
Visitor II
September 30, 2020
Solved

Bootloader troubleshooting

  • September 30, 2020
  • 3 replies
  • 2194 views

Hello. I'm using an STM32F3, and am struggling to get the bootloader working on my custom board. It works on the F3 discovery board (If you remove SB19 and wire up a pull-high).

Steps: Plug USB port into PC. Boot1 is confirmed to be set high in MCU software. Pull Boot0 to +3V3 using a 10K PU. Cycle power or reset. What should happen: MCU doesn't boot normal program. PC (eg Windows) Device manager should show `STM32Bootloader`, and DFU-util can be used to flash. This is what happens on the discovery.

On my board, it boots up as normal, and Windows can't see the bootloader.

Additional data: I can confirm there's a working HSE, and the data lines work. And something weird: When I use a scope, Boot0 is reading low with the 10KPU... It only goes high if I wire it directly to a 3V3 line. (This is only on my board; dev board shows normal). This is very odd, and implies the MCU is pulling Boot0 low... which I don't think it should do.

Thank you.

    This topic has been closed for replies.
    Best answer by TDK

    If BOOT0 is low despite a 10kOhm pullup, and the chip is under reset (NRST low), there's a hardware issue somewhere. I'd sort that out before you tackle debugging the bootloader. Check resistance between BOOT0 and ground. It should be well over 10kOhm. Possibly a solder bridge or similar short somewhere.

    > I can confirm there's a working HSE, and the data lines work.

    How do you know this? You're able to load and run programs okay, just not boot to the bootloader?

    3 replies

    TDKAnswer
    Super User
    September 30, 2020

    If BOOT0 is low despite a 10kOhm pullup, and the chip is under reset (NRST low), there's a hardware issue somewhere. I'd sort that out before you tackle debugging the bootloader. Check resistance between BOOT0 and ground. It should be well over 10kOhm. Possibly a solder bridge or similar short somewhere.

    > I can confirm there's a working HSE, and the data lines work.

    How do you know this? You're able to load and run programs okay, just not boot to the bootloader?

    DOCon.1Author
    Visitor II
    September 30, 2020

    The boot0 reading low issue is weird. I've read boot0 is read only... It's like that on several revisions of my board, and I can't find an obvious hardware problem that would lead to it. I'll check the resistance. It's wired through a button, so I can try removing the button and seeing what the deal is. Of note, when I pull it high without a resistor, the device doesn't do its normal activity (Which is expected), but doesn't show as a bootloader.

    I know the HSE/data lines work because I can communicate with the computer using USB-Serial.

    Does the Boot1 bit persist when no power's applied? It's set when I load a program to check on both dev, and my boards.

    DOCon.1Author
    Visitor II
    September 30, 2020

    Solved! This was indeed something with the pulling low. I removed the button, and it now works! Due to me not understanding how 4-pin buttons work.