Most of us do know the ST line of ARM chips called STM32. They come in multiple flavours and the STM32F103 is one of the most common entry level family of chips. They are called by ST as mainstream. They are a full featured 32 bit ARM Cortex M3 chip running at max. 72MHz with all the requisite peripherals like ADC, DAC, USB, CAN, I2C, I2S, SPI, SDIO, PWM, RTC, interrupts and various timers. Lets zoom into the STM32F103C8 chip (which seems the be the go-to choice of the Chinese el-cheapo development breakout boards):

  • upto 72Mhz clock speed, 1.25 DMIPS/MHz
  • 128K byte Flash ROM
  • 20K byte SRAM
  • RTC with 20 bytes battery backup RAM
  • 2x 12-bit ADC (1μs sampletime, 10 channels)
  • 7 channel DMA (support for timers, ADC, SPI, I2C and USART)
  • 36 I/O (about half of that is 5V tolerant)
  • Serial wire debug (SWD) & JTAG interfaces
  • 7 timers (3x 16bit for PWM, 1x 16bit for PWM motor control, 2 watchdog, 1x systick)
  • 2x I2C (PMBUS and SMBUS compatible)
  • 3x USARTs (ISO 7816 interface, LIN, IrDA capability, modem control)
  • 2x SPIs (18 Mbit/s)
  • 1x CAN interface (2.0B Active)
  • USB 2.0 full-speed interface

The GD32F103C8, manufactued 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 clockfrequency (108MHz) and have less waitstates for flashrom then the ST counterpart. The size of the flash memory goes up to 3076KB, compared to the 1024KB ST offers.

gd32 marketing

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 waitstates for flash access. This is a similar way the ESP8266 runs (albeit the flash is user replacable :)). Not very surprizing 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, The next weeks I’ll be using real world examples to test some of the peripherals of the chip. For this I’ve designed a breakout board (newer revision of this one) .

This post is part of a series where the STM32 is compared to the GD32:

Share this
  • 85
    Shares