Author Topic: Do you have an STM32F103C*T6? Looking for your help!  (Read 7359 times)

0 Members and 1 Guest are viewing this topic.

Offline 5n44pTopic starter

  • Contributor
  • Posts: 13
  • Country: it
Do you have an STM32F103C*T6? Looking for your help!
« on: July 15, 2018, 12:30:24 am »
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 their GD32F103C8T6 clone compatible, 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 bad

So 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?
« Last Edit: July 15, 2018, 12:35:11 am by 5n44p »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #1 on: July 15, 2018, 12:48:28 am »
There must be a way to tell GD devices apart programmatically. At the very least flash timings will be different.
Alex
 

Offline 5n44pTopic starter

  • Contributor
  • Posts: 13
  • Country: it
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #2 on: July 15, 2018, 12:50:40 am »
There must be a way to tell GD devices apart programmatically. At the very least flash timings will be different.

X-rays! If there are two separate dies you would be able to see it
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #3 on: July 15, 2018, 12:52:02 am »
X-rays! If there are two separate dies you would be able to see it
What is easier, to write a simple program given that you already have the hardware or find the X-Ray machine?
Alex
 

Offline 5n44pTopic starter

  • Contributor
  • Posts: 13
  • Country: it
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #4 on: July 15, 2018, 01:01:32 am »
What is easier, to write a simple program given that you already have the hardware or find the X-Ray machine?

Depends on the skills of the programmer i guess  ;D
I'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  :-DD
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #5 on: July 15, 2018, 01:04:41 am »
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.
Alex
 

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #6 on: July 15, 2018, 03:14:22 am »
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.
« Last Edit: July 15, 2018, 03:18:32 am by tsman »
 

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #7 on: July 15, 2018, 03:37:17 am »
That would be bad. If a user's firmware specifically uses FLASH size as an authentication or integrity checking criterion, then the "kindness" of ST will mess things up quite a bit.
I 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.
 

Offline 5n44pTopic starter

  • Contributor
  • Posts: 13
  • Country: it
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #8 on: July 15, 2018, 11:42:01 am »
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.

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

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.

Maybe 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
« Last Edit: July 15, 2018, 12:12:12 pm by 5n44p »
 

Offline pigrew

  • Frequent Contributor
  • **
  • Posts: 680
  • Country: us
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #9 on: July 15, 2018, 01:59:59 pm »
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.
 
The following users thanked this post: 5n44p

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #10 on: July 15, 2018, 02:56:26 pm »
Maybe. 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.
My 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 a GD32F103CBT6 if you want to see what one looks like.
 

Offline Rolo

  • Regular Contributor
  • *
  • Posts: 206
  • Country: nl
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #11 on: July 15, 2018, 03:05:56 pm »
This is a chip on a original ST Nucleo F103RB.
Maybe it's of any help in your investigation.
 

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #12 on: July 15, 2018, 03:43:38 pm »
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.

 

Online Hydron

  • Frequent Contributor
  • **
  • Posts: 987
  • Country: gb
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #13 on: July 15, 2018, 05:45:27 pm »
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.
 

Offline Rolo

  • Regular Contributor
  • *
  • Posts: 206
  • Country: nl
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #14 on: July 15, 2018, 06:42:16 pm »
First is Blue Pill, second is Baite Maple mini clone.
 

Offline carl0s

  • Supporter
  • ****
  • Posts: 276
  • Country: gb
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #15 on: July 15, 2018, 06:46:32 pm »
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.
--
Carl
 

Offline carl0s

  • Supporter
  • ****
  • Posts: 276
  • Country: gb
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #16 on: July 15, 2018, 07:09:05 pm »
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.

--
Carl
 

Offline 5n44pTopic starter

  • Contributor
  • Posts: 13
  • Country: it
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #17 on: July 15, 2018, 11:54:10 pm »
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.
 

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #18 on: July 16, 2018, 12:31:22 am »
I'll see if i can do something with software.
Connect 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: [Select]
0x0000 = Revision A
0x2000 = Revision B
0x2001 = Revision Z
0x2003 = Revision 1, 2, 3, X or Y

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

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #19 on: July 16, 2018, 09:00:51 am »
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.
 

Offline tomtom381

  • Newbie
  • Posts: 1
  • Country: nl
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #20 on: July 16, 2018, 10:36:25 am »
I've bought a bunch of different STM32 based development boards from China. I've put pictures of these boards online on the wiki 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.
 

Offline AE7OO

  • Regular Contributor
  • *
  • Posts: 65
  • Country: us
Re: Do you have an STM32F103C*T6? Looking for your help!
« Reply #21 on: July 21, 2018, 03:42:15 am »
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.

« Last Edit: July 21, 2018, 03:52:22 am by AE7OO »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf