cancel
Showing results for 
Search instead for 
Did you mean: 

Could not set Option bytes using ST-Link

CharlieMangold
Associate III

STM32G070

STM32 ST-LINK Utility v4.0.0

STM32CubeIDE Version: 1.9.0

We are finishing a project and beginning to program production boards for testing. We have been debugging the boards using Segger JTrace's and do not utilize the option bytes of the G070 chip in firmware.

When we attach to the boards from the ST-LINK, the Flash memory tab fills out and the memory can be seen. If we try to erase the chip or program a new hex file we get a "Read out protection is activated" warning. If we select Target->Option Bytes, pull down Disable and hit Apply, the utility chugs along for a few seconds and then kicks out a error message "Could not set Option bytes!" The boards can be debugged fine but we need to be able to send updated hex files to the customer for testing. All electrical connections are good.

I have not found any relevant answers in searches as this issue was seen all the way back to 2016.

What is going on here. Is this a ST-LINK failure?

Thanks.


_legacyfs_online_stmicro_images_0693W00000bkOKtQAM.png

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

Do not use the ST-LINK Utility on STM32G0.

It is too old. At least, get the latest version 4.6.

View solution in original post

4 REPLIES 4
Pavel A.
Evangelist III

Do not use the ST-LINK Utility on STM32G0.

It is too old. At least, get the latest version 4.6.

CharlieMangold
Associate III

Found 4.6 and installed it. Got any idea where it's located on the drive? Settings->Apps shows it's installed but all shortcuts are gone and the STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility directory has no executables.

Thanks.

GwenoleB
ST Employee

Dear @CharlieMangold​,

I recommend you to use STM32CubeProgrammer.

In addition, it seems that Flash sectors protection is already wrong. STM32G0x0 is capable of protecting only 2 Flash area per bank. On your picture we observed, at least, 5 protected areas.

Best Regards,

Gwénolé

CharlieMangold
Associate III

Not really sure why ST-LINK was displaying the flash sectors incorrectly or where the new version 4.6 was installed(never could find it). I installed STM32CubeProgrammer v2.13, upgraded the ST-LINK/V2 firmware and was able to program the boards correctly. We have been using the STM32F series and the ST-LINK programmer for years and this is the first time we ran across this issue. I thought it looked odd when the ST-LINK software had a hex device ID but no name. Guess the G series was too much for the older software.

Thanks for the help.