2022-12-28 11:11 AM
Hi,
I am trying to use an STM32G031J6-DISCO board to get a grasp on the 8-pin STM32G031J6 MCU that I consider for building small IoT sensors (for teaching purposes). I am new to STM32 products (or ST MCUs in general).
I managed to write a few variations of programs (with STM32CubeIDE v1.10.1 on Fedora 35) for blinking the built-in onboard user LED and playing with the built-in push-button as well. However, after rebooting my computer, the user LED is not blinking anymore and I now face an error message when I try to upload my code (using STM32CubeIDE):
STMicroelectronics ST-LINK GDB server. Version 7.0.0
Copyright (c) 2022, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled
Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target.
I tried several times to power-cycle the board by unplugging and plugging the USB cable again. Without any success so far.
I also tried to update of the ST-Link/V2-1 using STLinkUpgrade 3.4.0. Based on p. 4 of the RN0093 release note regarding firmware V2J40M27, I opted for the “STM32 Debug+VCP�? type of firmware. As far as I can tell, the update of ST-Link/V2-1 was successful.
Unfortunately, when I try to connect to the MCU on the board using STM32CubeProgrammer v2.12.0 in order to attempt performing a “Full chip erase�?, I get the following error message
“Error: Connection to target must be established before performing the erase command.�?
even though the connection to the ST-Link/V2-1 seems to be OK as far as I can tell based on the top right panel (the displayed firmware version number is V2J40M27, as expected, and the feedback about the target voltage is 3.23 V, which seems reasonable to me). I played a bit with the options that are available in STM32CubeProgrammer, like reducing the SWD communication frequency (e.g. 100 kHz instead of the default 4 MHz value), using the “Under reset�? mode and “Hardware reset�? for the reset mode, but still without any success. When I click on the top right “Connect�? button, I always end up facing the following error message:
Error: No STM32 target found!
I read on the web that such an issue might be related to a faulty boot sequence, which is usually solved with pulling up the BOOT0 pin when powering up the device. However, the behavior of the BOOT0 pin in the STM32G031J6 MCU seems to be slightly different from what is usually used in other STM32 products. At least, pulling up the physical pin #8 of the MCU (which should be connected to BOOT0 according to Figure 10 in the STM32G031J6 datasheet ) did not change anything to my issue.
So far, I have been unable to tell if my issue is something that can be solved or if the MCU is definitively bricked. And if the chip can still be salvaged, could it be done “easily?�? In particular, I currently have a very restricted set of electronic tools at my disposal (at least for a few days). Basically the onboard ST-Link/V2-1, a couple wire jumpers and that is it…
Would there be another procedure or another hypothesis to test that I would have missed regarding my issue and that could help assessing the situation or finding a solution?
Best regards,
Adrien
Solved! Go to Solution.
2022-12-30 03:01 AM
Thanks for the additional information.
2022-12-30 03:04 AM
Marking the topic as “Solved�? as I was able to salvage the board using the advice of @MM..1 . Thanks also to @Community member and @KnarfB for the additional pieces of information regarding some of the subtleties of those 8-pin STM32G0 chips.