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 a similar top marking and only one circular depression on the bottom left to indicate pin 1. [Update July 9, 2023: STMicro has issued PCN MDG/22/13318 in November 2022 that changes the way chips are marked, so it’s no longer true that genuine chips from STMicro must look like the one above. Thanks to George for the update]

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.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus

22 Replies to “How to Detect STM32 Fakes”

  1. 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.

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

    1. Might be good to include the date and time of ST statement since I can’t find it.

        1. Thanks. I missed the first post included a screenshot of an email from STMicro.
          The important part is that markings with:
          991KA 93
          MYS 807
          means those chips are fake.

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

    2. Wouw there is much more:

      “The competors:

      STM32F103
      GD32F103
      APM32F103
      BLM32F103
      CS32F103
      MM32F103”

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

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

  4. 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.

      1. 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.

  5. 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…

    1. 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

      1. 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

  6. Out of all these worst is MM32F103
    Lots and of issues with these
    Pin compatible only
    No code compatibility
    Parallel DMA doesn’t work
    No Idle line detection interrupt
    DMA transfer complete interrupt doesn’t work in case of ADC
    and many more.. I quit exploring it..

  7. Note that ST released a PCN in Nov 2022 about changed marking on this line of chips. Document Reference number: MDG/22/13318. Available as STMicroelectronics_13318_merged.pdf on mouser product page.

    Recent chips now look quite different and bear a QR code. So be careful about relying solely on packaging to identify fakes.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC