cancel
Showing results for 
Search instead for 
Did you mean: 

Bootloader selection. How is DFU boot detected?

MSipo
Senior II

Bootloader selection. How is DFU boot detected? In AN2606 there is a Figure 68 that has an if-statement (USB cable detected). How is this done? What does it look for.

I have connected PA11 (USB DM line) and PA12 (USB DP line) to other functions. I want my MCU to boot into USART1 bootloader but I can't make the MCU to do that. I suspect it could boot inte DFU.

1 REPLY 1
TDK
Guru

This is spelled out in a bit more detail in AN3156. If the host enumerates the USB device, it'll jump into the DFU code. Which will basically always happen if the USB cable is connected to a functioning USB host. You'll need to disconnect the cable (or at least the data lines) if you want to use the UART bootloader.

Once the system memory boot mode is entered and the STM32 microcontroller (based on

on Arm®(a) cores) has been configured (for more details refer to AN2606), the bootloader

code configures the USB and its interrupts, and waits for the “enumeration done�? interrupt.

The USB enumeration is performed as soon as the USB cable is plugged (or immediately if

the cable is already plugged). If the user does not want the STM32 to enter the USB DFU

bootloader application, the USB cable has to be unplugged before reset.

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