cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32f407vet6 bootloader firmware

lalitkandpal
Associate

I bought a Stm32f407vet6 board yesterday and wanted to run ardupilot firmware on it. So I tried to put firmware in DFU mode by putting boot0 pin high and boot1 pin low, but for some reason I was not able to do that (my mistake). Then I tried to put that firmware by the stm32cube programmer, and I was able to put the firmware, but it was not working properly, so I did a full chip erase by stm programmer. Now my laptop is not recognizing my stmboard, and I think I erased my default bootloader also. Can you guys help me to know how I can restore it to its default state (factory setting)?

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee
  1. If you mean STM32CubeIDE (STM32CubeMX is the configuration program also included there), then debugging is done via SWD or JTAG, not via DFU. However, STM32CubeProg can handle DFU, so you can program your board with it - but not debug it.
  2. DFU does not provide a recognisable USB device for Windows, but expects commands (erasing, programming, etc.) from a tool such as STM32CubeProg.

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Peter BENSCH
ST Employee

Welcome @lalitkandpal, to the community!

You cannot delete the built-in bootloader, it is fixed and unchangeable in every STM32. If you set BOOT0=1 and BOOT1=0 on your STM32F407, this bootloader always starts after a reset and queries the serial ports for commands (see AN2606, section 28).

However, the DFU mode can be a little tricky because it requires e.g. a crystal with a frequency with multiples of 1MHz on the HSE, e.g. 4MHz or 8MHz. Please also check how you have connected the crystal, i.e. load capacitors and especially the layout. You will find notes on both in AN2867, for the layout in section 7.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks for replying, 

I have some question regarding that,

1. When I am trying to put firmware through stmcubemx ide, it is throwing an error: "ST-LINK: Could not verify ST device! Abort connection", but when I am putting firmware through the STM cube programmer, I am able to send the code.

2. When I am connecting it in DFU mode (BOOT0 high, BOOT1 low), my Windows laptop is not able to recognize the device. Why is that?


Regards,
/Lalit

Peter BENSCH
ST Employee
  1. If you mean STM32CubeIDE (STM32CubeMX is the configuration program also included there), then debugging is done via SWD or JTAG, not via DFU. However, STM32CubeProg can handle DFU, so you can program your board with it - but not debug it.
  2. DFU does not provide a recognisable USB device for Windows, but expects commands (erasing, programming, etc.) from a tool such as STM32CubeProg.

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.