2020-08-13 05:32 AM
I have two programmers ST-Link V2 clone and Blue Pill that was flashed with ST-Link V2. I was using the Blue Pill to program two other Blue Pills (BP).
When using the ideCube:
One of the BP would program as expected, but the second BP would throw this lock message.
When using ST-Link Utility and trying to connect to the second BP, it would say the memory was locked. I could clear the lock, blank the memory. Program the BP from the hex file that was built with the ideCube. Clear the memory. Try the ideCube again, get the lock error. Then going back to the ST-Link Utility the memory would be lock again. Is the second BP just bad?
I thought maybe the BP ST-Link flash was bad, so I bought a clone. I am getting the same results when using either the BP programmer or the clone. BTW, ideCube upgraded both of them so I am assuming they are flashed with the most current version.
ideCube about info:
STM32CubeIDE
Version: 1.4.1
Build: 7610_20200730_1509 (UTC)
(C) 2020 STMicroelectronics ALL RIGHTS RESERVED
ST-Link Utility about info:
STM32 ST-LINK Utility v4.5.0.0
STLinkUSBDriver.dll v5.1.2.0
ST-LINK-CLI.exe v3.5.0.0
2020-08-13 03:50 PM
ST may have done something where it checks for fake chips. Seems like a lot of reports like this are happening. I'm merely guessing.
STLINK-V3 is $10. More than a blue pill, but it works.
2020-08-14 05:07 AM
I tried to do my research on spotting clones chips. Even some research say's that Giga has licensed from ST. Don't know if that is true, but I have tried to make sure the pictures has the correct ST logo before I buy.
Actually the Blue Pill works as constant as the off the shelf programmer. It is the ideCube that is not constant with loading with ST-Link Utility.
I can see the ideCube having more smarts to sniff out a fake chip, but I bought the 3 Blue Pills at the same time, which makes me think if one had a fake chip they all would have one. I would have thought if the board was bad I would have had the same issue on the ST-Link Utility.
As mentioned in other threads, I am coming from the ESP world and seeing what STM32 MC can do for me as a hobbyist. I am just trying to understand my tool chain for the STM32. What got me started is my motherboard for my 3D printer has a STM32 chip. It lost it's boot loader and I was trying to fix it.
2020-08-14 06:46 AM
It's hard to debug issues like this even when you're in front of the hardware, unfortunately.
I am under the impression that all blue pill boards are suspect. I certainly can't find any way to buy a blue pill from a reputable vendor. Perhaps this is incorrect or I'm missing something. I can find information which suggests Giga is definitely breaking some laws here.
Why are you using ST-Link Utility at all? You can flash directly from within CubeIDE. Doesn't explain why it's not working, but maybe you can avoid the problem.
You could also try STM32CubeProgrammer as an alternative to the ST-Link Utility. They have roughly the same functionality, but sometimes one works and the other doesn't.
2020-08-14 07:05 AM
Why are you using ST-Link Utility at all? You can flash directly from within CubeIDE. Doesn't explain why it's not working, but maybe you can avoid the problem.
Sorry for the confusion, it is the ST-Link Utility that works on both BP boards, not the CubeIDE. The CubeIDE works on one, then displays a "lock" message when programming the second. Then when I do look at it with the ST-Link Utility, is show to be locked. I can then use the parameters option to unlock it. Then I can flash the BP that CubeIDE displayed "lock" messages with no issues. I am using the "Hello World Blink" program.
You could also try STM32CubeProgrammer as an alternative to the ST-Link Utility
I just tried to start the STM32CubeProgrammer and all I get is a splash screen that it quits. I wonder is this is related to my CubeIDE issue? I don't think so because the CubeIDE does program one of the BP.
I am under the impression that all blue pill boards are suspect.
I thought as long as it had the ST logo it was legit. Is that an incorrect assumption?
I can find information which suggests Giga is definitely breaking some laws here.
I hear you. I have read it both ways. Either way, I do not have any Giga branded chips. I learned from the State Farm commercial long ago, they can't put it on the internet if it is not true. :D
It's hard to debug issues like this even when you're in front of the hardware, unfortunately.
I hear you on this also, that is why I appreciate everyone's help.