cancel
Showing results for 
Search instead for 
Did you mean: 

Hi i am Roberto, For my project i need to update the firmware from USB port so i need to use internal bootloader. The MCU is contained into a close box so i can't set BOOT0 pin manually. Do you have any idea ?

RCola.2
Associate II

My idea is that:I want to put a resistor and a capacitor on BOOT0 pin.

When normal code is running and i will go to update the firmware, i will send a command to USB. When MCU will receive this command, MCU will set BOOT0 pin to high state and charge the capacitor. After that MCU will runs an autoreset command.

Could be it works?

How much time BOOT0 pin must be stay high for entering in boot mode?

Thank you for all.

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief II

Your Idea BOOT0 capacitor may work only for combined pins with PIO. But if you can control this with prepared code, then this is complication. More simple is jump from code directly into bootloader , when you need it.

Second choice is when you use USB only for update, then connect VBUS to BOOT0 over R...

View solution in original post

7 REPLIES 7
AScha.3
Chief III

if you can power off/on the thing, could use my way:

boot0 pin has pulldown to gnd. ok, and resistor to 5v usb pin.

so when usb is plugged in at power up, bootloader starting...

if not , normal start. if connect usb later, can use it by program normal,

because bootloader check is only some clocks after reset/power up.

If you feel a post has answered your question, please click "Accept as Solution".
MM..1
Chief II

Your Idea BOOT0 capacitor may work only for combined pins with PIO. But if you can control this with prepared code, then this is complication. More simple is jump from code directly into bootloader , when you need it.

Second choice is when you use USB only for update, then connect VBUS to BOOT0 over R...

Which STM32 ?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Stm32F207

Oh is possibile jump to bootloader directly? How?

thank you for your reply.

It’s a nice way !

thank you!