Skip to main content
Explorer II
January 23, 2024
Solved

Stm32f407vet6 bootloader firmware

  • January 23, 2024
  • 2 replies
  • 3402 views

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.

    This topic has been closed for replies.
    Best answer by Peter BENSCH
    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.

     

    2 replies

    Technical Moderator
    January 23, 2024

    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

    Explorer II
    January 23, 2024

    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

    Technical Moderator
    January 23, 2024
    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.