Spark Logic

GD32F103 pinout

GD32F103 is a GigaDevice Arm Cortex-M3 microcontroller family. The package map, ordering code and memory layout determine how to connect and configure each device.

PackageContactsDetails
LQFP48 48 GD32F103Cx · 48 leads
LQFP64 64 GD32F103Rx · 64 leads
LQFP100 100 GD32F103Vx · 100 leads

GigaDevice

Device variants · LQFP48

DeviceFlashSRAMSerial peripherals
GD32F103C4T6 16 KiB 6 KiB 2 USART, 1 SPI, 1 I²C, 1 CAN, 1 USBD
GD32F103C6T6 32 KiB 10 KiB 2 USART, 1 SPI, 1 I²C, 1 CAN, 1 USBD
GD32F103C8T6 64 KiB 20 KiB 2 USART, 1 SPI, 1 I²C, 1 CAN, 1 USBD
GD32F103CBT6 128 KiB 20 KiB 3 USART, 2 SPI, 2 I²C, 1 CAN, 1 USBD

LQFP48 pinout

LQFP48

1 · VBAT · Left side, contact 1 from the top

Face the package marking. Pin 1 is beside the corner mark. Numbers advance counterclockwise.
Selected pin details

1 · VBAT

Supply input · Power

RTC and backup-domain supply. In a single-supply design, connect it to VDD with its own bypass capacitor.

Wiring requirements

GD32F103xx datasheet Rev. 3.3, Table 2-8

Electrical limits · Link to this pin

Power and boot from Flash

  • +3.3 V digital
    • Bench supply positive
  • Digital return
    • Bench supply return
  • +3.3 V analog
    • Same +3.3 V source
  • Analog return
    • Same ground plane
  • Backup supply
    • Same +3.3 V source
  • Boot strap
    • →
4.7 µF bulk between +3.3 V digital and Digital return+3.3 V digital4.7 µF bulkDigital return
100 nF × 3, one at each VDD lead between +3.3 V digital and Digital return+3.3 V digital100 nF × 3, one at each VDD leadDigital return
1 µF in parallel with 10 nF at VDDA between +3.3 V analog and Analog return+3.3 V analog1 µF in parallel with 10 nF at VDDAAnalog return
100 nF between Backup supply and Digital returnBackup supply100 nFDigital return
10 kΩ between Boot strap and Digital returnBoot strap10 kΩDigital return

Connection guide

All 48 pins

PinSignalDirectionFunction
1VBAT Supply inputSupply input RTC and backup-domain supply. In a single-supply design, connect it to VDD with its own bypass capacitor.
2PC13 BidirectionalBidirectional GPIO or RTC tamper input / RTC output. The backup-domain power switch supplies all three pins (PC13–PC15): 3 mA typical sourcing in total; sinking is the same as on other I/O. GPIO output: ≤2 MHz with load ≤30 pF. GPIO requires VDD; with VBAT alone, only the backup functions remain available.
3PC14 BidirectionalBidirectional GPIO or low-speed external oscillator input (OSC32IN). The backup-domain power switch supplies all three pins (PC13–PC15): 3 mA typical sourcing in total; sinking is the same as on other I/O. GPIO output: ≤2 MHz with load ≤30 pF. GPIO requires VDD; with VBAT alone, only the backup functions remain available.
4PC15 BidirectionalBidirectional GPIO or low-speed external oscillator output (OSC32OUT). The backup-domain power switch supplies all three pins (PC13–PC15): 3 mA typical sourcing in total; sinking is the same as on other I/O. GPIO output: ≤2 MHz with load ≤30 pF. GPIO requires VDD; with VBAT alone, only the backup functions remain available.
5OSCIN InputInput High-speed external oscillator input. The internal RC oscillator can start the processor without a crystal.
6OSCOUT OutputOutput High-speed external crystal oscillator output.
7NRST BidirectionalBidirectional Active-low system reset. Route it to the probe for connection under reset.
8VSSA ReturnReturn Analog ground. Connect it to the ground plane shared with VSS.
9VDDA Supply inputSupply input Analog supply for the ADC, clock and reset circuitry. Feed it from the VDD supply and bypass it to VSSA.
10PA0 BidirectionalBidirectional General-purpose port A, bit 0. See the package table for peripheral assignments and input tolerance.
11PA1 BidirectionalBidirectional General-purpose port A, bit 1. See the package table for peripheral assignments and input tolerance.
12PA2 BidirectionalBidirectional General-purpose port A, bit 2. See the package table for peripheral assignments and input tolerance.
13PA3 BidirectionalBidirectional General-purpose port A, bit 3. See the package table for peripheral assignments and input tolerance.
14PA4 BidirectionalBidirectional GPIO and SPI0_NSS in the PA4–PA7 assignment.
15PA5 BidirectionalBidirectional GPIO and SPI0_SCK in the PA4–PA7 assignment.
16PA6 BidirectionalBidirectional GPIO and SPI0_MISO in the PA4–PA7 assignment.
17PA7 BidirectionalBidirectional GPIO and SPI0_MOSI in the PA4–PA7 assignment.
18PB0 BidirectionalBidirectional General-purpose port B, bit 0. See the package table for peripheral assignments and input tolerance.
19PB1 BidirectionalBidirectional General-purpose port B, bit 1. See the package table for peripheral assignments and input tolerance.
20PB2 BidirectionalBidirectional GPIO and BOOT1 strap. BOOT0 low selects main Flash regardless of BOOT1.
21PB10 BidirectionalBidirectional General-purpose port B, bit 10. See the package table for peripheral assignments and input tolerance.
22PB11 BidirectionalBidirectional General-purpose port B, bit 11. See the package table for peripheral assignments and input tolerance.
23VSS_1 ReturnReturn Digital ground. Connect every VSS lead to the ground plane.
24VDD_1 Supply inputSupply input Digital supply. Connect every VDD lead and place a local 100 nF bypass at each supply pair.
25PB12 BidirectionalBidirectional General-purpose port B, bit 12. See the package table for peripheral assignments and input tolerance.
26PB13 BidirectionalBidirectional General-purpose port B, bit 13. See the package table for peripheral assignments and input tolerance.
27PB14 BidirectionalBidirectional General-purpose port B, bit 14. See the package table for peripheral assignments and input tolerance.
28PB15 BidirectionalBidirectional General-purpose port B, bit 15. See the package table for peripheral assignments and input tolerance.
29PA8 BidirectionalBidirectional General-purpose port A, bit 8. See the package table for peripheral assignments and input tolerance.
30PA9 BidirectionalBidirectional GPIO and USART0 transmit. Select the USART0 assignment before driving the line as TX.
31PA10 BidirectionalBidirectional GPIO and USART0 receive. Select the USART0 assignment to receive on this line.
32PA11 BidirectionalBidirectional General-purpose port A, bit 11. See the package table for peripheral assignments and input tolerance.
33PA12 BidirectionalBidirectional General-purpose port A, bit 12. See the package table for peripheral assignments and input tolerance.
34PA13 BidirectionalBidirectional Serial Wire Debug data (SWDIO). Reserve this signal while using the debug port.
35VSS_2 ReturnReturn Digital ground. Connect every VSS lead to the ground plane.
36VDD_2 Supply inputSupply input Digital supply. Connect every VDD lead and place a local 100 nF bypass at each supply pair.
37PA14 Input in SWD modeInput in SWD mode Serial Wire Debug clock (SWCLK). The probe drives this line.
38PA15 BidirectionalBidirectional Set AFIO_PCF0.SWJ_CFG to 0b010 to release the JTAG pins and keep SWD on PA13/PA14. 0b100 also disables SWD.
39PB3 BidirectionalBidirectional Set AFIO_PCF0.SWJ_CFG to 0b010 to release the JTAG pins and keep SWD on PA13/PA14. 0b100 also disables SWD. PB3 remains TRACESWO while asynchronous trace is enabled.
40PB4 BidirectionalBidirectional Set AFIO_PCF0.SWJ_CFG to 0b010 to release the JTAG pins and keep SWD on PA13/PA14. 0b100 also disables SWD. 0b001 releases PB4 alone and keeps JTAG without NJTRST.
41PB5 BidirectionalBidirectional General-purpose port B, bit 5. See the package table for peripheral assignments and input tolerance.
42PB6 BidirectionalBidirectional GPIO and I2C0_SCL in the PB6/PB7 assignment.
43PB7 BidirectionalBidirectional GPIO and I2C0_SDA in the PB6/PB7 assignment.
44BOOT0 InputInput Sampled at reset. Hold low for normal execution from main Flash.
45PB8 BidirectionalBidirectional General-purpose port B, bit 8. See the package table for peripheral assignments and input tolerance.
46PB9 BidirectionalBidirectional General-purpose port B, bit 9. See the package table for peripheral assignments and input tolerance.
47VSS_3 ReturnReturn Digital ground. Connect every VSS lead to the ground plane.
48VDD_3 Supply inputSupply input Digital supply. Connect every VDD lead and place a local 100 nF bypass at each supply pair.

Signal assignments

PC13–PC15 backup domain

The backup-domain power switch supplies all three pins (PC13–PC15): 3 mA typical sourcing in total; sinking is the same as on other I/O. GPIO output: ≤2 MHz with load ≤30 pF. GPIO requires VDD; with VBAT alone, only the backup functions remain available. OSC32IN and OSC32OUT form the low-speed crystal pair.

JTAG / SWD pin sharing

Set AFIO_PCF0.SWJ_CFG to 0b010 to release the JTAG pins and keep SWD on PA13/PA14. 0b100 also disables SWD. PB3 remains TRACESWO while asynchronous trace is enabled. 0b001 releases PB4 alone and keeps JTAG without NJTRST.

USART0 on PA9/PA10

PA9 transmits to the remote receiver. PA10 receives from the remote transmitter. Use the asynchronous two-wire mode for a basic console.

SPI0 on PA4–PA7

PA4 is NSS, PA5 is clock, PA6 is MISO and PA7 is MOSI. Match the peripheral’s clock polarity, phase, chip select and voltage before exchanging data.

I²C0 on PB6/PB7

PB6 is SCL and PB7 is SDA. Use open-drain operation and pull both lines to the common logic rail. Size the pull-ups for bus capacitance and rise time.

Electrical limits

ParameterLimitConditions and source
Flash organization128 KiB code / 0 KiB data128 KiB code / 0 KiB data Flash is distinct from SRAM. Check the memory mapping before assigning linker regions. GD32F103xx datasheet Rev. 3.3, Table 2-1
Serial peripherals3 USART, 2 SPI, 2 I²C, 1 CAN, 1 USBD3 USART, 2 SPI, 2 I²C, 1 CAN, 1 USBD These are peripheral counts. Each interface assignment still depends on the available package pins. GD32F103xx datasheet Rev. 3.3, Table 2-1
ROM serial bootUSART0USART0 USART0 uses PA9/PA10. For codes that support it, USART1 uses PA2/PA3. GD32F103xx datasheet Rev. 3.3, §3.4
VDD and VDDA2.6–3.6 V2.6–3.6 V Use the same source for the digital and analog rails. 3.3 V is the nominal test supply. GD32F103xx datasheet Rev. 3.3, Table 4-2
VBAT1.8–3.6 V1.8–3.6 V Connect to VDD in the single-supply circuit. GD32F103xx datasheet Rev. 3.3, Table 4-2
Maximum HCLK108 MHz108 MHz Follow the clock-tree and bus prescaler limits separately. GD32F103xx datasheet Rev. 3.3, Table 4-3

Manufacturer documents

Interactive maps cover LQFP48, LQFP64 and LQFP100. See Figures 2-3 and 2-7 of the datasheet for LQFP144 and QFN36. Match the suffix on the chip. Board headers and regulator connections depend on the PCB.