Posted on 2 Comments

Genuine STM32 Blue Pill vs CS32F103C8T6 Clone

I’m troubleshooting a synth design and looking at the data on the SPI bus.  I have 10 STM32 clones (CS32F103C8T6) of the STM32F103C8T6 around and decided to try them out since they have the correct USB resistor.

I was getting the following error in PlatformIO.

Warn : UNEXPECTED idcode: 0x2ba01477

To get the clone to work, I had to change stm32f1x.cfg which I found in C:\Users\YOUR_WINDOWS_USER\.platformio\packages\tool-openocd\scripts\target\

I changed set _CPUTAPID 0x1ba01477 to set _CPUTAPID 0x2ba01477.  If I need to go back to the real Blue Pill, I’ll have to change this back again.

I started with the clone and then switched to the real one.  The scope shows some interesting results.  This is data from the SPI bus.  The circuit is 100% identical in both cases.

CS32F103C8T6 Clone SPI Data

Genuine STM32F103C8T6 SPI Data

I’m not sure if the clone just can’t handle the speed or if there’s some kind capacitance slowing it down.  Regardless, the SPI output of the clone is so bad that I’ll have to check the timing diagrams for my SPI-receiving chip.  I don’t have this problem with the genuine STM32.

If anyone knows a solution to get the clone to behave, please tell me.  Otherwise, I’ll have to view these Chinese clones as WAY too expensive once time is factored in.

2 thoughts on “Genuine STM32 Blue Pill vs CS32F103C8T6 Clone

  1. Your scope is configured only for 10MSa/s on the first picture, and for 1GSa/s on the second one.

  2. I’m just starting to visit the world of Blue Pill boards and found your post. Of course I received counterfeit ST-labeled clone MCUs on my boards.

    I think the 0x2b versus 0x1b is merely the doubled flash size of the CSxx chip, 128GB flash instead of ST’s 64GB. Consider using the CBT6 variant of the ST chip’s ID when working with the CSxx clone. I’ve flashed mine using JLink’s JFlash and ST’s obsoleted Flash Loader Demonstrator GUI app. The latter had automatically recognized the device as “STM32F1_Med-density_128K”. I’ll try ST-Link with mine sometime.

    Your scope trace of the CSxx looked scary until I realized the sample rate was only 10M samples/sec for a 2.5 MHz clock. Your genuine ST trace was 1gig samples/sec.

Leave a Reply to Gabriel Cancel reply

Your email address will not be published. Required fields are marked *