cancel
Showing results for 
Search instead for 
Did you mean: 

Does STM32Fxxx DFU start always after reset if USB connected?

dwvcfii
Associate II
Posted on August 05, 2015 at 23:34

I'm building a system with two cards:

- a host card running a full OS

- a daughter card with a microcontroller (possibly the STM32F3xxx) running an RTOS

The goal is to have these cards send and receive data during normal operations via USB.  Thus, the USB connection will be continuously physically connected.

While researching how to update the firmware in flash on the ST part I discovered the DFU capability.  While reading AN3156, section 1, ''Bootloader Code Sequence'', I found the following statement:

''The USB enumeration is performed as soon as the USB cable is plugged (or immediately if the cable is already plugged). If you do not want the STM32 to enter the USB DFU bootloader application, the USB cable has to be unplugged before reset''.

This seems to imply that if I have a USB cable attached and I reset the device the bootloader will always enter DFU mode.  Is that correct?

If so, is there a way to externally strap the device to prevent it from going into this mode unless I explicitly pull some pin(s) high or low when I actually want to update the firmware?

#stm32f3
4 REPLIES 4
Posted on August 06, 2015 at 03:55

BOOT0 = LOW - Your code runs from FLASH

BOOT0 = HIGH - The System Loader runs from ROM

BOOT1 should be pulled LOW

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dwvcfii
Associate II
Posted on August 12, 2015 at 17:26

Another question after reading AN3156, ''Bootloader code sequence''

If Boot0 is high (run bootloader) and both USB and a USART are connected, can I choose to upload firmware via the USART interface or is the bootloader always going to expect the upload to be performed via DFU / USB?

Posted on August 12, 2015 at 18:37

The System Loader is looking for pin transitions on the interface you want it to use, and NO noise on any of the other interfaces.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dwvcfii
Associate II
Posted on August 13, 2015 at 23:04

Okay, sounds like if both interfaces are connected, the one I first communicate with is used.  I'll go with that.  Thanks!