Now there are also fake STM32F030 microcontrollers? - Page 1
Forum section: electronics / general

author: insanoff
author_rank: Contributor
timestamp: April 17, 2022, 07:33:36 am
content: Hello everyone!I purchased an STM32F030F4P6 development board on Aliexpress for a project (I'm an STM32 newbie). I tried to flash the blink program using CubeIDE and ST-Link and got the following error message:Error in initializing ST-LINK device.Reason: ST-LINK: Could not verify ST device! Abort connection.I would like to know if there are also fake F030 microcontrollers. Googling does not give any relevant results.ThanksAdam

author: pcprogrammer
author_rank: Super Contributor
timestamp: April 17, 2022, 08:30:40 am
content: Google for using openocd with this controller and ST-link. It will tell you what the retrieved device ID is.I had this once with a F103 device. It did not have the ST logo on the chip but was sold as one. The device ID was different but by modifying the openocd script with the newly found ID I was able to program the device.

author: tepalia02
author_rank: Regular Contributor
timestamp: April 17, 2022, 08:47:43 am
content: Follow the advice given by pcprogrammer. If it does not work, I think you should immediately contact your supplier.

author: thinkfat
author_rank: Unknown
timestamp: April 17, 2022, 08:48:53 am
content: First things first: Have you checked the physical connection?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: April 17, 2022, 03:40:06 pm
content: Indeed,I would not draw any conclusions from a single sample.There could be a bad solder joint, a wronly placed or missing SMT part, bad crysal, ESD damage, a broken PCB track or whatever.For the average "direct from china" prices you can't be too critical.Even If 10% would not be working, I'd just consider it acceptable.You either calculate in some waste, or you pay extra up front for higher quality control on their side.If however, they advertise as an ST part, and openocd gives you wrong ID's (for multiple PCB's, one can be a fluke), then first complain for a refund, and then still give them full negative feedback for trying to cheat you.

author: Siwastaja
author_rank: Super Contributor
timestamp: April 17, 2022, 04:41:09 pm
content: You need to somehow find out what this error 18 "Could not verify ST device"actuallymeans. It could be anything, I hate such unhelpful error messages yet they are very popular.Look for documentation, google for it, and if all else fails, read the source code, if that part which generates the error code is open source; hopefully it is.

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 17, 2022, 08:43:43 pm
content: I only got that error with clones...Ensure your IDE/Programmer is updated, might be a newer silicon revision.Switch to OpenOCD under debug/run profile and try again.

author: insanoff
author_rank: Contributor
timestamp: April 18, 2022, 07:44:37 am
content: Thanks everyone for your comments!The idea of checking the device ID with OpenOCD is great. For some reason I am not able to get OpenOCD to work with CubeIDE 1.9. I installed CubeIDE 1.3.1 on my old Windows 7 laptop, it worked. I can flash and debug. I assume the device ID seems to be ok: 0x10006444.But strangely, I can't use the GDB server, including on my old Windows 7 laptop. It just doesn't work.I have a F401RE Nucleo and F411CE "Black Pill" development boards, all working fine.

author: thm_w
author_rank: Super Contributor
timestamp: April 18, 2022, 09:03:37 pm
content: If you can flash and debug it should be the real deal. I have received fake F030's but they were just the wrong silicon entirely, blatant fakes, not clones with the same device ID.Check the things Doctorandus_P mentioned, if the SWD pin is loose it could intermittently be able to debug. Could also try dropping the debug clock frequency if it lets you. Look for shorted outputs.Is there any cap on NRST?

author: insanoff
author_rank: Contributor
timestamp: April 20, 2022, 06:07:16 pm
content: I can flash and debug, but only with OpenOCD. Surely something is wrong. It is well said that we should expect poor quality from electronics ordered off cheap Chinese sources.

author: janoc
author_rank: Super Contributor
timestamp: April 20, 2022, 07:16:45 pm
content: Quote from: insanoff on April 20, 2022, 06:07:16 pmYes, something with your setup. If OpenOCD can flash and debug the chip, the hw is almost certainly OK. OpenOCD certainly doesn't have any special secret sauce to make the chips work that the vendor software doesn't have.That doesn't mean the chip can't be a clone but as long as it reports the correct ID there is no reason ST Link would reject it.

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 21, 2022, 05:12:41 am
content: OpenOCD doesn't care about the clones, but ST-LINK GDB server does.If the setup was wrong, you would get any other error!Already fought that a year ago, losing debugging was a problem!OpenOCD might still fail to debug it , but can be fixed, copied fromhere,Try it, but for stm32f0x.cfg.Quote