Do you have an STM32F103C*T6? Looking for your help! - Page 1
Forum section: electronics / projects

author: 5n44p
author_rank: Contributor
timestamp: July 15, 2018, 12:30:24 am
content: Hi to everyone,I'm conducting an investigation on counterfit STM32F103C8T6 ICs. I'm not affiliated with ST or anything, this is just something i'm doing out of curiosity, to publish the result for the community.Originally the price of the so called "bluepill" STM32 board on AliExpress caught my attention. It is sold for about $1.70, while i didn't manage to find any legittimate distributor selling the chip itself for less than $2.60 (Octopart). There are some chinese unauthorized distributors selling it for lower but that's exactly my focus.The other suspicious thing is that, on my bluepill board, i have 128k of flash, while the STM32F103C8T6, from the datasheet, only has 64k. ST is also making a "CBT6" variant that has 128k of memory, but this is not the one that's mounted on the bluepill.I've also discovered that there is a chinese company, GigaDevice, making"compatible"STM32 chips. They have theirGD32F103C8T6clonecompatible, which is sold on Alibaba for about $1.01 in quantity.So i went ahead and bought a chip each, from both ST (sourced from RS-online) and from giga device (sourced from aliexpress), both in the C8 and CB variants.The plan is to dissolve the package and compare the dies under an optica microscopel and, if necessary, on a scanning electron microscope (i have access to one, why not!).Also xraying them would be intresting to see the bonding wires configuration, but for now i don't have access to an xray machine.I took some macros of the various chip to compare them againts the bluepill (see attached image,full resolution here)The giga device's package looks quite different in shape, but with a similar texture.The ST's package is similar for the shape but has a much smoother surface.And this is the point where i noticed that one of my genuine chips is from a production plant in China (the C8 version) and has a greater surface marking, the other one is from Malaysia and has a not so good marking. Not bad as the bluepill one, but not as good as the CB version. The bluepill obviously has the worst marking of all five, and it's marked also from Malaysia. The genuine CB has the F on the same line as STM32, while the C8 and the bluepill chips have it on a new line.I've also noticed that on the bluepill chip the pin 1 marker dot is engraved over a dot that's already in the mold. That's strange.Now i'm asking myself if a genuine C8 version made in Malaysia exist and if it has the etched dot, the F on the new line or if the engraving quality is so badSo here's where i need your help: if you have an STM32F103C8T6 from Malaysia or from anywhere else, genuine or not (but please specify), can you post a picture of it?

author: ataradov
author_rank: Super Contributor
timestamp: July 15, 2018, 12:48:28 am
content: There must be a way to tell GD devices apart programmatically. At the very least flash timings will be different.

author: 5n44p
author_rank: Contributor
timestamp: July 15, 2018, 12:50:40 am
content: Quote from: ataradov on July 15, 2018, 12:48:28 amX-rays! If there are two separate dies you would be able to see it

author: ataradov
author_rank: Super Contributor
timestamp: July 15, 2018, 12:52:02 am
content: Quote from: 5n44p on July 15, 2018, 12:50:40 amWhat is easier, to write a simple program given that you already have the hardware or find the X-Ray machine?

author: 5n44p
author_rank: Contributor
timestamp: July 15, 2018, 01:01:32 am
content: Quote from: ataradov on July 15, 2018, 12:52:02 amDepends on the skills of the programmer i guessI'd have no clue on where to start, it probably would be easier to find an xray machine. But also easier to just drop them in sulfuric acid and see how many dies come out

author: ataradov
author_rank: Super Contributor
timestamp: July 15, 2018, 01:04:41 am
content: The easiest test is to simply flash the whole device with any data using the same programmer. I bet the programming time will be very different.

author: tsman
author_rank: Frequent Contributor
timestamp: July 15, 2018, 03:14:22 am
content: I expect you've got real ST parts there obviously apart from the GD32s. Your BluePill having a STM32F103C8T6 with 128KB flash isn't unusual and is an indication it isn't a GD clone as their 64KB flash parts do only contain 64KB flash. Presumably the yield of the 128KB flash parts are good so ST just uses the full 128KB part for nearly all the STM32F103s. I've ordered STM32F103C8T6s from Farnell before and gotten 128KB parts and they would have come direct from ST.If you want to test it then benchmark it. The zero wait state "flash" in the GD32 improves performance over the STM32. Flash timings are significantly different as well. You should also be able to twiddle the USB PLL divider. A real STM32 only has a single bit there but a GD32 has 2 bits there.There are actually quite a lot of differences between a STM32 and a GD32. Just copying your code straight over without any changes is likely to cause weird issues unless it is very simple.

author: tsman
author_rank: Frequent Contributor
timestamp: July 15, 2018, 03:37:17 am
content: Quote from: blueskull on July 15, 2018, 03:16:36 amI don't know why ST don't disable the extra flash. There is a read only register that tells you how much flash is present so you can easily check. You can get a vague indication as to what chip family your code is running on and the revision but you can't tell precisely what part it is.Those clone ST-Link dongles are nearly all STM32F101s which officially don't have USB support but they're being used like a STM32F103 which does.

author: 5n44p
author_rank: Contributor
timestamp: July 15, 2018, 11:42:01 am
content: Quote from: tsman on July 15, 2018, 03:14:22 amMaybe. But the appearance is still quite strange. The marking is so bad that i wouldn't exclude that it is counterfit.For now i'll exclude that it is a sanded and re marked GD32.Quote from: tsman on July 15, 2018, 03:37:17 amMaybe i can decap also one of those. I have one stlink clone.EDIT:To me the STM32F101CBT6 from the stlink clone looks much more legit than the bluepill. See attached image,high resolution here

author: pigrew
author_rank: Frequent Contributor
timestamp: July 15, 2018, 01:59:59 pm
content: First is a STM32F103 in a genuine isolated stlink. Its pin 1 mark is smooth, and slightly concave.The second is a blue pill board. The pin1 mark is rough and flat inside.

author: tsman
author_rank: Frequent Contributor
timestamp: July 15, 2018, 02:56:26 pm
content: Quote from: 5n44p on July 15, 2018, 11:42:01 amMy guess is that they're remarking STM32F101s as STM32F103s. I still don't think they're GD32s though. Easiest way of checking though is just to run something like Dhrystone on it. A GD32 should be significantly faster than a real STM32.Zeptobars decapped aGD32F103CBT6if you want to see what one looks like.

author: Rolo
author_rank: Regular Contributor
timestamp: July 15, 2018, 03:05:56 pm
content: This is a chip on a original ST Nucleo F103RB.Maybe it's of any help in your investigation.

author: tsman
author_rank: Frequent Contributor
timestamp: July 15, 2018, 03:43:38 pm
content: I asked a friend who does have some GD32F103 samples and they said the easiest way to detect them is to look at the revision in IDCODE. The GD32F103s use a different value (0x1309) there than the STM32F103s.

author: Hydron
author_rank: Super Contributor
timestamp: July 15, 2018, 05:45:27 pm
content: Both pics of parts on official dev boards bought from RS/Farnell. Not the best photography sorry - taken handheld in ambient light in a rush.

author: Rolo
author_rank: Regular Contributor
timestamp: July 15, 2018, 06:42:16 pm
content: First is Blue Pill, second is Baite Maple mini clone.

author: carl0s
author_rank: Unknown
timestamp: July 15, 2018, 06:46:32 pm
content: I posed this question on the stm32duino forums and Roger says they've spoken with ST and they say they are not aware of any fakes/clones.

author: carl0s
author_rank: Unknown
timestamp: July 15, 2018, 07:09:05 pm
content: Here's the stm32 on my blue pill.The etching is so faint that I had to hold it at an angle to even see it.

author: 5n44p
author_rank: Contributor
timestamp: July 15, 2018, 11:54:10 pm
content: Thank you all guys! So it seems that the ST marking, even for the legit chips, is pretty inconsistent between chips and production plants.It also seems that the F103C8 is made both in Malaysia and China.I'll see if i can do something with software. Maybe i'll ask a couple friends if they can help.From the few or die pictures on the internet it seems that there are no visible markings on the chips, so the last resort would be to directly compare the layout. Or maybe i can find some markings with the electron microscope.

author: tsman
author_rank: Frequent Contributor
timestamp: July 16, 2018, 12:31:22 am
content: Quote from: 5n44p on July 15, 2018, 11:54:10 pmConnect a ST-Link and run the ST-Link utility. It'll tell you the revision ID in the top right corner when you connect.If it is a ST part then it'll have one of the following revisions.Code:0x0000 = Revision A0x2000 = Revision B0x2001 = Revision Z0x2003 = Revision 1, 2, 3, X or YIf it comes back with something else then it is a GD32.The GD32 isn't meant to be 100% code compatible and there are lots of differences in operation + additional bugs added by GigaDevices. They most copied the register spec for the STM32 but changed a lot of things such as additional configuration bits in registers. You're meant to use the GD32 peripheral libraries where all of this is hidden away from you. Using the STM32 libraries would mean peripherals don't get initialised properly like the SPI controller so I don't see anybody managing to hide the fact they're selling GD32s as STM32s for long.

author: Kjelt
author_rank: Super Contributor
timestamp: July 16, 2018, 09:00:51 am
content: Just a side remark, don't let only the price influence your thoughts.Many of the ebay stuff are left over reels from mass production facilities.They are often thrown away or sold as scrap, I know people who bought reels of 3000 uC's for $10 so what is then the price of one uC ?Take a look at the production date (if applicable) they are usually couple of years old and can't be used anymore in production.

author: tomtom381
author_rank: Newbie
timestamp: July 16, 2018, 10:36:25 am
content: I've bought a bunch of different STM32 based development boards from China. I've put pictures of these boards online on thewiki of my STM32 github project. You can easily read the markings of most of the chips on these boards, so I hope these will help you with your research.Let me know if you need any higher resolution pictures of any of these boards.

author: AE7OO
author_rank: Regular Contributor
timestamp: July 21, 2018, 03:42:15 am
content: Here are the chips from two blue pills. The first one is from ebay in january and the second one is amazon last week.My st-link clone is almost unreadable. It is from amazon 2 months ago. It is a 103C8.