cancel
Showing results for 
Search instead for 
Did you mean: 

DFU over USB not working - HSE not detected?

Martin Pesek
Associate III

Hello all, I am currently unable to solve this issue:

I use STM32F401RET6 with USB functionality (COM port). USB works just fine when in normal runtime, but I am unable to reach the DFU.

I think that for some reason the HSE is not detected or some other fault happens in the bootloader. When I pull the BOOT0 to 3V3 on start, the normal program does not start, which is good. But when I plug in a USB cable, device gets reset and starts in normal mode and not DFU.

I have tried accessing the DFU using USART1 and it seems to connect OK. According to the AN2606, it would seem that the HSE is not detected:

0693W000000VsDVQA0.png

However, the HSE probably works just fine when running in normal mode as USB CDC works and I am able to communicate using a terminal with USB COM port.

I use 8 MHz HSE:

0693W000000VsE9QAK.png

The device may be powered both from the USB or external power jack.

Does anyone have ideas how to advance, what to test or how to resolve this? Thank you.

12 REPLIES 12

Yes, but you've told us you tried several different PCs...

On Linux, at least, the DFU device should show up in lsusb...

JW

Martin Pesek
Associate III

Thank you all for many tips and your help. I will now share how I resolved this issue.

tl;dr I changed from the STM32F401 to the STM32F446, which works.

No layout or design changes were performed, I literally only interchanged these two MCUs and now, it works like wonder. The STM32F401RE would sometime at least try to enumerate as a STM32 Bootloader when connected under a some sort of frequency value of external crystals (very strangely 5 MHz iirc). This probably points to a HSE-related issue, but that's all I know (might be related to PCB layout, startup time, stability - only my guesses).

I had some issues when the STM32F446 DFU Device would keep connecting and disconnecting but after some analysis this was caused only by bad contacts caused by bad soldering.

As Jan correctly suggested, definitely make sure to have a solid cable, solid connectors (both PC and your PCB) and good soldering joints!

arro239
Senior

it was the difference between 427 working and 407 not working in DFU for us https://community.st.com/s/question/0D53W00000wyoGESAY/f4-sporadic-reset-into-dfu-and-dfu-jump-any-links-between-power-and-dfu

we believe it's about the oscillator taking too long to start and DFU procedure resetting