2024-01-10 02:12 PM
My Nucleo-G031K8 can no longer be programmed using STM32CubeProgrammer or from STM32CubeIDE. When attempting to connect using STM32CubeProgrammer I receive the following text:
UR connection mode is defined with the HWrst reset mode
Error: Establishing connection with device failed
I know that on this board the nRST pin has been factor set to GPIO functionality.
What are the steps I need to take to regain control over the board and program the MCU?
-A
2024-01-10 02:16 PM
Check what you can do with the BOOT0 pin to change the mode the device starts in, ie not running your broken code.
https://www.st.com/resource/en/schematic_pack/mb1455-g031k8-c01_schematic.pdf
2024-01-10 02:55 PM
Thank you for your reply but there is no means of using the BOOT0 pin on the Nucleo-g031k8 board. Or, no means that I am aware of.
Also, thank you for sending me the schematics but I don't understand how that helps me unbrick my Nucelo board.
2024-01-10 03:28 PM
> I know that on this board the nRST pin has been factor set to GPIO functionality.
Too bad. Then "under reset" won't work. Change it to "software system reset" or other mode.
2024-01-10 03:44 PM
Well it identifies resistors and solder bridges that the signal is accessible via.
I don't have this board or problem, not my circus as they say..
You'll have to experiment, perhaps adding jumper wires, or removing parts, and then powering up the board to effect a power-on-reset in the absence of NRST connectivity.
I'd perhaps suggest adding some dead-time delay in Reset_Handler code path so the debugger has a window / opportunity to connect before you change pin settings, or lock out the debugger.
You'd want to review the Data Sheet and Reference Manual with respect to how you can change boot operation, or if there are any apparent ways to recover the device.
Otherwise you'll just need to scrap it and tread much more carefully.