cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging Bootloader Code Sequence

Konami
Senior II
Posted on May 16, 2018 at 19:20

I'm unable to get my STM32F411 into USB DFU mode on custom hardware. Based on the flow in AN2606 a number of things could be causing this. I've seen a number of references on here with people having issues getting HSE recognized (I have a 4MHz HSE which should be within spec) but I'm not sure how to debug the flow to see where we're getting stuck or what state it's ending up in. Is there a way to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on May 16, 2018 at 19:49

The debugger should work on ROM based code. The ROM can be pulled and disassembled.

You'd probably want to first determine if the HSE starts quick enough and the code can correctly determine and use the frequency in question. The docs suggest the F411 is quite broad in its frequency support, other F4/F2 have specific supported frequencies.

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

View solution in original post

3 REPLIES 3
Posted on May 16, 2018 at 19:49

The debugger should work on ROM based code. The ROM can be pulled and disassembled.

You'd probably want to first determine if the HSE starts quick enough and the code can correctly determine and use the frequency in question. The docs suggest the F411 is quite broad in its frequency support, other F4/F2 have specific supported frequencies.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 23, 2018 at 18:43

I just noticed that it seems like the Nucleo-F411RE doesn't even have a HSE populated. How is that it's able to enter DFU mode? Is it using the MCO from the STLINK part? Could I fly wire MCO from the dev kit to the OSC of my custom board to test?

Posted on May 23, 2018 at 19:02

There are solder bridges, but generally the DISCO and NUCLEO boards source an 8 MHz clock from the ST-LINK, drops a crystal from the BOM.

You could use a frequency generator, a TIM output, or MCO from either STM32 on the NUCLEO board. Would tend to keep such leads short, and of course share a common ground.

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