Short answer: GigaDevice GD32 is the broadest pin-compatible alternative to STM32. Many GD32 series match STM32 packages and peripheral register maps, so a replacement is often no board change or a small one, plus firmware changes and retesting, rather than a new platform. Choose in this order: same package and pinout, same peripherals, enough memory, then clock speed. The classic mappings are STM32F103 to GD32F103, GD32F303 or GD32E103, and STM32F407 to GD32F407, GD32F450 or GD32F470. Then retest flash timing, ADC, power-up behavior, programming tools and the firmware library before production.
Why GD32 can replace STM32
GD32 and STM32 both use Arm Cortex-M cores (GigaDevice also offers RISC-V), and many GD32 series keep the STM32 pinout and a closely matching peripheral register map. Code written against the STM32 Standard Peripheral Library or directly against registers often compiles and runs with small changes. The real differences are in flash code fetching, analog timing, power-up and reset behavior, the firmware library and the programming tools. They need retesting, not a redesign.
Common same-package mappings
All parameters below are from the part pages on our site. Always compare both datasheets pin by pin before switching.
| Original STM32 | GD32 option | Core, clock, memory, package | Notes |
|---|---|---|---|
| STM32F103C8T6 (72 MHz, 64 KB, LQFP-48) | GD32F103C8T6 | Cortex-M3, 108 MHz, 64 KB Flash / 20 KB SRAM, LQFP-48 | Direct same-package option |
| GD32E103C8T6 | Cortex-M4, 120 MHz, 64 KB / 20 KB, LQFP-48, 1.71 V to 3.6 V | Same memory, upgrade to M4 with FPU | |
| GD32F303CCT6 | Cortex-M4, 120 MHz, 256 KB / 48 KB, LQFP-48 | Upgrade with more memory | |
| GD32C103CBT6 | Cortex-M4, 120 MHz, 128 KB / 32 KB, LQFP-48 | The GD32C103 series adds CAN FD | |
| STM32F103RCT6 (72 MHz, 256 KB, LQFP-64) | GD32F103RCT6 | Cortex-M3, 108 MHz, 256 KB / 48 KB, LQFP-64 | Direct same-package option |
| GD32F303RCT6 | Cortex-M4, 120 MHz, 256 KB / 48 KB, LQFP-64 | Upgrade to M4 with FPU | |
| STM32F030F4P6 (48 MHz, 16 KB, TSSOP-20) | GD32E230F8P6TR | Cortex-M23, 72 MHz, 64 KB / 8 KB, TSSOP-20 | Different core (M23 vs M0); check every peripheral |
| STM32F407VGT6 (168 MHz, 1 MB, LQFP-100) | GD32F407VGT6 | Cortex-M4, 168 MHz, 1024 KB / 192 KB, LQFP-100 | Direct same-package option |
| GD32F450VGT6, GD32F470VGT6 | Cortex-M4, 200 MHz or 240 MHz, 1024 KB / 256 KB or 512 KB, LQFP-100 | Higher clock and SRAM | |
| STM32H743VIT6 (up to 480 MHz, 2 MB) | GD32H737VGT6 | Cortex-M7, 600 MHz, 1024 KB / 1024 KB, LQFP-100 | Only 1 MB Flash: check that the firmware fits |
GD32 suffixes follow the same pattern as STM32 for the most common codes: C = 48 pins, R = 64 pins, V = 100 pins; 8 = 64 KB, B = 128 KB, C = 256 KB, G = 1 MB of Flash. Confirm with each datasheet.
For the STM32F429 with its LCD-TFT controller, look at the GD32F450 and GD32F470 series, but match the package: the STM32F429IGT6 is a 176-pin part, while the GD32 parts above are 100-pin.
Other GD32 families on our site
- Low power: GD32L233CCT6, Cortex-M23, 64 MHz, 256 KB / 32 KB, 1.71 V to 3.63 V. Re-measure the power profile against your STM32L0 or L4 design.
- Automotive: GD32A503RDT3, Cortex-M33, 100 MHz, 384 KB / 48 KB, 2.7 V to 5.5 V, AEC-Q100 Grade 1, -40 °C to 125 °C.
- RISC-V: GD32VF103CBT6, 108 MHz, 128 KB / 32 KB, LQFP-48, in the GD32F103 class but with a RISC-V core, so it needs a different toolchain and code changes.
- Entry level: GD32F130C8T6, Cortex-M3, 48 MHz, 64 KB / 8 KB, LQFP-48.
Eight migration checks
- Lock package and peripherals before speed: confirm the pinout and that timers, ADC channels, USART, SPI, I2C, CAN and USB are sufficient. Many GD32 parts also run faster than the STM32 in the same package, for example 108 MHz instead of 72 MHz on the F103 class.
- Flash code fetching differs: STM32 and GD32 fetch code from flash in different ways, and on some GD32 series execution speed depends on where the code sits in flash. Retest cycle-counted delays, software-timed protocols and DMA timing.
- Power-up, reset and start-up time: brown-out and power-on reset thresholds, start-up time and oscillator start-up differ slightly. Retest power sequencing, reset timing and watchdog windows.
- Recalibrate the ADC and analog peripherals: sampling time, internal reference and temperature sensor coefficients are not identical. Set the sampling windows and calibration from the GD32 datasheet.
- Registers are highly compatible, not 100%: check USB, some timers, individual clock-tree bits and the flash programming sequence.
- Programming and debug: select the GD32 device and flash algorithm in J-Link, ST-Link or pyOCD, and install the GD32 device pack in Keil or IAR. Do not program a GD32 with an STM32 flash algorithm.
- Firmware library: GigaDevice's firmware library is close in style to the STM32 Standard Peripheral Library, so SPL and register-level projects migrate easily. Projects built on STM32 HAL or CubeMX need the library replaced; register-level application code can mostly be reused.
- Temperature grade and supply: choose industrial or automotive grades as needed, confirm long-term supply and lot consistency before volume production, and keep a qualified second source.
Send us your requirements
Send us the original STM32 part numbers, packages, key peripherals and yearly volume. We will suggest same-package GD32 options and point out the differences to test. We reply to routine inquiries within 1 business day. Submit your BOM.