Skip to main content
Visitor II
July 20, 2022
Solved

Hello, I have some problems programming a custom STM32F417 board.

  • July 20, 2022
  • 3 replies
  • 941 views

The Flash of the chip can't be programmed. Mostly the error is that writing the first byte failed. But sometimes it is able to write a few bytes. It even worked like 3 times. The behavior is consistent over STM32CubeProgrammer and ST-Link Utility, and JTAG and SWD.

There are some side effects:

  • STM32CubeProgrammer does not report the Flash size correctly. It reports 1M instead of 515K, ST-Link Utility reports correctly
  • Erasing the Flash does not always work
  • Sometimes the flash changes its content. Mostly switching between 2 or 3 values

Thank you for your help.

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    Do a through review of your design, perhaps with an ST FAE assigned to your account.

    With good design, the JTAG/SWD should be quite robust.

    Differences on a board level check for power and component issues.

    For FLASH, the VCAP pins and capacitors being particularly important.

    Don't float BOOT0

    Have NRST connected to any debug headers.

    Make sure VDDA and VDD are powered. Similarly digital/analogue grounds.

    3 replies

    Graduate II
    July 20, 2022

    Do a through review of your design, perhaps with an ST FAE assigned to your account.

    With good design, the JTAG/SWD should be quite robust.

    Differences on a board level check for power and component issues.

    For FLASH, the VCAP pins and capacitors being particularly important.

    Don't float BOOT0

    Have NRST connected to any debug headers.

    Make sure VDDA and VDD are powered. Similarly digital/analogue grounds.

    Super User
    July 20, 2022

    Lower the SWD clock frequency in the tools used.

    hth

    KnarfB

    SArzb.1Author
    Visitor II
    July 21, 2022

    @Community member​ thank you very much. VDDA was not connected.

    Its working now.

    @KnarfB​ Thank you for your help.