Skip to main content
Graduate
January 15, 2025
Question

No DFU detected, usb device not recognized code 43

  • January 15, 2025
  • 2 replies
  • 4083 views

I am trying to create a custom keyboard, and I was trying to flash my board with stm32f070c6t6 MCU in DFU mode using cube programmer, but I keep getting "no DFU detected" (of course while pulling BOOT0 pin high).

Also, every time I plug my device into my PC, the error message says, "Windows has stopped this device because it has reported problems (Code43). A request for the USB device descriptor failed."

 

I am new to this field, so I am running out of ideas.

 

I put 16MHz crystal and set up 48MHz for USB, I configured the device description based on this website; https://controllerstech.com/how-to-use-stm32-as-a-keyboard/

I pulled up D+ with a 1k5 resistor, I pulled down both CC1 and CC2 with 5k1 resistors.

 

Screenshot 2025-01-16 at 3.06.15.png

I checked the voltage on the regulator and found it was totally fine (both 3v3 and 5v). I also checked the soldering and made sure that no pins were bridging.

I managed to flash the chip using STlink recently, but since this board is designed to be a keyboard, I expect the USB to work fine.

I am feeling so stuck, I have already spent like a total of 10 hours trying to figure it out, so it will be really helpful if someone tells me where I made a mistake.

Thanks.

    This topic has been closed for replies.

    2 replies

    Super User
    January 15, 2025

    From AN2606 , for F070x6 :

    AScha3_0-1736967246640.png

    ..so no 1k5 needed ! (remove it.)

     

    +

    What you want to do now ? start bootloader -> DFU mode -> flash chip ?

    or build a USB - device -> "keyboard" ?

    --- for me : not clear from your post.

    HaYa6174Author
    Graduate
    January 15, 2025

    I want to do both.

    I will try again with the resistor removed!

    Super User
    January 15, 2025

    ok..

    +

    >I want to do both.

    So for dfu/bootloader just set boot0 pin hi - thats it. Then on power up you can connect to CubeProgrammer to flash.

    But with boot0 lo, you need a program in your chip, to enable/use the USB , as you set it basically in CubeMX or IDE.

    Its not done by code generator...just the basic connection is set up, not more.

    So look for example program on github ...or else.

    Explorer II
    February 4, 2025

    I had a similar problem with our device, a STM32F7. DFU was correctly detected under Mac and Linux, but not under Windows.

    The solution we found was to replace the libusb driver with libusbK, using Zadig to perform the trick. It worked.