cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F405 doesn't want to enter DFU mode using USB typeC.

Taras_Burko
Associate II

Congratulations. I have such a problem. I've made 1000 PCB prototypes and 30% don't want to enter DFU mode. If you try to turn the PCB back on multiple times, the part will go into DFU.I'm using a USB Type-C connector, could that be the problem? Also tried changing the USB cable, but that didn't fix the problem.I use a microcontroller STM32F405RGT6TR.

What can this be related to?

1 ACCEPTED SOLUTION

Accepted Solutions

Dear @Taras_Burko ,

It is indeed a strange behavior.  can you try this 

How to optimize STM32 MCUs internal RC oscillator accuracy  

STOne32_0-1729235125616.png

Try to connect via SWD/JTAG and program a simple program , then measure the HSI frequency that should be at 16MHz - you can output on MCO pin and send us the waveforms.   

Thank you

STOne-32.

View solution in original post

12 REPLIES 12
STOne-32
ST Employee

Dear @Taras_Burko ,

 

Here are my thoughts :

1) remove the two 22 Ohm serial resistances R14 and R16 and replace by a 0Ohm .

2) Can you show the HSE Crystal and reference . Try to put a crystal with 8MHz or 4MHz on the failing parts and let us know if it improve the behavior .

Hope it helps you .

STOne-32

I replaced the resistors with 0 ohms. HSE Crystal stands at 8 mhz.Nothing has changed. The microcontroller refuses to enter DFU.

You need to try to connect the USB cable 10-30 times, and then you can enter DFU mode. If I go into DFU and download the firmware the microcontroller works fine and always connects to the PC via USB and runs the PC program. But does not want to enter DFU mode using the button. I checked the button, it works fine. That is, there is a problem of entering DFU mode using the button.

Dear @Taras_Burko ,

It is indeed a strange behavior.  can you try this 

How to optimize STM32 MCUs internal RC oscillator accuracy  

STOne32_0-1729235125616.png

Try to connect via SWD/JTAG and program a simple program , then measure the HSI frequency that should be at 16MHz - you can output on MCO pin and send us the waveforms.   

Thank you

STOne-32.

I can do it, but I haven't fully figured out how to output the frequency to the MC0 pin

 

The pin name is MCO: master clock output (not MC0). Please look in the documentation.

I don't understand. Do I need to enable the HSI frequency output on the MCO in the firmware? Is HSI frequency output on MCO by default?

Yes HSI is the default source on the MCO1 mux. But it should be enabled on the pin. In the firmware, or by writing to the pin config registers in debugger. 

 

I noticed one more thing. On the tupe c iphone cable, it works better. But there are still some prototypes that refuse to go into DFU. I tried to measure the frequency of those prototypes that did not transition, or did not transition well into DFU. I am downloading a photo from an oscilloscope, each photo is the frequency of a separate microcontroller.