2015-08-05 02:34 PM
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? #stm32f32015-08-05 06:55 PM
BOOT0 = LOW - Your code runs from FLASH
BOOT0 = HIGH - The System Loader runs from ROMBOOT1 should be pulled LOW2015-08-12 08:26 AM
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?2015-08-12 09:37 AM
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.
2015-08-13 02:04 PM
Okay, sounds like if both interfaces are connected, the one I first communicate with is used. I'll go with that. Thanks!