cancel
Showing results for 
Search instead for 
Did you mean: 

No DFU detected, usb device not recognized code 43

HaYa6174
Associate

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.

4 REPLIES 4
AScha.3
Chief III

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.

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

I want to do both.

I will try again with the resistor removed!

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.

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

So, I tried to test with the resistor removed, but it did not work...
Still, even though the boot0 pin is pulled high, the cube programmer says "no DFU target", and when I plug in my device to the PC, I get "USB device not recognized".

 

What should I do?