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

0 Members and 1 Guest are viewing this topic.

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #25 on: January 16, 2020, 10:32:56 pm »
St-Link will flash full 128KB no problem, just use something other than ST GUI program, like openocd with custom config

https://web.archive.org/web/20190327110931/http://wiki.stm32duino.com/index.php?title=Blue_Pill#128_KB_flash_on_C8_version
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline skoehler

  • Contributor
  • Posts: 24
  • Country: de
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #26 on: January 17, 2020, 02:32:41 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/
Fortunately, the blue pills that I ordered from china also have device ID 0x410 (medium density, 64kb flash). I just tested them with ST-Link utility.
 

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 #27 on: January 17, 2020, 08:49:56 am »
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 re-branded GD32.

You raise some interesting points ...

From https://smdprutser.nl/blog/stm32f103-vs-gd32f103/
----------------------------------------------------------------------------------
The GD32F103C8, manufactured by Gigadevice, has similar specifications and thus many people think the chip is a cloned version of the STM32 part. The chip appears to be the same from a programmers point of view as almost all registers and peripherals are the same. Major differences are the execution speed and flash size. The chip is capable of running a much higher clock frequency (108MHz) and have less wait states for flashrom then the ST counterpart. The size of the flash memory goes up to 3076KB, compared to the 1024KB ST offers.

The differences can be explained by the decapping pictures (done by Zeptobars). The chip appears to consist of two dies: one microcontroller die and a separate flash die. They seem to use just one large single design and a varying size flash chip to serve the whole GD32F103 range. On the controller die there is 128KB SRAM caching the flashrom. This explains the 0 wait states for flash access. This is a similar way the ESP8266 runs (albeit the flash is user replaceable :)). Not very surprising as Gigadevice is a big Chinese flash company. Some tweaks to silicon will allow a higher clockspeed (108MHz) and some people report it being 50% faster then the ST part.

Sounds to good to be true! Not very much is found on the internet about this chip, except some people report that not everything is working exactly the same as the STM32
------------------------------------------------------------------------------------

I have the GD32F103C8 datasheet, that's easy to find.

But no SVD anywhere, does anyone have a  GD32F103.SVD or a link ?  (to do  comparisons of peripherals, registers and bitfields with the STM32F103).

Re CKS32F103C8T6:
I can't find any info on the CKS32F103C8T6 anywhere on the net, and even "CKS" doesn't list this chip in their products section.

http://www.cksic.com/en/about/217.html
"China Key System Co., Ltd. (CKS) is a Chinesetechnology company headquartered in Wuxi, Jiangsu province, that designs,develops and manufactures very-large-scale integrated circuits. It was founded in 2008."

Perhaps the "CKS32F103C8T6" is a re-branded "GD32F103C8" as you say ?





« Last Edit: January 17, 2020, 09:52:51 am by techman-001 »
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4747
  • Country: nr
  • It's important to try new things..
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #28 on: January 17, 2020, 09:27:18 am »
GD32F - it has been discussed many times here, afaik. The GD32F is a flashless chip - no flash memory on the cortex chip.
It has got a sram instead of the flash. Upon reset it moves the stored binary from an external 8pin SPI flash (glued on the top of the cortex chip inside the package) to its internal sram and it executes your program off that sram. Therefore it is faster than the stm32 - no flash wait states.
During programming the flash of the GD32 the program gets stored into that external SPI flash.

PS: flash wait states - the problem with Flash memories is they are slow. The max read speed is something like 30MHz. That is a big problem with modern fast mcu devices (80-600MHz clock). Therefore you have to add several "wait states" while reading from the flash. And you read from the program flash all the time as your code is executed.

STM added in >F4 so called ART accelerator - a mechanism to eliminate the negative effect of the slow flash - a 128bit buffering of the flash data - it helps a bit, but still it is not "zero wait states".

The elegant variant is a flash less chip - the sram memories a fully compatible with other logic on the chip, thus no wait states are needed and you read program in a single clock.
« Last Edit: January 17, 2020, 10:00:23 am by imo »
 

Offline BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #29 on: January 17, 2020, 10:00:00 am »
GD32F - it has been discussed many times here, afaik. The GD32F is a flashless chip - no flash memory on the cortex chip.
It has got a sram instead of the flash. Upon reset it moves the stored binary from an external 8pin SPI flash (glued on the top of the cortex chip inside the package) to its internal sram and it executes your program off that sram. Therefore it is faster than the stm32 - no flash wait states.
During programming the flash of the GD32 the program gets stored into that external SPI flash.

Is there any way to sort of detect if its GD32F vs genuine STM32 by benchmark code maybe ? Especially on the SRAM vs internal flash ?

Online iMo

  • Super Contributor
  • ***
  • Posts: 4747
  • Country: nr
  • It's important to try new things..
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #30 on: January 17, 2020, 10:04:58 am »
See PS: in my above post.

You may benchmark it easily by running a code in a loop at a clock where the stm32 requires wait states - ie at 72MHz stm32F103 in BluePill needs 2 or 3 ws to be inserted.

The exec time of a loop with GD32 (at the same clock freq) should be much shorter than with the same code in stm32F103 at clocks > 24MHz.

StmF4xx and higher added the flash ART accelerator - so the exec time difference will be smaller.

You may identify the flashless mcu also by measuring the time it needs till the first instruction after the hw reset - ie GD32 needs some XX msecs after reset because it moves the xxx kB data from the external SPI flash into its sram.
« Last Edit: January 17, 2020, 10:17:55 am by imo »
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #31 on: January 17, 2020, 10:17:14 am »
So, the "fake" is better than the original?
The further a society drifts from truth, the more it will hate those who speak it.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4747
  • Country: nr
  • It's important to try new things..
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #32 on: January 17, 2020, 10:22:04 am »
Quote
So, the "fake" is better than the original?

GD is not a fake. It is a different CM3 MCU, binary and peripherally "compatible" with STM.

The GDs are indeed better in "speed" against STM (ie the cheapo GD32F oscilloscope project user atadarov posts here currently).

Of course the binary "compatibility" is still the question here, and the dead time after the hw reset is much longer with GD (no problem in most apps). Also modification of the flash content (if even possible) on "the fly" would be much slower with GD, imho.
« Last Edit: January 17, 2020, 11:27:28 am by imo »
 
The following users thanked this post: thm_w, GeorgeOfTheJungle

Online iMo

  • Super Contributor
  • ***
  • Posts: 4747
  • Country: nr
  • It's important to try new things..
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #33 on: January 17, 2020, 10:45:23 am »
You may write a short loop in asm toggling a pin, for example, and watch the period with an oscope.

Run STM32f103, GD32f103 and CSK32F103 at for example 128MHz clock, the HAL should set the required number of flash waitstates, something like 4ws with STM32f103 (0ws for 0..24MHz, +1ws for each 24MHz), and 0ws with GD for any clock.

PS: you may set manually the number of flash ws in the STM32 lower than required by HAL - called "overclocking" :)
I did in past with stm32F100 and 103/407.
0ws with F100 (max 48MHz) and 0+1ws/48MHz with F103 worked somehow as I can remember..

« Last Edit: January 17, 2020, 11:19:03 am by imo »
 

Offline BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #34 on: January 17, 2020, 11:25:02 am »
Well, my Bluepill boards are all yours guys, should you want to experiment with it with your codes, sorry, as I mentioned, zero STM32 experience here.  :'(
« Last Edit: January 17, 2020, 11:33:11 am by BravoV »
 

Online up8051

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: pl
 
The following users thanked this post: GeorgeOfTheJungle

Online iMo

  • Super Contributor
  • ***
  • Posts: 4747
  • Country: nr
  • It's important to try new things..
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #36 on: January 17, 2020, 01:00:38 pm »
People play with that 401/411 BPill already on www.stm32duino.com (the new forum) or mcu.selfip.com (also the new forum) :) .
Looks promising..
Supported by STM HAL core and stevestrong's github core.
« Last Edit: January 17, 2020, 01:04:37 pm by imo »
 

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 #37 on: January 17, 2020, 02:41:20 pm »
Maybe it's time to change the pills from blue to black  ;)
https://www.cnx-software.com/2019/12/24/stm32-black-pill-board-features-stm32f4-cortex-m4-mcu-optional-spi-flash/

In principle an excellent suggestion, the Cortex-m4 is far better in every way than the old STM32F103Cx, but at those prices what's to stop the same things happening all over again, i.e. re-badged poorly documented "compatible" Gigadevice MCU's or worse ?

It's the perfect bait and switch, make a few thousand boards with genuine STM32F4's as loss leaders then when the brandname is well known, quietly switch in the clones ... PROFIT!

I think there is only one way to be sure, if you must have a board, buy a  Nucleo or Olimex and get a guaranteed STM32 MCU or buy the chip only direct from a respected supplier such as arrow.com and put it in your own design ?
 
The following users thanked this post: SiliconWizard

Online iMo

  • Super Contributor
  • ***
  • Posts: 4747
  • Country: nr
  • It's important to try new things..
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #38 on: January 17, 2020, 07:42:10 pm »
If I were a young hobbyist with a limited budget, who wants to start with a 32bit MCUs, I would be pretty happy to get GD/CKS BluePills for $2 incl. postage.

That is the targeted audience for that kind of products. BluePills do not target corporate developers who want to land on Moon or Mars and their budgets are virtually unlimited.

On the other hand I would admit a single BluePill is capable enough to land you on the Moon - as we saw it 50y back. In case you targeted such an exercise I would be pretty confident STM may produce for you a radhard STM32F103C8 :)
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #39 on: January 17, 2020, 08:10:51 pm »
If I were a young hobbyist with a limited budget, who wants to start with a 32bit MCUs, I would be pretty happy to get GD/CKS BluePills for $2 incl. postage.

That is the targeted audience for that kind of products. BluePills do not target corporate developers who want to land on Moon or Mars and their budgets are virtually unlimited.

On the other hand I would admit a single BluePill is capable enough to land you on the Moon - as we saw it 50y back. In case you targeted such an exercise I would be pretty confident STM may produce for you a radhard STM32F103C8 :)

Yes, and, on top of that, as most people are going to buy the cheap blue pills you'll have it easier to get help off the inter webs, than with the olimexes. And although I say that, I've bought quite a few Olimexes in my life and never had a problem with them.

BTW, there was already an STM32F103 black pill before the Cortex M4 ones.
The further a society drifts from truth, the more it will hate those who speak it.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4413
  • Country: dk
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #40 on: January 17, 2020, 09:09:34 pm »
Maybe it's time to change the pills from blue to black  ;)
https://www.cnx-software.com/2019/12/24/stm32-black-pill-board-features-stm32f4-cortex-m4-mcu-optional-spi-flash/

In principle an excellent suggestion, the Cortex-m4 is far better in every way than the old STM32F103Cx, but at those prices what's to stop the same things happening all over again, i.e. re-badged poorly documented "compatible" Gigadevice MCU's or worse ?

It's the perfect bait and switch, make a few thousand boards with genuine STM32F4's as loss leaders then when the brandname is well known, quietly switch in the clones ... PROFIT!

yeh, price for 401/411 "Black Pill" on Ali $2.79/$3.96, STs budgetary price in qt 10000  $2.13/$2.79

 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #41 on: January 17, 2020, 09:22:56 pm »
People play with that 401/411 BPill already on www.stm32duino.com (the new forum) or mcu.selfip.com (also the new forum) :) .
Looks promising..
Supported by STM HAL core and stevestrong's github core.

stm32duino.com is back?!?! Cool! :-+

Quote
Hi stm32duino community,

after several month down, I'm pleased to announce that stm32duino.com forum is back and alive!

First, I want to thanks Roger Clark for all his wonderful work for the community since this site was created and also for his support and kindness.
The hosting is now managed by ST but the moderation will be done by the community.

The old forum contents can be found here:
https://web.archive.org/web/20190316170 ... duino.com/

due to GPRD it was not possible to restore it. :cry:

Enjoy!
The further a society drifts from truth, the more it will hate those who speak it.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4747
  • Country: nr
  • It's important to try new things..
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #42 on: January 17, 2020, 09:28:05 pm »
yeh, price for 401/411 "Black Pill" on Ali $2.79/$3.96, STs budgetary price in qt 10000  $2.13/$2.79
In the "oscilloscope asic" thread I wrote that a "list price" (or budgetary price) "means nothing" in the business. Happy you are showing that prices - it says "somebody" is getting the stm32f401/411 chips for a fraction of their budgetary price..  :D
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4413
  • Country: dk
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #43 on: January 17, 2020, 10:02:01 pm »
yeh, price for 401/411 "Black Pill" on Ali $2.79/$3.96, STs budgetary price in qt 10000  $2.13/$2.79
In the "oscilloscope asic" thread I wrote that a "list price" (or budgetary price) "means nothing" in the business. Happy you are showing that prices - it says "somebody" is getting the  chips for a fraction of their budgetary price..  :D

yeh the list price is not much more than "is it an expensive part?"

the same stm32f401/411 on digikey is ~$2.50@2500 ...
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4747
  • Country: nr
  • It's important to try new things..
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #44 on: January 17, 2020, 10:16:03 pm »
The BOM costs of the F401 BlueBlackPill board cannot be more that 50cents (provided the shipping is free). And the BOM list is not short..
« Last Edit: January 17, 2020, 10:17:45 pm by imo »
 

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 #45 on: January 18, 2020, 12:30:22 am »
yeh, price for 401/411 "Black Pill" on Ali $2.79/$3.96, STs budgetary price in qt 10000  $2.13/$2.79
In the "oscilloscope asic" thread I wrote that a "list price" (or budgetary price) "means nothing" in the business. Happy you are showing that prices - it says "somebody" is getting the stm32f401/411 chips for a fraction of their budgetary price..  :D

Or that they already have fake stm32f401/411 chips ?

*Pill users have been scammed so many times with cheap shoddy Chinese junk and fake chips yet still assume new *Pills will contain genuine parts. It boggles my mind.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4747
  • Country: nr
  • It's important to try new things..
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #46 on: January 18, 2020, 01:37:43 am »
*Pill users have been scammed so many times with cheap shoddy Chinese junk and fake chips yet still assume new *Pills will contain genuine parts. It boggles my mind.
Could you show me an *Pill user who ever got a board with fake stm32 chip, plz?
Could you show me a fake stm32 chip, plz?
« Last Edit: January 18, 2020, 01:40:59 am by imo »
 

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 #47 on: January 18, 2020, 03:19:11 am »
*Pill users have been scammed so many times with cheap shoddy Chinese junk and fake chips yet still assume new *Pills will contain genuine parts. It boggles my mind.
Could you show me an *Pill user who ever got a board with fake stm32 chip, plz?
Could you show me a fake stm32 chip, plz?

Of course, proof of both are in this one pic.

The photo shows a fake stm32 chip in a Blue Pill board, you can clearly see the labeling says "STM32F103C8T6" but this chip is not made by STM, therefore it's a fake.



The backstory is here for anyone interested:
https://www.eevblog.com/forum/microcontrollers/stm32f103c8-diagnostic-bootable-binary-freely-available/msg2871198/#msg2871198
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #48 on: January 18, 2020, 07:25:38 am »
What makes it "shoddy"?
 

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 #49 on: January 18, 2020, 10:36:25 am »
What makes it "shoddy"?

Items such as inadequately anchored USB connectors that snap off after a few uses, incorrect value USB resistor (Google “R10 Blue Pill” for more information), header pin coatings that go rusty and FAKE mcu's.

The name "Blue Pill" is the personification of "shoddy".

https://www.yourdictionary.com/shoddy
shoddy definition: The definition of shoddy is something immoral or sordid, or is something badly made. (adjective) Stealing from people who trust you is an example of shoddy behavior.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf