2022-06-03 06: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?
2022-06-03 09: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.
2022-06-06 05:22 AM
Thanks for the response.
To reiterate - I am able to program the STM32 on the board - I just have to run click on "download" twice.
2022-06-06 02: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
2022-06-07 05: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.
2022-06-07 05: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:
2022-06-07 05:24 PM
All ST boards have NRST connected to the onboard ST-LINK.
2022-06-07 07: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.