STM32 CubeProgrammer only works every other time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-03 6:39 PM
I am using STM32 CubeProgrammer to program a Nucleo F-103RB via the OBD. When I power up the board, I can connect to ST-LINK and program the board. However, if I try to program it a second time, I get some errors:
and it doesn't program. If I do nothing else but close those error messages and try to program again, it successfully completes. This is 100% repeatable.
Is there something I need to do before re-programming a board to avoid those errors?
- Labels:
-
ST-Link
-
STM32CubeProgrammer
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-03 9:47 PM
First things first, which CubeProgrammer version do you use?
Then, do some checks.
1) On your board if the NRST or JTAG reset are connected.
2) On your board Boot0 and Boot1 pins status.
3) The flash lock status before reprogramming.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-06 5:22 AM
Thanks for the response.
- STM32CubeProgrammer API v2.10.0 | Windows-64Bits
- Standard Nucleo-64 (Nucle-F103RB)
- I've not had a ton of luck finding actual schematics of the Nucleo boards. However, based on UM1724, I believe Boot0 is ground. Can't find reference to Boot1
- I have not changed any of the solder bridge settings on the board (still in factory default setting). That means SB12 is on and SB11 is off. I believe that means the OBD can reset the STM, but I'm not certain.
- What is flash lock status?
To reiterate - I am able to program the STM32 on the board - I just have to run click on "download" twice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-06 2:20 PM
What does the program you are programming into target, do? Try a plain blinky with no changes in clocks ie. default HSI clock, no PLL).
​
Try STLink Utility instead of Cube programmer.​
​
> I've not had a ton of luck finding actual schematics of the Nucleo boards.
​
On ST web, in the Nucleo web folder, under CAD Resources.
​
JW​
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-07 5:04 AM
The program does many things. But it seems to be irrelevant to the behavior I described. If I change a single thing (like the duty cycle on a blinking LED), it will do exactly what I described above.
I will try STLink Utility.
Thanks for the pointer to the schematics.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-07 5:22 PM
GPIO configuration for SWD/JTAG pins, low-power modes, watchdogs and option bytes definitely can have an impact on debugger.
Also set both of these for the debugger:
- Connection mode: Under reset.
- Reset mode: Hardware.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-07 5:24 PM
All ST boards have NRST connected to the onboard ST-LINK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-07 7:40 PM
@Piranha: Thanks for the response. I already had reset mode to hardware. I changed Connection mode to "Under reset" -- but it did not have any impact.
