Skip to main content
AKrup
Associate III
November 11, 2018
Question

Trying to get Nucleo-F042K6 into DFU mode

  • November 11, 2018
  • 5 replies
  • 1267 views

I'm developing an application for the F042 series chips. I'm using Nucleo-F042K6 for development.

I want to allow users to flush firmware using DFU mode. I am unclear on how to force the device into the DFU bootloader. Some material I read suggests that the board is wired so that I only need to connect USB to PA10, PA11, VIN and GND and it goes into bootloader. Other sources suggest I need a 1.5k pullup on PA11. I must be missing something very simple. With just the USB connections, nothing happens when I plug USB in. With a pullup to DM, the host attempts enumeration, but gets no response from the chip.

On a Linux host, this the output from dmesg:

[945270.896795] usb 1-9: new full-speed USB device number 84 using xhci_hcd
[945271.024788] usb 1-9: device descriptor read/64, error -71
[945271.260797] usb 1-9: device descriptor read/64, error -71
[945271.496748] usb 1-9: new full-speed USB device number 85 using xhci_hcd
[945271.624734] usb 1-9: device descriptor read/64, error -71
[945271.860727] usb 1-9: device descriptor read/64, error -71
[945271.968716] usb usb1-port9: attempt power cycle
[945272.620662] usb 1-9: new full-speed USB device number 86 using xhci_hcd
[945272.620891] usb 1-9: Device not responding to setup address.
[945272.828796] usb 1-9: Device not responding to setup address.
[945273.036615] usb 1-9: device not accepting address 86, error -71
[945273.164584] usb 1-9: new full-speed USB device number 87 using xhci_hcd
[945273.164776] usb 1-9: Device not responding to setup address.
[945273.372685] usb 1-9: Device not responding to setup address.
[945273.580574] usb 1-9: device not accepting address 87, error -71
[945273.580671] usb usb1-port9: unable to enumerate USB device

This topic has been closed for replies.

5 replies

Tesla DeLorean
Guru
November 11, 2018

Make sure PA10/PA11 don't conflict with anything else. AN2606 related to F4, or F402 specifically should be reasonably clear about pull-up, and state of BOOT0 pins. BOOT0 needs to be HIGH.

Review the manual/schematic.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
AKrup
AKrupAuthor
Associate III
November 11, 2018

Ah! Yes. BOOT0 is pulled to ground through a 10k resistor. That's what I've been missing. So oo I need a switch on BOOT0, or can I wire to VDD permanently? In my use case, users would only connect to USB for firmware upgrades.

AKrup
AKrupAuthor
Associate III
November 11, 2018

Thank you, Clive. You ARE "that guy!"

I rewired BOOT0 high and now USB enumerates properly without any pullups.

AKrup
AKrupAuthor
Associate III
November 11, 2018

I can't spell. The chip is F042, not F402. I've edited the question to show correct designation.