2021-11-08 12:50 AM
I am trying to directly write to some STM32G03 chips.
I have an "STM32G030J6M6" and a "STM32G031F6P6" but I am unable to write to them.
I can connect to them, using the CubeProgrammer, but only in "Hot plug" mode, and when I try to write anything, like flash or erase, it just disconnects.
If I try erasing it, it says "Please verify write protection" but there shouldn't be any, as this is a new chip.
If I try and connect to the chip in "Normal" mode, it just gives me an error, saying "DEV_TARGET_CMD_ERR"
I have tried holding down the reset pin, but that doesn't help. When I release it, it just gives me the same error.
This is the output when I try to connect in normal mode.
09:42:02 : ST-LINK SN : 36FF73065648343826450743
09:42:02 : ST-LINK FW : V2J38S7
09:42:02 : Board : --
09:42:02 : Voltage : 1.50V
09:42:02 : Error: ST-LINK error (DEV_TARGET_CMD_ERR)
This is the output for "Hot plug" + erase.
09:45:33 : ST-LINK SN : 36FF73065648343826450743
09:45:33 : ST-LINK FW : V2J38S7
09:45:33 : Board : --
09:45:33 : Voltage : 1.50V
09:45:33 : SWD freq : 4000 KHz
09:45:33 : Connect mode: Hot Plug
09:45:33 : Reset mode : Hardware reset
09:45:33 : Device ID : 0x466
09:45:33 : Revision ID : Rev 1.1
09:45:33 : UPLOADING OPTION BYTES DATA ...
09:45:33 : Bank : 0x00
09:45:33 : Address : 0x40022020
09:45:33 : Size : 112 Bytes
09:45:33 : UPLOADING ...
09:45:33 : Size : 1024 Bytes
09:45:33 : Address : 0x8000000
09:45:33 : Read progress:
09:45:33 : Data read successfully
09:45:33 : Time elapsed during the read operation is: 00:00:00.008
09:45:38 : MASS ERASE ...
09:45:38 : Error: Mass erase operation failed.Please verify flash protection
09:45:38 : Error: Unable to get core ID
09:45:38 : Warning: Connection to device 0x466 is lost
09:45:38 : Disconnected from device.
Solved! Go to Solution.
2021-11-08 06:32 AM
The voltage is not being pulled down.
When giving the board 3.3v, I can measure the correct voltage on the target (3.3v).
Using the VAPP pins on the programmer, it only outputs 2.4v, which is the same as I measure on the target.
The CubeProgrammer says "Voltage : 2.40V" when using the VAPP pins for power, but if I directly give the target 3.3v, from an external power supply, without having any power pins on the programmer connected, then the CubeProgrammer says "Voltage : 1.50V".
Using VAPP pins:
15:25:42 : ST-LINK SN : 36FF73065648343826450743
15:25:42 : ST-LINK FW : V2J38S7
15:25:42 : Board : --
15:25:42 : Voltage : 2.40V
15:25:42 : Error: ST-LINK error (DEV_TARGET_CMD_ERR)
Using external power supply (3.3v):
15:32:24 : ST-LINK SN : 36FF73065648343826450743
15:32:24 : ST-LINK FW : V2J38S7
15:32:24 : Board : --
15:32:24 : Voltage : 1.50V
15:32:24 : Error: ST-LINK error (DEV_TARGET_CMD_ERR)
2021-11-08 06:57 AM
That worked.
Nowhere I looked, could I find that I needed to short those pins, but now I can talk to the chip.
Thank you very much.