STM32F072 DFU Bootloader/Reset Problem
- July 5, 2018
- 18 replies
- 7807 views
Hi all,
I'm having a strange problem with a design using the STM32F072V8 MCU.
MCU operates at 3.3V. We have a USB connector internal to the product, solely for programming the MCU via DFU.
I have the BOOT0 pin connected to VBUS on a USB connector through a resistor divider that means 3.3V is on the BOOT0 pin whenever USB is connected, and the BOOT0 pin is grounded when no USB is connected.
The intended procedure to access the DFU is to:
- Connect USB to host while device is unpowered
- Power up the device
We expect to enter DFU mode since the BOOT0 pin is held high before the system power is up.
Instead of entering DFU mode, I see the following in Linux dmesg:
[28936069] usb 3-13: new full-speed USB device number 49 using xhci_hcd
[28064068] usb 3-13: device descriptor read/64, error -71 [28300075] usb 3-13: device descriptor read/64, error -71 [28536067] usb 3-13: new full-speed USB device number 50 using xhci_hcd [28664084] usb 3-13: device descriptor read/64, error -71 [28900059] usb 3-13: device descriptor read/64, error -71 [28008079] usb usb3-port13: attempt power cycle [28660084] usb 3-13: new full-speed USB device number 51 using xhci_hcd [28660186] usb 3-13: Device not responding to setup address. [28868143] usb 3-13: Device not responding to setup address. [28076066] usb 3-13: device not accepting address 51, error -71 [28204078] usb 3-13: new full-speed USB device number 52 using xhci_hcd [28204178] usb 3-13: Device not responding to setup address. [28412188] usb 3-13: Device not responding to setup address. [28620100] usb 3-13: device not accepting address 52, error -71 [28620142] usb usb3-port13: unable to enumerate USB deviceIf at this point I then assert the NRST line (by shorting NRST to GND), the MCU resets and the DFU happily comes to life.
I've tried to stretch out the NRST by loading a 1uF capacitor on the NRST pin instead of the prescribed 100nF, but I still see the issue.
I've read some stuff regarding pull-ups on the DP pin of the USB, which I don't have on my design, but the datasheet and the bootloader app note both say I don't need a pull-up. Curiously though, the STM32F072-DISCO discovery board has a DP pull-up installed. I don't see any issues with entering DFU mode on the DISCO board.
Can anyone provide any hints here? I'm kinda running out of things to try.
Thanks in advance!
- Josef
#dfu-bootloader Note: this post was migrated and contained many threaded conversations, some content may be missing.