cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to start the bootloader without replugging the USB cable?

j2399
Associate II
Posted on June 21, 2014 at 19:10

I have a STM32F105 connected over USB. In order to flash a new firmware I pull Boot0

low

high and replug the USB cable. That works.

I would like to be able to go into bootloader mode without having to replug the USB cable.

Is that possible, and how? If I hold Boot0

low

high and pull NRST low shortly, it does not work.

4 REPLIES 4
Posted on June 21, 2014 at 19:57

BOOT0 LOW is going to go into your own code, HIGH to the System Loader

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/jumping%20to%20the%20bootloader%20via%20software%20does%20not%20permit%20dfu%20mode&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&currentviews=82]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Java%2Fjumping%20to%20the%20bootloader%20via%20software%20does%20not%20permit%20dfu%20mode&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21¤tviews=82
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
j2399
Associate II
Posted on June 21, 2014 at 20:39

I have to be more precise. I do not want to switch to bootloader by software. I want to switch by hardware, but not by replugging the USB cable.

So is it possible with USB cable connected to switch to bootloader mode by connecting some pins to high or low? I know you can do it for firmware download through USART, but I need through USB. It seems to hold Boot0

low

high and pull NRST shortly low and then release Boot0 (to low) does something, but I can not download through USB.

From AN2606 5.2 Figure 7 I expected, that after reset the (still) plugged USB cable is detected and firmware download would be possible.
Posted on June 21, 2014 at 22:28

To reiterate BOOT0 being pulled low at reset will cause YOUR code in FLASH to be executed.

A typical design has an external pull down (10K ?) to ground so it runs the user programmed application. To get into the System Loader (bootloader in ROM) this pin must be driven to a HIGH level at the time of reset.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 22, 2014 at 01:50

As I recall the part has specific pin state requirements for USB connectivity. I'm not sure if there is a way to cause it to reenumerate, but seem to recall a F107 just needed a reset button to be pressed with BOOT0 High for the DfuSe loader software to find it.

How long is the reset pulse, and how are you controlling the BOOT0 pin, do you have some external latch, or are you attempting to drive it with a GPIO pin? How long is the reset pulse?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..