2025-04-07 6:32 AM - edited 2025-04-08 12:46 PM
I am working with NUCLEO-U5A5ZJ-Q and it is running the "GPIO_IOToggle Example" that I got via STM32CubeIDE.
My aim is to control the power state of the nucleo board remotely.
I successfully do it using the following commands:
STM32_Programmer_CLI --power off index=0
after that the LEDs are Off.
STM32_Programmer_CLI --power on index=0
after that the LEDs blink again.
However, after locking the board at RDP2 level, it does not work anymore. More precisely the power off works fine, the power on does not: the LEDs remain Off, even though the tool is reporting "success".
$ STM32_Programmer_CLI --power on index=0
-------------------------------------------------------------------
STM32CubeProgrammer v2.19.0
-------------------------------------------------------------------
Power ON...
Drives the target power pin out of the (onboard) ST-Link.
Info: Power ON/OFF maybe not available on your Board [also not available on standalone probes]
Power ON the board finished with success !
UPDATE: I found out that I can power on successfully by using the STLinkUpgrade tool. Using this tool, opening the device in update mode and then closing the tool restore the power and the LEDs blink again. Unfortunately this is a GUI tool, so I cannot use that method for automating power on remotely. That proves however that the nucleo hardware is supporting it and my problem is just a host side software problem that could be fixed.
2025-04-08 1:28 PM
Workaround using STSW-LINK007 (downloaded from https://www.st.com/en/development-tools/stsw-link007.html)
java -jar STLinkUpgrade.jar -sn 001B00303232510239353236 -checkVer
the -sn parameter is optional and not needed if you have a single board connected to the host machine.ls