However, as we start building more and dig deep we would soon realise that Arduino is not industry ready and its 8-bit CPU with a ridiculously slow clock, it does not give you enough juice for your projects. Hopefully though, we have the new STM32F103C8T6 STM32 Development Boards(Blue Pill) in the market now which can easily outperform Arduino with its 32-bit CPU and ARM Cortex M3 architecture. Another honey pot here is that we can use the same old Arduino IDE to program our STM32 Boards. So in this tutorial, let us get started with the STM32 to know a bit of basics about this board and blink the on-board LED using the Arduino IDE.

This project is sponsored by LCSC. I have been using electronic components from LCSC has a strong commitment to offering a wide selection of genuine, high quality electronic components at best price with a global shipping network to over 200 countries. Sign up today and get $8 off on your first order.

These microcontrollers are made by STMicroelectronics, which is a global independent semiconductor company.

Board with STM32F103C8T6 as it's brain are also nicknamed as Blue Pill.

Specifications of STM32F103C8T6 Blue Pill board

  • Core: Cortex-M3 32-bit
  • Operating frequency: 72MHz
  • Storage resources: 64K Byte Flash, 20KByte SRAM
  • Interface Resources: 2x SPI, 3x USART, 2x I2C, 1x CAN, 37x I / O ports
  • Analog-to-digital conversion: ADC (12-bit / 16-channel)
  • PWM: 16-bit/15 channel
  • USB Device: 1
  • Timers: 3 general timers and 1 advanced timer
  • Debug Download: Support JTAG / SWD debug interface to download, support for IAP

Now, GigaDevice's GD32F103C8T6?

GigaDevice, the leading provider of Non-Volatile Memory (NVM) devices, is the company engaged in advanced memory and related chip design in Mainland China established in 2005.

GigaDevice made STM's twin which has more faster speed due to faster clock of 108 MHz as compared to 72 MHz of STM.

Like STM, these are also based on the ARM CortexTM-M3 RISC core with best ratio in terms of processing power, reduced power consumption and peripheral set. The CortexTM-M3 is a next generation processor core which is tightly coupled with a Nested Vectored Interrupt Controller (NVIC), SysTick timer and advanced debug support.

Specifications of GD32F103C8T6

  • Package: TQFP-48_7x7x05P
  • Core Size: 32-Bit
  • Program Memory Type: FLASH
  • Core Processor: ARM® Cortex®-M3
  • Operating Frequency: 108MHz
  • Voltage - Supply (Vcc/Vdd): 2.6V ~ 3.6V
  • Program Memory Size: 64KB
  • RAM Size: 20KB
  • Number of I/O: 37
  • A/D: 10x12bit
  • D/A: 0
  • PWM: 2
  • SPI: 2
  • I2C/SMBUS: 2
  • USB Device: 1
  • USB Host/OTG: 1
  • CAN: 1

Comparison between the two devices

Almost all the specifications and details of both the microcontrollers are same with same flash size, RAM, processor core and pinouts.

Pinout diagram of GD32F103Cx series

Pinout diagram of GD32F103Cx series

The most significant difference is that the GD32F103C8T6 has more operating frequency with 108 MHz as compared to the 72 MHz of STM32F103C8T6. So, If you are looking for a faster speed for processing the long codes and commands with bit big calculation, GigaDevice has a proper alternative. Although, you may need to make some changes when you start programming GigaDevice board so as to make delay() function and other timer related functions. The delay() functions are hard coded loops of nops which assume 72Mhz, so that would need to be changed as well.

You can go through these changes in stm32.h:

File Path:\IDE\hardware\Arduino_STM32\STM32F1\system\libmaple\stm32f1\include\series

# ifndef STM32_PCLK1
# define STM32_PCLK1 54000000U // << from 36000000 # endif
# ifndef STM32_PCLK2
# define STM32_PCLK2 108000000U // << from 72000000