- Notifications
You must be signed in to change notification settings - Fork126
STM32 Fakes
Unfortunately in sourcing STM32 parts outside the proper retail channels(ie. cheap Chinese sources on Ebay and AliExpress) we need to be awareof fake chips being sold as STM32F103C8.
On this page I present aRogues' Gallery of fakeparts, describe how they are not equivalent to a proper STM32F103C8part, and explain how to test your own STM32 parts and "pill"development boards.
Greaseweazle includes a Blinky test firmware in thealt/ subfolder.When written to a correct and working Blue Pill board, this firmware willflash the PC13 LED once per second (ie. LED toggles every 500ms).
At the same time, a test diagnostic is logged to the serial line at115200 baud, 8n1. On failure you can use this, if interested, to work outwhich parts of the chip are bad or missing. Note that serial output is onthe programming interface at pinsA9 andA10: Not via the USB port!
All chips in theRogues' Gallery fail the Blinky test.
First note that the chip must have "STM32F103C8" written on it. If the textsays anything different then the part is probably fake, or less powerful,or both. The text fills the top of the chip, and there is one circulardepression, indicating the pin-1 corner of the chip.

This chip was found on a Blue Pill sold as "STM32F103C8T6". This chip isup front about its fakeness: "STM32FEB" is a Chinese clone of the genuineSTM32, while "KC6" indicates a low-density part with missing features.

Harder to spot, this bad fake has been found on cheap Blue and Black Pillsalike. Note the physical differences from a genuine part in the side-by-sideshot below: There are extra circular depressions on the chip surface, and thewriting is smaller. However note that there are also physical variationsamong genuine chips, and the only way to be sure is to run Blinky.

Of course this part fails Blinky. Although it seems to have all the requiredperipherals present on the chip, it does not work properly in many ways.These are differences from the genuine part that I found in my testing:
- Cannot program at 921600 baud. Success at 115200 baud.
- Cannot start firmware from System Bootloader (Bootloader may not set the Reset SP?)
- Debug registers return valid non-zero info (contravenes Erratum 2.3 of genuine parts)
- Writing to backup registers, and then turning off the backup interface clock, seems to lock up parts of the chip: Future writes to certain registers hang forever with no exception or reset
- I2C peripheral won't allow CR1_ACK to be set in the same write that sets CR1_PE
- DMA peripheral generates spurious extra completion interrupts and is generally prone to lockup
This clone (which probably also appears in remarked chips posing as genuineSTM32F103) actually passes Blinky and seems to work okay in general. Note thatthis chip fixes Erratum 2.3 of genuine STM32F103 (return values from debugregisters) and thus can be detected as a clone part.
