2014-06-21 10:10 AM
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 Boot0low
high and pull NRST low shortly, it does not work.2014-06-21 10:57 AM
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¤tviews=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=822014-06-21 11:39 AM
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.2014-06-21 01:28 PM
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.2014-06-21 04:50 PM
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?