Skip to main content
SArzb.1
Associate
July 20, 2022
Solved

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

  • July 20, 2022
  • 3 replies
  • 972 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

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
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.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
KnarfB
Super User
July 20, 2022

Lower the SWD clock frequency in the tools used.

hth

KnarfB

SArzb.1
SArzb.1Author
Associate
July 21, 2022

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

Its working now.

@KnarfB​ Thank you for your help.