cancel
Showing results for 
Search instead for 
Did you mean: 

USB DFU not working on bare metal stm32. Not showing the MCU via usb

NBurc
Associate II

0690X000006DtnNQAS.pngHi,

I can not get DFU to work in the schematic shown.

I am attempting to enter DFU mode but I can't see any devices in Win 7.

I don't know if this is a USB issue or DFU mode issue.

I would appreciate any help.

Best

Nick

14 REPLIES 14
Mon2
Senior III

My suggestion,

1) Order one of these kits by ST which is fitted with the same CPU as you are using:

https://www.st.com/en/evaluation-tools/nucleo-f042k6.html

Also, a USB connector break out board:

https://www.adafruit.com/product/1833

  • could be any brand but we have used this one without issues for our DFU USB testing in the past

Arrow is awesome for such low cost boards and parts with free shipping across USA / Canada.

https://www.arrow.com/en/products/1833/adafruit-industries

https://www.arrow.com/en/products/nucleo-f042k6/stmicroelectronics

2) Using fly wiring, connect this USB connector onto PA11 / PA12 as you have done for your custom PCB.

3) Proceed to test the DFU USB boot loader once again by strapping BOOT0 HIGH and pulsing #RST.

Does that work for you?

Perhaps the CPU is blown or shorted and/or lacking power connections for some reason on your custom board so suggesting the above.

Otherwise, seek a priest for an exorcism of this project...

0690X000006DvKQQA0.png

Post back once you have tested with a known good board using the suggestions above.

Mon2
Senior III

@NBurc​ , what is the history of:

a) this CPU? was it sourced new and from a reliable vendor?

b) how was it soldered onto the PCB? by hand or through automated and qualified equipment and process?

c) is the CPU getting warm or hot to the touch?

d) is the CPU blank or has some code already in the flash?

You may be facing the same quirk as here:

https://community.st.com/s/question/0D50X0000ARQLq2SQH/has-anyone-gotten-the-boot0-pin-to-work-on-an-stm32g071

Does it need a crystal clock source?

Does USB work from a user application?​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Mon2
Senior III

I think we have one of these kits in the lab. Will try to review this asap and post back.

NBurc
Associate II

Hi,

Thanks to all for your suggestions.

I have bought Nucleo f042K6 kit and at the same time checked the PCBs. It so happens that the issue was that a BEAD L13 was replaced with same Cap as C46.

It might be a BOM issue or prototype assembly.

Regardless I got the device to work.

A thing I learned:

BOOT0 high does not seem necessary to enter DFU mode.

However I have an issue where I can not leave DFU mode in the DfuseDemo program whatsoever and switching BOOT0 to low doesn't seem to turn off DFU mode (when full powercycling)

Currently I am working on switching it off within code on load but I am yet to find a way of how to do this.