CS32F103C8T6... A new clone?

Post here first, or if you can't find a relevant section!
Post Reply
User avatar
RogerClark
Posts: 8416
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: CS32F103C8T6... A new clone?

Post by RogerClark » Wed Feb 06, 2019 6:29 am

Yep.

I've No idea whether WAVGAT actually make them, or just resell them.

I just retested the internal Serial bootloader and it seems to work OK.

I'm not sure why it wasn't working when I tried it earlier today.

Unfortunately I don't have any projects where I can simply plug in a BP to test other things, because the projects I made last year with custom PCB's use the Maple Mini.

So I'd need to use a breadboard to wire up some test configurations.

User avatar
BennehBoy
Posts: 886
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: CS32F103C8T6... A new clone?

Post by BennehBoy » Wed Feb 06, 2019 6:53 am

RogerClark wrote:
Tue Feb 05, 2019 11:05 pm
BennehBoy wrote:
Tue Feb 05, 2019 10:58 pm
I've got about 7 items 'in transit' :/
Do you mean 7 of these boards or 7 different items ?
7 different items. I've steered clear of ordering one of these.
-------------------------------------
https://github.com/BennehBoy

User avatar
RogerClark
Posts: 8416
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: CS32F103C8T6... A new clone?

Post by RogerClark » Wed Feb 06, 2019 7:15 am

OK.

I just checked, and I ordered these on 22nd Jan via ePacket, and they arrived today.
So thats 12 days, and included part of their Lunar New Year

Not too bad, but I did pay several dollars extra for ePacket

User avatar
zoomx
Posts: 835
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: CS32F103C8T6... A new clone?

Post by zoomx » Wed Feb 06, 2019 1:31 pm

Surfing on Aliexpress I found some bluepills but the photo has the chip name erased with black
examples
https://www.aliexpress.com/item/STM32F1 ... 48071.html
description is empty
https://www.aliexpress.com/item/1-pices ... 12819.html
Description says that there is an STM32F103C8T6 but a customer says that it's a clone.
This one
https://www.aliexpress.com/item/STM32F1 ... 63343.html seems a black pill, seems to be made from the same people (ZucZug) but photos shows the STM32 chip I didn't find any feedback that says that this chip is a clone and one customer was able to flash Roger's bootloader.
Last edited by zoomx on Thu Feb 07, 2019 11:32 am, edited 1 time in total.

User avatar
RogerClark
Posts: 8416
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: CS32F103C8T6... A new clone?

Post by RogerClark » Wed Feb 06, 2019 8:27 pm

Looks like the same board

The reset button is thinner and rectangular rather than square, it looks cheaper than the button on the STM32 BPs

The bootloader seems to work fine with these chips, but I have not tested any peripherals

They seem to have 128k flash, so in some respects they are better than the STM32F103C6 rebadged to make them look like a C8

I have not done any speed testing, to see if they are like the GD32 and use shadow RAM, but they probably don’t

User avatar
Squonk42
Posts: 551
Joined: Thu Dec 29, 2016 9:25 am
Location: Bordeaux, France
Contact:

Re: CS32F103C8T6... A new clone?

Post by Squonk42 » Wed Feb 06, 2019 8:39 pm

It looks like the CS32 are really STM32 silicon clones this time, unlike the GD32. I wonder if they are authorized copies or not.

ag123
Posts: 1321
Joined: Thu Jul 21, 2016 4:24 pm

Re: CS32F103C8T6... A new clone?

Post by ag123 » Thu Feb 07, 2019 5:43 am

i noted that the datasheet for cs32f103c8t6 mentioned as either 64k flash or 128k flash
http://www.ckscup.com/upload/CKS%20CS32 ... %86%8C.pdf
(too large for google translate can't post the translate link)
it is rather interesting that they provided 128k for the c8 variant, i'd guess as it become an 'expected feature'
they provided that flash bump so as not to disappoint fans
i'd guess it is necessary to flash something above 64k to confirm if after all there is flash sitting there
:lol:
btw it seem quite possible that these are pirated, but it'd be a little strange as i tend to think the masks and frontend processes are not likely in china but perhaps there are plants in some other countries in which they are pirated
reverse engineering is quite possible but that effort would likely be huge and would possibly cost lots to do just that.
it would more likely to be a reverse engineered product if there are some additional features that is hardware based
but for now it doesn't seem so other than an 'unexpected idcode' while flashing as mentioned in eevblog forum
https://www.eevblog.com/forum/beginners ... ill-clone/
the thing is is that 'idcode' hardware or software, if it is software or firmware then even that 'idcode' glitch would not tell if after all the chip is reverse engineered or simply that the masks (and processes) is pirated
Last edited by ag123 on Thu Feb 07, 2019 6:32 am, edited 2 times in total.

User avatar
RogerClark
Posts: 8416
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: CS32F103C8T6... A new clone?

Post by RogerClark » Thu Feb 07, 2019 6:15 am

I only tested one of my boards, but its a C8 and definitely has 128k, as I've written and verified a random binary file to the board.

PS. Initially I made a 128k data file with 0xDEAD 0XBEEF repeated throughout.
But I realised that the read back verification would not spot a problem if the 64k was mirrored to 128k, so I used a file filled from /dev/random and that also verified

So I'm pretty confident the chips I have are 128k (but still only 20k RAM )

User avatar
Squonk42
Posts: 551
Joined: Thu Dec 29, 2016 9:25 am
Location: Bordeaux, France
Contact:

Re: CS32F103C8T6... A new clone

Post by Squonk42 » Thu Feb 07, 2019 6:38 am

This is the same in STM datasheet that refernces both the STM32F103C8 and STM32F103CB versions, nothing to do with fans :D

In the STM32F103, the Flash size can be determined at run time using the F_SIZE register (address 0x1FFFF7E0 on the STM32F103C8T6), maybe this is also the case for this chip?

Producing a set of masks for a silicon chip is extremely expensive so I suspect that STM is only using a single set for a given family, withe maximum Flash memory size, then tune the chip to the final marketing version by blowing (or not) fuses during production.

There are silicon die manufacturing sites in China, and it may be possible that the government imposes local production to access their local market. Maybe the CS32 is such an offspring?

What is amazing is the similtude between the CS32 datasheet and the STM32 datasheet and RM in Chinese from STM: the contents and even formatting is so similar that it is almost impossible that this can be obtined without the source doxuments.

Unlike the GD32 which is clearly a different chip for which GigaDevice is'using its experience in Flash memories by bonding a separate chip, they just bought a licence for the CM3 core from ARM as well as reused the same silicon IPs for almost all peripherals, and mapped them to the same memory location so it will be easier to test...

ag123
Posts: 1321
Joined: Thu Jul 21, 2016 4:24 pm

Re: CS32F103C8T6... A new clone?

Post by ag123 » Thu Feb 07, 2019 6:50 am

my guess is that st (or someone) would probably remove the housing and compare the die photos, if it turns out the die photos are identical as well. then it is pretty much pirated.
if the die photos are different in some significant ways, it would then be likely that it is reverse engineered
if it is reversed engineered, it would be really quite a feat

in terms of the manual, if it is section for section similar, it would basically be the job of a translation software which is prevalent these days with even free ones directly on the web. they probably touched up the syntax errors etc so that it probably looked authentic

i take a quick look at the reference manual
for cs32f103
http://www.ckscup.com/upload/CS32F103%E ... %86%8C.pdf
http://www.ckscup.com/material.aspx
vs rm0008
https://www.st.com/content/ccc/resource ... 171190.pdf

based on the contents page some sections are apparently re-organised e.g. combined or omitted. interestingly
the chapter on fsmc and sdio, ethernet didn't seem to be there in the cs322f103 chinese manual,
adc, dac, can, spi, i2c, usart are there, usb apparently omitted the otg parts, i'd guess the normal usb device mode is still there

apparently these seem to be the chapter mappings:

Code: Select all

rm0008              - cs32103 (chinese)
chapter             chapter      context
2                         1               document conventions / abbreviations
3                         2               memory and bus architecture
4                         3               CRC calculation unit
5                                          omitted! (power control PWR)
6                         5               backup registers (BKP) 
7                         6               clocks and reset control (RCC)
8                                          omitted!: connectivity line devices: RCC 
9                         7               General-purpose and alternate-function I/Os (GPIOs and AFIOs) 
10                       8               Interrupts and events 
11                       10             Analog-to-digitalconverter (ADC)
12                       11             Digital-to-analogconverter (DAC) 
13                       9               Direct memory access controller (DMA) 
14                       12             Advanced-controltimers (TIM1&TIM8) - only TIM1 is specifically mentioned in cs32f103
15                       13             General-purpose timers (TIM2 to TIM5) (noted as TIMx in cs32f103 manual
some chapters on timers are apparently omitted
18                       14             Real-timeclock (RTC) 
19                       15             Independent watchdog (IWDG) 
20                       16             Window watchdog (WWDG) 
21                                        omitted! Flexible static memory controller (FSMC) 
22                                        omitted! Securedigital input/output interface (SDIO)
23                       17             Universalserial bus full-speed device interface (USB) 
24                       18             Controller area network (bxCAN) 
25                       19             Serialperipheral interface (SPI) .
26                       20             Inter-integrated circuit (I2C) interface 
27                       21             Universal synchronous asynchronous receiver transmitter (USART)
28                                       omitted! USB OTG
29                                       omitted! Ethernet
30                       22            Device electronic signature 
31                       23            Debug support (DBG) .
ok so there you go, the above isn't really done in detail but merely done based on the content pages mapping
:lol:

Post Reply