Author Topic: Cheap Bluepill, very likely it has fake STM32 right ?  (Read 78130 times)

0 Members and 1 Guest are viewing this topic.

Online BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Cheap Bluepill, very likely it has fake STM32 right ?
« on: January 12, 2020, 09:22:10 am »
EDIT : Update, Noopy took close up photo shoots at this chip and the one at ST-Link V2 clone, at post #134



I was given by a friend, two Bluepill boards, he said it was cheap about 2 bucks each.  :palm:

Judging at the price, its a fake STM32 right ?  :-//

PS : Also watch the supposed to be "RESET" label.  :palm:
« Last Edit: March 01, 2020, 08:54:32 am by BravoV »
 

Offline I wanted a rude username

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: au
  • ... but this username is also acceptable.
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #1 on: January 12, 2020, 10:33:35 am »
The ST-Link utility can query the chip. Check what it says.

The cheap Blue Pills used to be genuine until someone started remarking STM32s that have half the RAM/flash, and whatever other substitutions they might be performing these days. There's probably overlap in the prices between real and fake.
 
The following users thanked this post: BravoV, jstjep00

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #2 on: January 12, 2020, 12:55:25 pm »
I was given by a friend, two Bluepill boards, he said it was cheap about 2 bucks each.  :palm:

Judging at the price, its a fake STM32 right ?  :-//

PS : Also watch the supposed to be "RESET" label.  :palm:

It may not be fake, I suspect many are genuine .... genuine recycled e-waste, but if it works, who cares ?

Kinda like a genuine Fake Gucci Handbag, only insist on the best !

You are welcome to download my bootable usb binary that will enable you to obtain the ID and test to see if it has a HIDDEN extra 64kB of Flash (128kB total).
https://mecrisp-stellaris-folkdoc.sourceforge.io/stm32f103c8-diags.html for the details and a binary under 64kB so that ST-Link will flash it.
 
The following users thanked this post: BravoV, Ribster, thm_w

Online BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #3 on: January 12, 2020, 01:05:46 pm »
Thanks for the replies guys.  :-+

A STM32 noob here, infact those are the 1st STM32 in the house  :-[

Noob question, can I use that ST-LINK to upload firmware thru the USB ?

I use Win7 x64 btw.

Offline GromBeestje

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: nl
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #4 on: January 12, 2020, 01:16:56 pm »
I have been trying to get some Blue Pills with the CS32 chip on it, but I actually got the real thing. Furthermore they even had the correct value for R10 mounted.
To tell the difference, connect to them using a JTAG probe (not SWD) and scan the bus.
An ST part will say

Info : JTAG tap: auto0.tap tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: auto1.tap tap/device found: 0x16410041 (mfg: 0x020 (STMicroelectronics), part: 0x6410, ver: 0x1)

An CSK part will say

Info : JTAG tap: auto0.tap tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: auto1.tap tap/device found: 0x16410041 (mfg: 0x020 (STMicroelectronics), part: 0x6410, ver: 0x1)


But about US$ 2 seems to be the price these boards go by these days. Also keep in mind the cheaper offers often have a shipping fee, while the slightly more expensive ones offer free shipping.

When I order STM32F103C8T6 at LCSC.com, in large quantities the price drops to about US$ 1, so when these are mass produced, it sounds possible to use the real thing.
 

Offline I wanted a rude username

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: au
  • ... but this username is also acceptable.
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #5 on: January 12, 2020, 09:48:58 pm »
can I use that ST-LINK to upload firmware thru the USB ?

If the Blue Pill has the STM32duino bootloader on it, you can program it through the USB directly from Windows. Otherwise, you connect the ST-Link to that 90° programming header on the opposite end of the board.

At the ultra-low price point, it's quite likely the chip hasn't had the bootloader flashed on.
 

Online BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #6 on: January 13, 2020, 02:15:27 am »
Ordered ST-Link Mini V2 Programmer.

Offline skoehler

  • Contributor
  • Posts: 24
  • Country: de
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #7 on: January 13, 2020, 02:56:42 am »
I have that exact model, but with RESET spelled correctly.

What has happened in the past is that they use the STMF103C8 instead of the STMF103CB in cheap ST Link clones. The thing is, that the C8 has half the flash compared to the CB. The proper ST Link on Nucleo boards uses a CB chip with 128KB flash. But without much effort, double the whole 128KB can be used, even if the chip is labeled C8. The flash seems to work just fine in many many cases. Background is, that ST probably produces only one chip.

Yours is a F103C8 to begin with. I don't think that there's any false advertising going on. Check what the ST Link utility knows about the chip.

As far as I know, there are no fake ST chips. The Chinese simply use cheaper chips with half the flash. They don't even bother relabeling them.
 

Offline I wanted a rude username

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: au
  • ... but this username is also acceptable.
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #8 on: January 13, 2020, 03:17:01 am »
As far as I know, there are no fake ST chips. The Chinese simply use cheaper chips with half the flash. They don't even bother relabeling them.

Sadly, that is not correct. The counterfeiters do use chips with half the flash ... half being 32 KiB (and 10 KiB RAM). Basically STM32F103C6 remarked as STM32F103C8. This is well documented on the forums. I have a few from TaoBao.

https://embeddedtronicsblog.wordpress.com/2018/12/29/fake-stm32-blue-pill-boards/
 
The following users thanked this post: thm_w

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8240
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #9 on: January 13, 2020, 03:19:07 am »
What has happened in the past is that they use the STMF103C8 instead of the STMF103CB in cheap ST Link clones.
The digit 8 vs the letter B ? That's a horrible choice of part naming...
 

Online BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #10 on: January 13, 2020, 03:21:36 am »
What interesting in the label is :

At mine, the "F" character is on the 1st line right after the STM32

STM32F
103C8T6


While others from internet, most are the "F" are placed at 2nd line :

STM32
F103C8T6


 :-//

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6272
  • Country: ca
  • Non-expert
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #11 on: January 13, 2020, 10:32:10 pm »
I have been trying to get some Blue Pills with the CS32 chip on it, but I actually got the real thing. Furthermore they even had the correct value for R10 mounted.

There are some on alix where the pictures show CS32 chip, and the reviewers show the same, where I can see the IC: https://www.aliexpress.com/item/32525208361.html
But who knows what will show up..

Quote
When I order STM32F103C8T6 at LCSC.com, in large quantities the price drops to about US$ 1, so when these are mass produced, it sounds possible to use the real thing.

I agree, I haven't seen any evidence that if you get a chip that *has the right chip ID* ie has 128kB of flash, that it is counterfeit. So its easy enough for us here to test, although some other people might be fooled if it came with a GD or CS32 and never used >64kB.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Online BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #12 on: January 14, 2020, 11:44:22 am »
Ok, connected & fired up ST-Link, attached below the result.

So its genuine ?  :-//

Also tested using techman-001's STM32F103C8 Diagnostics  :-+ , it has 128KB flash, result -> HERE
« Last Edit: January 14, 2020, 12:17:16 pm by BravoV »
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #13 on: January 14, 2020, 01:22:23 pm »
Ok, connected & fired up ST-Link, attached below the result.

So its genuine ?  :-//

Also tested using techman-001's STM32F103C8 Diagnostics  :-+ , it has 128KB flash, result -> HERE

It's genuine all right. I replied to your link above with details.

It's a genuine CKS32F103C8T6, which is a Chinese Clone of the STM32F103CB as I understand it.

The clue to it being a CKS32F103C8T6 is that the "lot numbers' are in hexadecimal, unlike genuine STM32F103Cx's.
 
The following users thanked this post: thm_w, I wanted a rude username, minhaj.sixbyte

Online BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #14 on: January 14, 2020, 03:10:19 pm »
It's genuine all right. I replied to your link above with details.

It's a genuine CKS32F103C8T6, which is a Chinese Clone of the STM32F103CB as I understand it.

The clue to it being a CKS32F103C8T6 is that the "lot numbers' are in hexadecimal, unlike genuine STM32F103Cx's.

LOL , yeah right.  >:D


And you know whats funny ?

The new cheap ST-Link 2 I bought just to program this BluePill, opened it up, lo & behold, a genuine CKS.  :-DD

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #15 on: January 15, 2020, 12:40:05 am »
It's genuine all right. I replied to your link above with details.

It's a genuine CKS32F103C8T6, which is a Chinese Clone of the STM32F103CB as I understand it.

The clue to it being a CKS32F103C8T6 is that the "lot numbers' are in hexadecimal, unlike genuine STM32F103Cx's.

LOL , yeah right.  >:D


And you know whats funny ?

The new cheap ST-Link 2 I bought just to program this BluePill, opened it up, lo & behold, a genuine CKS.  :-DD

Excellent pictures! I guess this is proof that this "STM32F103C8T6" is in fact fake, being a relabeled CKS32F103C8T6. Your testing this chip with my "STM32F103C8 Diagnostics" binary also proved it has a fully working second 64kB Flash, giving 128kB as indicated by the chips "Flash Size Register"

A genuine STM32F103C8T6 will always indicate it has only 64kB flash in the chips "Flash Size Register", even if it has 128kB of flash. This means programs like your ST-Link will show it as only having 64kB Flash and will refuse to flash the second "hidden" 64kB block unless the ST-Link configuration is modified.

Now the STM32F103CBT6 and the CKS32F103C8T6 are not identical with the CKS throwing up a USB ID error such as :
"Warn : UNEXPECTED idcode: 0x2ba01477 Error: expected 1 of 1: 0x1ba01477" on GDB etc and requiring config file changes before it will work.

see: https://www.eevblog.com/forum/microcontrollers/issue-with-chinese-blue-pill-cks32f103c8t6/msg2767816/#msg2767816

Interesting information about the cheap ST-Link 2, I wonder if just runs the STM ST-Link 2 binary ?

Note that your Windows STM32 ST-LINK Utility picture in one of your previous posts in this thread  reports this chip as a "STM32F10xx Medium-density", meaning it can't tell that the chip is in fact a CKS32F103C8T6.

My free "STM32F103C8 Diagnostics" binary allows a deeper investigation and conclusion of whats in a Blue Pill, especially with feedback like yours  :-+

The Blue Pill story is certainly one of intrigue, of secret deals in low places and the sophistication of the Chinese "fake" industry. I wonder if someone will write a book about it one day ?

 :popcorn:
 

Online BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #16 on: January 15, 2020, 02:45:21 am »
Excellent pictures! I guess this is proof that this "STM32F103C8T6" is in fact fake, being a relabeled CKS32F103C8T6. Your testing this chip with my "STM32F103C8 Diagnostics" binary also proved it has a fully working second 64kB Flash, giving 128kB as indicated by the chips "Flash Size Register"

A genuine STM32F103C8T6 will always indicate it has only 64kB flash in the chips "Flash Size Register", even if it has 128kB of flash. This means programs like your ST-Link will show it as only having 64kB Flash and will refuse to flash the second "hidden" 64kB block unless the ST-Link configuration is modified.

Thanks, I guess its now beyond doubt that my Bluepill boards have the CKS32F103C8T6 isn't it ?

Regarding the laser marking on the chip, it looks pretty convincing, at least to me, also remember the "F" character position, its just weird compared to many that I've seen on the net.  :-//


Now the STM32F103CBT6 and the CKS32F103C8T6 are not identical with the CKS throwing up a USB ID error such as :
"Warn : UNEXPECTED idcode: 0x2ba01477 Error: expected 1 of 1: 0x1ba01477" on GDB etc and requiring config file changes before it will work.

see: https://www.eevblog.com/forum/microcontrollers/issue-with-chinese-blue-pill-cks32f103c8t6/msg2767816/#msg2767816

Sorry, just tried to install a freshly downloaded STM32CubeIDE 1.2.0 Windows, it gives me error during the installation, and I have no interest to pursue further.


Interesting information about the cheap ST-Link 2, I wonder if just runs the STM ST-Link 2 binary ?

Note that your Windows STM32 ST-LINK Utility picture in one of your previous posts in this thread  reports this chip as a "STM32F10xx Medium-density", meaning it can't tell that the chip is in fact a CKS32F103C8T6.

What do you mean by that ? See the attached below, screen shots of the ST-Link Utility when upgrading the dongle firmware, its the latest that I downloaded few days ago.

This cheap ST-Link V2 dongle can be upgraded just fine, no problem what so ever. I assume the latest ST-Link firmware was downloaded straight from ST's host by the program.



My free "STM32F103C8 Diagnostics" binary allows a deeper investigation and conclusion of whats in a Blue Pill, especially with feedback like yours  :-+

Infact, its your fault.  ;D

I have zero experience in STM32, when visiting, I briefly brought up your discovery with my friend, and then he suddenly gave me this two boards, then here I am now.  :-DD


The Blue Pill story is certainly one of intrigue, of secret deals in low places and the sophistication of the Chinese "fake" industry. I wonder if someone will write a book about it one day ?

I guess this will be drowned into the abyss and forgotten by time.

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #17 on: January 15, 2020, 04:24:54 am »
Excellent pictures! I guess this is proof that this "STM32F103C8T6" is in fact fake, being a relabeled CKS32F103C8T6. Your testing this chip with my "STM32F103C8 Diagnostics" binary also proved it has a fully working second 64kB Flash, giving 128kB as indicated by the chips "Flash Size Register"

A genuine STM32F103C8T6 will always indicate it has only 64kB flash in the chips "Flash Size Register", even if it has 128kB of flash. This means programs like your ST-Link will show it as only having 64kB Flash and will refuse to flash the second "hidden" 64kB block unless the ST-Link configuration is modified.

Thanks, I guess its now beyond doubt that my Bluepill boards have the CKS32F103C8T6 isn't it ?

Regarding the laser marking on the chip, it looks pretty convincing, at least to me, also remember the "F" character position, its just weird compared to many that I've seen on the net.  :-//


Now the STM32F103CBT6 and the CKS32F103C8T6 are not identical with the CKS throwing up a USB ID error such as :
"Warn : UNEXPECTED idcode: 0x2ba01477 Error: expected 1 of 1: 0x1ba01477" on GDB etc and requiring config file changes before it will work.

see: https://www.eevblog.com/forum/microcontrollers/issue-with-chinese-blue-pill-cks32f103c8t6/msg2767816/#msg2767816

Sorry, just tried to install a freshly downloaded STM32CubeIDE 1.2.0 Windows, it gives me error during the installation, and I have no interest to pursue further.


Interesting information about the cheap ST-Link 2, I wonder if just runs the STM ST-Link 2 binary ?

Note that your Windows STM32 ST-LINK Utility picture in one of your previous posts in this thread  reports this chip as a "STM32F10xx Medium-density", meaning it can't tell that the chip is in fact a CKS32F103C8T6.

What do you mean by that ? See the attached below, screen shots of the ST-Link Utility when upgrading the dongle firmware, its the latest that I downloaded few days ago.

This cheap ST-Link V2 dongle can be upgraded just fine, no problem what so ever. I assume the latest ST-Link firmware was downloaded straight from ST's host by the program.



My free "STM32F103C8 Diagnostics" binary allows a deeper investigation and conclusion of whats in a Blue Pill, especially with feedback like yours  :-+

Infact, its your fault.  ;D

I have zero experience in STM32, when visiting, I briefly brought up your discovery with my friend, and then he suddenly gave me this two boards, then here I am now.  :-DD

The Blue Pill story is certainly one of intrigue, of secret deals in low places and the sophistication of the Chinese "fake" industry. I wonder if someone will write a book about it one day ?

I guess this will be drowned into the abyss and forgotten by time.

Beyond doubt ? only until some logical poster with contrary proof comes along :)

Personally I think your chip is a  CKS32F103C8T6 based on the following.
1) STM32F103C8 chips *always* give their flash size as 64kB, NEVER 128kB like yours
2) The LOT numbers are hexadecimal on your chip, STM only use decimal LOT numbers.
3) The Die number is very close to a known CKS32F103C8T6 data in my collection.

We could do with a correctly positioned, clear pic of that chips marking for future reference, if you have the time. The pic you have supplied is pretty good tho and serves as a example of what fake markings look like in this case.

Regarding ST-Link V2, what I meant was that it would seem that the STM ST-Link V2 binary doesn't check for fake chips, perhaps they have no way of telling, don't care or haven't got around to it yet ?

Any self respecting manufacturer would block updates to fake chips with a big fat "FAKE DETECTED" and just stop the update. Note: (just in case STM are reading here), they would NOT try and BRICK the chip like FTTDI stupidly did years ago when they discovered Chinese clones of their chips. They have been universally reviled for that ever since, with a suspected massive loss of market share to their competition.

You have no interest installing STM32CubeIDE 1.2.0 for Windows ? ... well neither do I, being a Forth user :)

However, those boards are in fact pretty useful and the chips are quite fast, running at 72MHz as they do, have tons of peripherals and even USB.

They aren't recycled STM32's they're brand new fake STM32's on boards costing under $2!

What's not to love apart from the ugly, ugly STM32F10x GPIO register design ?

Code: [Select]
gpioa.
GPIOA_CRL (read-write) $44444AA8
3|3|2|2|2|2|2|2|2|2|2|2|1|1|1|1|1|1|1|1|1|1|
1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0
0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 0


GPIOA_CRH (read-write) $88854444
3|3|2|2|2|2|2|2|2|2|2|2|1|1|1|1|1|1|1|1|1|1|
1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0
1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0




 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4675
  • Country: nr
  • It's important to try new things..
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #18 on: January 15, 2020, 09:49:32 pm »
Excellent pictures! I guess this is proof that this "STM32F103C8T6" is in fact fake, being a relabeled CKS32F103C8T6. Your testing this chip with my "STM32F103C8 Diagnostics" binary also proved it has a fully working second 64kB Flash, giving 128kB as indicated by the chips "Flash Size Register"

A genuine STM32F103C8T6 will always indicate it has only 64kB flash in the chips "Flash Size Register", even if it has 128kB of flash. This means programs like your ST-Link will show it as only having 64kB Flash and will refuse to flash the second "hidden" 64kB block unless the ST-Link configuration is modified.

The BluePills with a genuine STM32F103C8T6 are on the market since ~2014. All have got 128kB of flash and the stlink can program entire 128kB straight - at least I've never heard about an issue with it.
After the genuine BPills the GD32F103 BPills came. GD is not a clone of STM32 - it is a different chip. GD32 BPills came in fall 2015.
Recently the new CKS32 BPills appear. It could be those CKS are rebranded GD32.
« Last Edit: January 15, 2020, 09:53:48 pm by imo »
 

Online BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #19 on: January 16, 2020, 03:45:30 am »
.... GD is not a clone of STM32 - it is a different chip.

What are the differences ? Mainly.

But its still pretending emulating as STM32 right ?  :-DD

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4391
  • Country: dk
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #20 on: January 16, 2020, 03:57:10 am »
.... GD is not a clone of STM32 - it is a different chip.

What are the differences ? Mainly.

But its still pretending emulating as STM32 right ?  :-DD


AMD is emulating Intel ?

 

Offline I wanted a rude username

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: au
  • ... but this username is also acceptable.
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #21 on: January 16, 2020, 04:05:45 am »
For starters, it won't overclock as high: 80 MHz versus 128 MHz for a genuine STM32.

There are presumably other differences. They were discussed on the STM32duino forum, but I'm not sure how much of that was archived.
 

Online BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #22 on: January 16, 2020, 05:02:45 am »
Thanks, beside they're given free, even I bought them my self, at that price level, I have nothing to complain.

Regarding the STM32 clones, as they had been for a while in many years, I guess they're also keep perfecting it, at least its comparable by STM32 official's specification, aren't they ?

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #23 on: January 16, 2020, 07:20:41 am »
Thanks, beside they're given free, even I bought them my self, at that price level, I have nothing to complain.

Regarding the STM32 clones, as they had been for a while in many years, I guess they're also keep perfecting it, at least its comparable by STM32 official's specification, aren't they ?

Excellent question, who really knows where the compatibility begins and ends ?

One indicator that the CKS32F103C8T6 must be compatible with the STM32F10x is your Chinese SWD programmer, which runs the official STM ST-Link V2 firmware. That means the USB and GPIO peripherals must be compatible at a minimum.

For a hobbyist however, is the cheap price of $2 for a clone worth the possible months and years they may spend working thru development problems that later resolve to a incompatibility issue ?

My very first STM32F103CB board was a Olimex P103, it cost about $50 but pins are gold plated, the chip is a brand new genuine STM32F103CB with 128kB. The board has a prototype area, rs232 and CAN connector etc. It's a really nice board.

https://mecrisp-stellaris-folkdoc.sourceforge.io/stm32-boards.html?highlight=p103#olimex-p103-board

Ok, It was $48 more than a Blue Pill, but I've never had any issues or doubts about it over the last 7 years.

What is peace of mind worth when developing ? As if the STM32F103 isn't complex enough without worrying about clone issues being the source of your problems ?

And let's not forget that the *genuine* STM32F10x had enough bugs and errata all by itself to cause plenty of sleepless nights for developers ?

You got your Blue Pills for free, and that's definitely the right price. If you need a 'cat feeder', an 'ice sculpture light controller' or anything that's already developed and has a 'library' that works, I say use them.

On the other hand if you want to make something new and original, but it must be cheap, it may be worth checking out Chinese home grown boards such as the 'longan nano' with a RISC-V chip. They're new and exciting, and cheap :)

https://mecrisp-stellaris-folkdoc.sourceforge.io/gd32vf103.html

 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #24 on: January 16, 2020, 09:12:03 am »
Excellent pictures! I guess this is proof that this "STM32F103C8T6" is in fact fake, being a relabeled CKS32F103C8T6. Your testing this chip with my "STM32F103C8 Diagnostics" binary also proved it has a fully working second 64kB Flash, giving 128kB as indicated by the chips "Flash Size Register"

A genuine STM32F103C8T6 will always indicate it has only 64kB flash in the chips "Flash Size Register", even if it has 128kB of flash. This means programs like your ST-Link will show it as only having 64kB Flash and will refuse to flash the second "hidden" 64kB block unless the ST-Link configuration is modified.

The BluePills with a genuine STM32F103C8T6 are on the market since ~2014. All have got 128kB of flash and the stlink can program entire 128kB straight - at least I've never heard about an issue with it.
After the genuine BPills the GD32F103 BPills came. GD is not a clone of STM32 - it is a different chip. GD32 BPills came in fall 2015.
Recently the new CKS32 BPills appear. It could be those CKS are rebranded GD32.

The official STM datasheet shows that the STM32F103C8 has 64kB of Flash as you can see below. Can you point to another official STM document which states otherwise ?


The fact that my 10 tested STM32F103C8's had a second hidden 64kB block doesn't alter the STM spec above because any flashing software must check the MCU internal "flash-size-register" first, will read that the STM32F103C8 has only 64kB and ignore that second block, it doesn't have any other choice.

Reading the MCU "flash-size-register" first is essential for a few reasons one of which is the MCU will throw an exception if a program attempts to do anything to Flash that's not actually there.

My St-Link would program any size image up to 64kB on the STM32F103C8. If the Image was 100kB, it stopped at 64kB and threw an error as expected.

St-Link reads the MCU "flash-size-register" and acts accordingly as it must.

On My Olimex-P103 which has a STM32F103CB with 128kB as shown in the Factory Datasheet above, St-Link would program a 100kB image without complaint because the MCU "flash-size-register" indicates the chip has 128kB of Flash.

This is how it works, it's how it's designed and my "STM32F103C8 Diagnostics" bootable binary (under 64kB) will run on any STM32F103 and actually read what's in the MCU "flash-size-register". https://mecrisp-stellaris-folkdoc.sourceforge.io/stm32f103c8-diags.html


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf