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

0 Members and 1 Guest are viewing this topic.

Offline Noopy

  • Frequent Contributor
  • **
  • Posts: 542
  • Country: de
    • Richis-Lab
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #175 on: April 02, 2020, 06:41:21 pm »

Hi all!


Thanks to GromBeestje I was able to add a GD32 to my collection: A GD32F103CBT6 and a GD32F101CBT6. They both look the same although the 101 has less RAM and no USB interface. Probably the 101 and the 103 are the same parts…


https://www.richis-lab.de/STM32_06.htm


It´s the interesting die-stack zeptobars already has decapped.




Very interesting: Since zeptobars has decapped the GD32F103CBT6 they apparently have reduced the die size of the flash memory!




Some dies get really dirty while glueing the dies together.


 :popcorn:
 
The following users thanked this post: BravoV, thm_w, blueskull, laneboysrc, soFPG, imo, techman-001

Offline GromBeestje

  • Regular Contributor
  • *
  • Posts: 158
  • Country: nl
  • AndrevS @ IRC
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #176 on: April 03, 2020, 09:22:16 am »
The GD101 checks though. When I flash a binary compiled for 20 KiB of RAM, it immediately hardfaults. Trying to enable USB doesn't trigger a hardfault but it just doesn't work.  So I guess, there is some hidden area in the flash containing the configuration. Setting the amount of memory, and selecting the enabled peripherals.  Kinda like the wounding Cypress uses in their PSoC4 series.
 

Offline Noopy

  • Frequent Contributor
  • **
  • Posts: 542
  • Country: de
    • Richis-Lab
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #177 on: April 03, 2020, 11:14:30 am »
I´m pretty sure the manufacturer can somehow configure the GD32.  :-+
It´s possible that the configuration is placed in the flash but it´s also possible that there are some fuse bits on the big die. Perhaps there are real fuses or some other one time programmable memory bits.

Offline GromBeestje

  • Regular Contributor
  • *
  • Posts: 158
  • Country: nl
  • AndrevS @ IRC
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #178 on: April 03, 2020, 12:13:30 pm »
Some articles how this is handled on the PSoC

http://www.dmitry.gr/?r=05.Projects&proj=23.%20PSoC4
http://www.dmitry.gr/?r=05.Projects&proj=24.%20PSoC4%20confidential

It has been speculated the GD32 copies the content from flash to some designated RAM area and start executing from there. So I'd imagine they've some bootrom that performs this task, as well as configure the available features. In some article, when the GD32 was hot, was wondered whether one could "unlock" this memory area to have some more RAM. However, after the initial burst of interest, there has been little written about this GD32.
 
The following users thanked this post: thm_w, Noopy

Offline imo

  • Super Contributor
  • ***
  • Posts: 2653
  • Country: 00
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #179 on: April 06, 2020, 03:01:05 pm »
Btw, there is the APM32F103 with simple memory mapped FPU inside (most probably add/sub/mult/div only). Their SDK shows the FPU is indeed real.
Mind it is CM3..

https://www.apexmic.com/en/newproduct/apm2/16

« Last Edit: April 06, 2020, 03:07:22 pm by imo »
 

Offline ale500

  • Frequent Contributor
  • **
  • Posts: 362
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #180 on: April 06, 2020, 03:02:59 pm »
Quote
Btw, there is the APM32F103 with simple memory mapped FPU inside (most probably add/sub/mult/div only). Their SDK shows the FPU is indeed real.
Mind it is CM3..

If this is true, it will be a hard sell:

Quote
Running power consumption: 340mA/MHz
 

Offline imo

  • Super Contributor
  • ***
  • Posts: 2653
  • Country: 00
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #181 on: April 06, 2020, 03:09:22 pm »
I will run it at 96mHz clock then..  :D
 

Offline Noopy

  • Frequent Contributor
  • **
  • Posts: 542
  • Country: de
    • Richis-Lab
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #182 on: April 07, 2020, 07:09:41 pm »
Today (with thanks to the GromBeestje) I have a MM32F103CBT6 for you:

https://richis-lab.de/STM32_07.htm






 :popcorn:

 
The following users thanked this post: BravoV, thm_w, GeorgeOfTheJungle, soFPG, techman-001

Offline GromBeestje

  • Regular Contributor
  • *
  • Posts: 158
  • Country: nl
  • AndrevS @ IRC
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #183 on: April 07, 2020, 07:52:59 pm »
Keep in mind, the MM32F103 is not compatible with STM32F103. It got some different RCC registers (I haven't compared the other peripherals yet). Furthermore it has a different Device ID, such that tools designed to work with STM32F103 (eg OpenOCD) cannot flash/debug it.  It seems there is support for it in SEGGER J-Link.  There are datasheets and reference manuals available, as well as peripheral libraries.
 

Offline Noopy

  • Frequent Contributor
  • **
  • Posts: 542
  • Country: de
    • Richis-Lab
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #184 on: April 08, 2020, 02:43:46 pm »
And one more:  BLM32F103CBT6


https://richis-lab.de/STM32_08.htm



 
The following users thanked this post: BravoV, thm_w, GeorgeOfTheJungle, soFPG, techman-001

Offline Noopy

  • Frequent Contributor
  • **
  • Posts: 542
  • Country: de
    • Richis-Lab
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #185 on: April 15, 2020, 07:26:32 pm »
I already had a STM32-fake containing a CKS32:
https://richis-lab.de/STM32_04.htm
Now I know what die is inside the second STM32-fake:
https://richis-lab.de/STM32_01.htm

It´s a Hangshun HK32:
https://www.richis-lab.de/STM32_09.htm





 :popcorn:


Credits to GromBeestje

 
The following users thanked this post: BravoV, thm_w, GeorgeOfTheJungle, GromBeestje, soFPG, techman-001

Offline Noopy

  • Frequent Contributor
  • **
  • Posts: 542
  • Country: de
    • Richis-Lab
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #186 on: April 21, 2020, 05:25:34 pm »
I have decapped a GD32VF103 but since it´s no more a real STM32-clone I have posted it here:

https://www.eevblog.com/forum/microcontrollers/risc-v-microcontrollers-from-gigadevice/msg3027160/#msg3027160

Credits to GromBeestje

Offline GromBeestje

  • Regular Contributor
  • *
  • Posts: 158
  • Country: nl
  • AndrevS @ IRC
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #187 on: April 21, 2020, 06:39:29 pm »
Thanks for the pictures Noopy.

Can I ask you something? If I understood correctly, you started decapping your first fake because you ran into some compatibility issues. What were these compatibility issues?
 

Offline Noopy

  • Frequent Contributor
  • **
  • Posts: 542
  • Country: de
    • Richis-Lab
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #188 on: April 21, 2020, 07:10:29 pm »
If I understood correctly, you started decapping your first fake because you ran into some compatibility issues. What were these compatibility issues?

No, I never worked with the STM32. I prefer analog electronics. Digital is ok but Software only if it´s absolutely necessary.  ;D
The first STM32, the bluepill-fake was sent to me by a member of the mikrocontroller.net: It came from Matthias D. (madias) who started the topic you know already. He had problems with the DMA Controller.

Offline Jul8

  • Newbie
  • Posts: 3
  • Country: de
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #189 on: April 24, 2020, 04:18:12 pm »
I've been playing around with the STM32F103 GD32F103 CS32F103 and APM32F103. I've written some code that can tell them apart.
How about the HK32F103? Would you add detection of the HK32F103 as well? :)
 

Offline jaromir

  • Supporter
  • ****
  • Posts: 296
  • Country: sk
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #190 on: April 24, 2020, 07:06:50 pm »


Does anybody know the figures in the silicon art?

It looks like STM32 families do have internal nicknames. Sometimes the nicknames do "leak to public" via various documents. For example STM32F103 seems to belong to "Piranha" family, mentioned for example here http://www.farnell.com/datasheets/1443552.pdf
That may explain the artwork.
If you happen to take a look at STM32F4xx internals, you'll probably find different artwork on it , as it belongs to "Manta" family, for example https://www.mouser.com/PCN/STMicroelectronics_8451.pdf

I wonder what other aquatic animals are hiding inside STM32 devices.
 
The following users thanked this post: thm_w, GeorgeOfTheJungle, newbrain, Noopy

Offline Noopy

  • Frequent Contributor
  • **
  • Posts: 542
  • Country: de
    • Richis-Lab
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #191 on: April 24, 2020, 08:04:23 pm »
It looks like STM32 families do have internal nicknames. Sometimes the nicknames do "leak to public" via various documents. For example STM32F103 seems to belong to "Piranha" family, mentioned for example here http://www.farnell.com/datasheets/1443552.pdf
That may explain the artwork.
If you happen to take a look at STM32F4xx internals, you'll probably find different artwork on it , as it belongs to "Manta" family, for example https://www.mouser.com/PCN/STMicroelectronics_8451.pdf

I wonder what other aquatic animals are hiding inside STM32 devices.

Very interesting! Sounds reasonable!  :-+
I agree with you, I should check some other variants.  :)


I have a new fake provided by GromBeestje:

https://www.richis-lab.de/STM32_04.htm

It came with an order of CK32.




The marking is different but still bad.




In the package I found another CKS32-die.  :-/O

 
The following users thanked this post: thm_w, GeorgeOfTheJungle, soFPG, techman-001

Offline GromBeestje

  • Regular Contributor
  • *
  • Posts: 158
  • Country: nl
  • AndrevS @ IRC
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #192 on: June 21, 2020, 02:21:32 pm »
I've been playing around with the STM32F103 GD32F103 CS32F103 and APM32F103. I've written some code that can tell them apart.
How about the HK32F103? Would you add detection of the HK32F103 as well? :)

I've added detection for the HK32F103, however, USB is not working on my HK32 board.
 
The following users thanked this post: Jul8

Offline profdc9

  • Regular Contributor
  • *
  • Posts: 200
  • Country: us
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #193 on: June 23, 2020, 02:59:53 am »
In case any of you get desperate for a real STM32F103CBT6 bluepill, I designed one and I just made it so it can be populated by JLCPCB's assembly service. You can find the gerbers at:

https://github.com/profdc9/STM32surface

It uses all basic and easy to obtain parts for the parts not available from JLCPCB, for example 6 mm buttons and USB B connectors.  You can put a STM32F303CCT6 on it if you want something better.  The kicad 3D image of the PCB is below.

Also, one of the reasons I designed my own is so I could lay it out better and make it more noise immune, and the ADC definitely seems to be somewhat less noisy with this board.

Dan

[attachimg=1]
« Last Edit: June 23, 2020, 03:01:57 am by profdc9 »
 
The following users thanked this post: thm_w, GeorgeOfTheJungle, josip, jlo, Renaud

Offline Jul8

  • Newbie
  • Posts: 3
  • Country: de
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #194 on: June 23, 2020, 09:15:30 am »
How about the HK32F103? Would you add detection of the HK32F103 as well? :)

I've added detection for the HK32F103, however, USB is not working on my HK32 board.
Thank you!  :)
 
The following users thanked this post: paf

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 1205
  • Country: nl
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #195 on: July 29, 2020, 11:59:44 am »
I just had a brainfart (good smelling variant) and did a search for the F103 on LCSC without the "STM", and they sell 7 different variants.

https://lcsc.com/search?q=32F103C8T6
Prefix:      Mgf:   
CSK         CSK      
HK         HK
APM         Apexmic
BLM         Shenzhen Better Life Elec
GD         GigaDevices
MM         MindMotion Microelectronics      
ST         STMicroelectronics

The MM part was labeled as a 5V part which is very unusual for Cortex M3, but the datasheet seems to confirm it:
http://www.mindmotion.com.cn/userfiles/images/MM32F103XiLieWenDang/DS_MM32F103xx_o_V1.13_EN.pdf

For me this probably the end of buying "Blue Pill" boards from China / Ali.
In the latest batch I had to change the ID number to get them programmed at all, and a test program of GRBL for STM32 does not save it's settings in Flash.
I have no interest in figuring out the incompatibilities between those different variants, and Ali Sellers relabeling everything as "STM32" makes it impossible to know what you buy.

Quite a shame, because I liked the form factor a lot. They fit on Breadboads and on matrix board, and I used to solder in the thin round pins instead of the thick square pins, so they can be used in much lower profile sockets.
I also liked the very small ST-Link V2 programmers with Aluminum housing and pinout labeled on the outside.

I never liked the bulky Discovery boards and their on board programmers.
If some western manufacturer sold the "Blue Pill" boards for somewhere around EUR5 I would buy them.

From what I've read, LCSC should be a trustworthy seller. The STM variant is their most expensive, (and slowest, least peripherals probably) but I really don't care about that. Just that it works according to the datasheet, and you don't with those re-labled uC's on the Pills.

STM is USD 1.5 (10 up) from LCSC, while if you look at Octopart, no western seller has them below USD 4 (10 up).
 

Offline Noopy

  • Frequent Contributor
  • **
  • Posts: 542
  • Country: de
    • Richis-Lab
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #196 on: July 29, 2020, 12:56:10 pm »
I just had a brainfart (good smelling variant) and did a search for the F103 on LCSC without the "STM", and they sell 7 different variants.

https://lcsc.com/search?q=32F103C8T6
Prefix:      Mgf:   
CSK         CSK      
HK         HK
APM         Apexmic
BLM         Shenzhen Better Life Elec
GD         GigaDevices
MM         MindMotion Microelectronics      
ST         STMicroelectronics

Affirmative!
Had them all:
https://www.richis-lab.de/STM32.htm
 :-+

Offline rhodges

  • Regular Contributor
  • *
  • Posts: 211
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #197 on: July 29, 2020, 02:20:43 pm »
From what I've read, LCSC should be a trustworthy seller.
...
STM is USD 1.5 (10 up) from LCSC, while if you look at Octopart, no western seller has them below USD 4 (10 up)
Any opinions on JLCPCB? Their parts library gives $1.18 for STM32F103C8T6, quantity 30, and it is a "basic part".
Currently developing STM8 and STM32. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1232
  • Country: cn
  • RF Engineer @ OwOComm. Discord: スメグマ#2236
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #198 on: July 29, 2020, 02:33:51 pm »
I haven't bought any bluepills since 2017. Designing a PCB is so trivial that I don't fuck with arduinos or *pills anymore and simply drop a MCU into any design, even MCUs I've never used before.

If you really insist, it'd probably take 30 minutes to design a compatible blue pill PCB with passives all on the bottom side, so it can be easily assembled by JLC SMT. Then you could easily product a batch to sell.
Discord: スメグマ#2236
Email: OwOwOwOwO123@outlook.com
GitHub: gabriel-tenma-white
 

Offline profdc9

  • Regular Contributor
  • *
  • Posts: 200
  • Country: us
Re: Cheap Bluepill, very likely it has fake STM32 right ?
« Reply #199 on: July 30, 2020, 04:32:41 pm »
You can get my Bluepill design made at JLCPCB with SMT assembly:

https://github.com/profdc9/STM32surface

This includes BOM and placement files as xlsx format.  It uses all basic parts from JLC PCB.  You can get five made for about $28.

Dan
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf