How to Detect STM32 Fakes

STMicro STM32 microcontrollers are very popular, and it’s a well-known fact there are some fakes on the market. What I did not know is that many don’t even pass the blinky test.

I learned this in Greaseweazle Github repository, a “tools and USB interface for accessing a floppy drive at the raw flux level”, where keirf explains how to detect STM32 fakes, notable clones of STM32F103C8 found in Bluepill board.

Real STM32F103C8T6
What a real STM32F103C8T6 MCU Looks Like

The photo above shows a real STM32F103C8T6 microcontroller, and all should have the similar top marking and only one circular depression on the bottom left to indicate pin 1.

keirf goes on to show two boards that are sold as STM32F103C8T6 Bluepill boards, and it’s fairly straightforward to point out the differences by just looking at the chips. The ugly part is that both fail the blinky sample.

Fake STM32 ChipThe first one is very easy to spot since the part number starts with “STM32FEB”, and it does not appear to be an STMicro part at all since it’s not listed in ST MCU Finder program.

ST MCU Finder

Furthermore “KC6” would indicate a low-density part with fewer features.

The second fake STM32 chip is slightly harder to spot because the marking is STM32F103C8T6, but when looking side-by-side, we’ll notice two circular depressions on the chip, and a smaller font.

Real vs Fake STM32
Real vs Fake

keirf notes that are some physical differences on genuine chips too, so the only way to make sure it to test features, and that one could not be programmed at 921600 baud, only at 115200 baud, and it was impossible to start firmware from System Bootloader among other issues documented in Github.

Finally, there are some Bluepill boards with CS32 clone of STM32 that we reported on a little over a year ago.

CS32 Bluepill board

I’m not sure I’d call this one a “Fake” as it identifies itself as a clone, and mostly works as expected. Last year, people reported that debugging with the official STMicro tools would not work, and that’s one way to detect clones.

[Update: There are even more STM32 fakes: APM32F103, BLM32F103, MM32F103, etc… See Andre’s comment for details]

 

Thanks to Zoobab for the tip.

Support CNX Software - Donate via PayPal or become a Patron on Patreon
Advertisements

20
Leave a Reply

avatar
8 Comment threads
12 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
13 Comment authors
Sam Claytondgptheguyk Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
dgp
Guest
dgp

Would be interesting decap them and see what is actually in the chips. My guess is that the fakes started life as reject GD32s or CS32s and *somehow* got lazered with the wrong markings to make them more valuable.

Member

Some Chinese websites say STM32FEBKC6T6 is a genuine ST product intended to be used in motor control systems, and is identical to STM32F103C6T6.

Lukas Rumpel
Guest
Lukas Rumpel

https://www.mikrocontroller.net/topic/488417

ST has confirmed fake Serial Numbers. Unfortunaly the discussion is in german, but the Statement from ST is in english.

André
Guest

I have made a comparison of some known clones. As in- chips that are names *32F103C*, including ways to tell them apart from the debugger or firmware. https://www.blaatschaap.be/?p=120

David Willmore
Guest
David Willmore

Jean-Luc, this is a great post. Maybe you two could work together to write an article up? Good work, André.

zoobab
Guest

Wouw there is much more:

“The competors:

STM32F103
GD32F103
APM32F103
BLM32F103
CS32F103
MM32F103”

I was not aware of the APM/BLM/MM versions.

zoobab
Guest

Docs on APM32F103 is here:

https://www.apexmic.com/en/support/apmtool

This link to the datasheet is wrong, you need to add a .pdf to it:

https://www.apexmic.com/uploads/tool/APM32F103x4x6x8xB%20Data%20Sheet%20V1.0.5.pdf

There is some SDK with some source code in there:

https://www.apexmic.com/uploads/tool/APM32F103_SDK_V1.0.0.rar

zoobab
Guest
Vinay Taneja
Guest
Vinay Taneja

I have used the bluepill board having the non ST Microcontroller chips.
I detailed comment is posted later in this chain.

theandamus
Guest
theandamus

As far as I know the gd32 chips are licensed. I could be mistaken but I seem to recall reading about them some time last year.

David Willmore
Guest
David Willmore

Licensed by whom? ARM or ST?

dgp
Guest
dgp

I think they would have been busted long ago if they didn’t have an ARM license.
I’m not sure how much ST could do about the cloned IP blocks. The ones like USB that might have patents aren’t in house designs IIRC and GD can license those.

theguyk
Guest
theguyk

What needs to be considerd is are the fake clones also being faked by other fakers.

Member

Ok, I prefer original STM32F103C8T6 devices with Bluepill. But there are Bluepill devices with clone chips out there. I bought two of them recently. CS32F103C8T6 device with 128K Flash Program Memory. You cannot program with CubeIDE directly. You should select OpenOCD debugger and change chip ID in the OpenOCD config file. With Arduino_STM32 package there is no problem you can even select 128K version 🙂 It is cheaper of course. However long periods of tests should be taken…

Member
David Leckie

Hi

I have 6 “Blue Pills”. The 1st 2 I bought have genuine STM32F103C chips and work fine.

I then bought another 4.
These have CKS32F103C8T6 chips (though the advert picture showed a genuine STM chip.)

When I power it up the red LED is continious and the green is flashing – perhaps its pre-programmed with blink?
Previously I have programmed my genuine versions with no problem by

1 Moving the jumper from 0 to 1
2 Pressing reset
3The green LED goes out and stays out

However with the cloned version at stage 2 above the green LED goes out while the button is pressed but comes back on when released.
It will not program.

Has anybody had a similatr experience?

Dave

Sam Clayton
Guest
Sam Clayton

I have 5 of these boards with CKS32F103C8T6s as well, David. With the new HID bootloader, they’re finally working well with both the Arduino IDE and Platform.io now that I put the STM32_HID_Bootloader on them. I followed along with Caleb Marting’s updated YouTube video, flashing the bootloader on Windows with an ST-Link, but uploading sketches on my Mac.
https://www.youtube.com/watch?v=Myon8H111PQ

Advertisements