This is a quick post about the *32F103 comparison. When talking about my comparison on IRC, I was asked if I could run the Blinky test from the Greaseweazle project. It looks like an interesting project I’ll need to check out in the future.

Looking at the description of that test, it’s gonna toggle PC13 every 500 ms. Well… on a Blue Pill, PC13 connects to a LED, however, on my board, PC13 is connected to the USB pull up resistor. As the blinky test does not use USB, this poses no problem as long as I do not use the USB connector to power the board. The Blinky test will output information on the serial interface (USART1).

The source code for the blinky test goes here

And the results:

STM32F103CBT6

** Blinky Test **
** Keir Fraser 
** https://github.com/keirf/Greaseweazle
Serial = ff32:0672:5434:3532:2556:5701
Flash Size  = 128kB
Device ID = 0x0000
Revision  = 0x0000
Testing I2C1... OK
Testing I2C2... OK
Testing SPI1... OK
Testing SPI2... OK
Testing TIM1... OK
Testing TIM2... OK
Testing TIM3... OK
Testing TIM4... OK
DMA Test #1... OK
DMA Test #2... OK
DMA Test #3... OK
DMA Test #4... OK
Testing 64kB Flash... OK
Enable TIM4 IRQ... .OK

The original part, of course, passes all tests.
As expected, due to erratum 2.3, we read Device ID/Revision as 0x0000.
Please be aware, right after programming it will say:

Device ID = 0x0410
Revision  = 0x2003
**WARNING**: 10xx8/B device returned valid IDCODE! Fake?

Only when the microcontroller has been power cycled it will start showing zero. Pressing the reset button is not enough to trigger this errata. The power has to be completely removed.

GD32F103CBT6

** Blinky Test **
** Keir Fraser 
** https://github.com/keirf/Greaseweazle
Serial = 476f:3538:3535:0734:314d:3734
Flash Size  = 128kB
Device ID = 0x0410
Revision  = 0x1303
**WARNING**: 10xx8/B device returned valid IDCODE! Fake?
Testing I2C1... OK
Testing I2C2... OK
Testing SPI1... OK
Testing SPI2... OK
Testing TIM1... OK
Testing TIM2... OK
Testing TIM3... OK
Testing TIM4... OK
DMA Test #1... OK
DMA Test #2... OK
DMA Test #3... OK
DMA Test #4... OK
Testing 64kB Flash... OK
Enable TIM4 IRQ... .OK
Testing 20kB SRAM (endless loop)...

The GigeDevice part passes all tests. It does not suffer from ST’s errata 2.3, and shows it’s device id and revision. We see Revision 0x1303, which does not correspond with any ST revision codes, and is unique for GigaDevice.

CS32F103C8T6

** Blinky Test **
** Keir Fraser 
** https://github.com/keirf/Greaseweazle
Serial = 322e:0007:121f:4353:4a59:004e
Flash Size  = 64kB
Device ID = 0x0410
Revision  = 0x2003
**WARNING**: 10xx8/B device returned valid IDCODE! Fake?
Testing I2C1... OK
Testing I2C2... OK
Testing SPI1... OK
Testing SPI2... OK
Testing TIM1... OK
Testing TIM2... OK
Testing TIM3... OK
Testing TIM4... OK
DMA Test #1... OK
DMA Test #2... OK
DMA Test #3... OK
DMA Test #4... OK
Testing 64kB Flash... OK
Enable TIM4 IRQ... .OK
Testing 20kB SRAM (endless loop)...

The CS32 passes all tests. It also mentioned on the blinky tests description page it would. Here we see the Device ID and Revision. Unlike the GigaDevice part, the Revision matches “Revision 1, 2, 3, X or Y” from ST.

APM32F103C8T6

** Blinky Test **
** Keir Fraser 
** https://github.com/keirf/Greaseweazle
Serial = 0057:0032:000c:5900:5739:4e4c
Flash Size  = 128kB
Device ID = 0x0410
Revision  = 0x2003
**WARNING**: 10xx8/B device returned valid IDCODE! Fake?
Testing I2C1... OK
Testing I2C2... OK
Testing SPI1... OK
Testing SPI2... OK
Testing TIM1... OK
Testing TIM2... OK
Testing TIM3... OK
Testing TIM4... OK
DMA Test #1... OK
DMA Test #2... OK
DMA Test #3... OK
DMA Test #4... OK
Testing 64kB Flash... OK
Enable TIM4 IRQ... .OK
Testing 20kB SRAM (endless loop)...  

Also the part from ApexMic passes all tests. Also this device has a Revision 0x2003, which matches “Revision 1, 2, 3, X or Y” from ST. Another thing to note, the reported flash size if 128 kB, while this is an C8 part. In a later test I’ll have to verify the amount of flash in this part, and also check the datasheet for the advertised amount.