Lib-electronic-components gigadevice

GigaDevice Semiconductor MPN encoding patterns, suffix decoding, and handler guidance. Use when working with GigaDevice Flash memory, MCUs, or GigaDeviceHandler.

install
source · Clone the upstream repo
git clone https://github.com/Cantara/lib-electronic-components
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Cantara/lib-electronic-components "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/manufacturers/gigadevice" ~/.claude/skills/cantara-lib-electronic-components-gigadevice && rm -rf "$T"
manifest: .claude/skills/manufacturers/gigadevice/SKILL.md
source content

GigaDevice Semiconductor Manufacturer Skill

Manufacturer Overview

GigaDevice Semiconductor is a Chinese fabless semiconductor company founded in 2005. They are a major supplier of:

  • Serial NOR Flash Memory - GD25 series (SPI Flash, compatible with Winbond W25)
  • SLC NAND Flash Memory - GD5F series
  • ARM Cortex MCUs - GD32 series (pin-compatible with STM32)
  • RISC-V MCUs - GD32VF series (open ISA alternative)

GigaDevice is known for providing cost-effective alternatives to Western manufacturers, particularly:

  • GD25Qxx Flash as an alternative to Winbond W25Qxx
  • GD32Fxxx MCUs as alternatives to STMicroelectronics STM32Fxxx

Supported Component Types

The

GigaDeviceHandler
supports these component types:

ComponentTypeDescription
MEMORY
Generic memory category
MEMORY_FLASH
Flash memory (NOR and NAND)
MICROCONTROLLER
ARM Cortex and RISC-V MCUs

Flash Memory MPN Structure

Serial NOR Flash (GD25 Series)

GD25 [VARIANT] [DENSITY] [GRADE] [PACKAGE] [QUALIFIER]
  │      │         │        │        │          │
  │      │         │        │        │          └── R/TR = Tape and Reel
  │      │         │        │        └── Package code (see table below)
  │      │         │        └── Optional grade letter (C/E = voltage/temp grades)
  │      │         └── Density in Megabits (16, 32, 64, 128, 256, 512)
  │      └── Variant: Q=Standard, B=Wide VCC, LQ=Low Power, WQ=Wide VCC Low Power, T=High Performance
  └── GD25 = Serial NOR Flash prefix

Flash Variant Types

PrefixDescriptionVoltage RangeNotes
GD25QStandard Serial NOR2.7V - 3.6VMost common, Winbond W25Q compatible
GD25BWide Voltage1.65V - 3.6VExtended voltage range
GD25LQLow Power2.7V - 3.6VLower active/standby current
GD25WQWide Voltage Low Power1.65V - 3.6VCombines B and LQ features
GD25THigh Performance2.7V - 3.6VHigher speed grades
GD5FSLC NAND Flash2.7V - 3.6VNAND technology, higher density

Flash Density Codes

The density in Megabits follows the variant prefix:

CodeDensityBytes
1616 Mbit2 MB
3232 Mbit4 MB
6464 Mbit8 MB
128128 Mbit16 MB
256256 Mbit32 MB
512512 Mbit64 MB

For NAND (GD5F series), density is in Gigabits:

CodeDensityBytes
1G1 Gbit128 MB
2G2 Gbit256 MB
4G4 Gbit512 MB

Flash Package Codes

SuffixPackageDescription
SIGSOP-8Standard 8-pin SOIC
SIQSOP-8SOP-8 variant
SIPSOP-8SOP-8 variant
CSIGSOP-8SOP-8 with extended features
ESIGSOP-8SOP-8 extended voltage
EIGSOP-8SOP-8 extended
WIGWSON-86x5mm QFN-style
EWIGRWSON-8WSON-8 extended, tape & reel
EWIQWSON-8WSON-8 extended variant
WIGRWSON-8WSON-8 tape & reel
ZIGUSON-8Ultra-small 4x3mm
EZIQUSON-8USON-8 extended
FIGWLCSPWafer-level chip-scale
LIGSOIC-1616-pin SOIC (dual I/O)
NIGDFN-8Small DFN package
TIGTFBGAThin fine-pitch BGA
TIGRTFBGATFBGA tape & reel
UIGVSOP-8Very small SOP
BIGBGABall grid array

Flash MPN Examples

GD25Q128CSIG
│    │  │  │
│    │  │  └── SIG = SOP-8 package
│    │  └── C = Grade (voltage/temp variant)
│    └── 128 = 128 Mbit (16 MB) density
└── GD25Q = Standard serial NOR flash

GD25Q64EWIGR
│    │ │   │
│    │ │   └── R = Tape and Reel packaging
│    │ └── EWIG = Extended WSON-8 package
│    └── 64 = 64 Mbit (8 MB) density
└── GD25Q = Standard serial NOR flash

GD25LQ16CZIG
│     │  │  │
│     │  │  └── ZIG = USON-8 package
│     │  └── C = Grade variant
│     └── 16 = 16 Mbit (2 MB) density
└── GD25LQ = Low Power serial NOR flash

GD5F1GM7XEYIGR
│   │ │ │   │
│   │ │ │   └── R = Tape and Reel
│   │ │ └── EYIG = Package code
│   │ └── M7 = Variant/generation
│   └── 1G = 1 Gbit (128 MB) density
└── GD5F = SLC NAND flash

MCU MPN Structure

GD32 ARM Cortex MCUs

GD32 [FAMILY] [SERIES] [LINE] [PIN] [FLASH] [PKG] [TEMP]
  │      │        │       │     │      │      │      │
  │      │        │       │     │      │      │      └── Temperature grade (6=0-70°C, 7=-40-85°C)
  │      │        │       │     │      │      └── Package type (T=LQFP, K=BGA, etc.)
  │      │        │       │     │      └── Flash size code (8=64KB, B=128KB, etc.)
  │      │        │       │     └── Pin count code (C=48, R=64, V=100, etc.)
  │      │        │       └── Line number within series (01-30)
  │      │        └── Series number (1, 2, 3, 4, 5)
  │      └── Family: F=Cortex-M3, F3=M4, F4=M4F, E=Enhanced, VF=RISC-V, L=Low Power, W=Wi-Fi
  └── GD32 = MCU prefix

MCU Family Types

PrefixCoreCompatible WithNotes
GD32F1xxCortex-M3STM32F1xxEntry-level, most common
GD32F3xxCortex-M4STM32F3xxDSP instructions, no FPU
GD32F4xxCortex-M4FSTM32F4xxFPU, high performance
GD32E1xxCortex-M3-Enhanced peripherals
GD32E2xxCortex-M23-TrustZone-M
GD32E5xxCortex-M33-Enhanced security
GD32VF1xxRISC-V-Open ISA, RV32IMAC
GD32W5xxCortex-M33-Wi-Fi integrated
GD32L2xxCortex-M23-Ultra-low power

MCU Pin Count Codes

CodePin CountNotes
T36Small package
K32Compact
C48Common for prototyping
R64Medium complexity
V100High pin count
Z144Large package
I176Maximum pins

MCU Flash Size Codes

CodeFlash SizeRAM (typical)
416 KB4-6 KB
632 KB6-10 KB
864 KB10-20 KB
B128 KB20-32 KB
C256 KB32-48 KB
D384 KB48-64 KB
E512 KB64-96 KB
G1024 KB96-128 KB
I2048 KB128-256 KB

MCU Package Codes

CodePackageNotes
TLQFPStandard QFP, most common
CLQFPAlternate LQFP code
RLQFPLQFP variant
KUFBGAUltra-fine pitch BGA
UVFQFPNVery fine pitch QFN
HBGABall grid array
VVFQFPNQFN variant
YWLCSPWafer-level CSP
GWLCSPWLCSP variant

MCU Temperature Grades

CodeRangeApplication
60°C to +70°CCommercial
7-40°C to +85°CIndustrial
5-40°C to +105°CExtended

MCU MPN Examples

GD32F103C8T6
│   │  │││││
│   │  ││││└── 6 = Commercial temp (0 to +70°C)
│   │  │││└── T = LQFP package
│   │  ││└── 8 = 64KB Flash
│   │  │└── C = 48 pins
│   │  └── 03 = Line designation (compatible with STM32F103)
│   └── F1 = Cortex-M3, series 1
└── GD32 = MCU prefix

GD32VF103CBT6
│     │  │││││
│     │  ││││└── 6 = Commercial temp
│     │  │││└── T = LQFP package
│     │  ││└── B = 128KB Flash
│     │  │└── C = 48 pins
│     │  └── 03 = Line designation
│     └── VF1 = RISC-V, series 1
└── GD32 = MCU prefix

GD32F407VET7
│   │  ││││││
│   │  │││││└── 7 = Industrial temp (-40 to +85°C)
│   │  ││││└── T = LQFP package
│   │  │││└── E = 512KB Flash
│   │  ││└── V = 100 pins
│   │  │└── 07 = High-performance line
│   │  └── 4 = Series 4
│   └── F = Cortex-M4F family
└── GD32 = MCU prefix

Handler Implementation Notes

Package Code Extraction

// For Flash memory: check suffixes in order (longer first)
String[] suffixesToCheck = {"EWIGR", "CSIG", "ESIG", "WIGR", "TIGR",
        "EWIQ", "EZIQ", "WIG", "SIG", "SIQ", "SIP", "EIG",
        "ZIG", "FIG", "LIG", "NIG", "TIG", "UIG", "BIG"};

// For MCUs: package is second-to-last character
// GD32F103C8T6 -> T = LQFP
char packageChar = mpn.charAt(mpn.length() - 2);

Series Extraction

The handler extracts series by matching specific prefixes:

MPN PrefixSeries Returned
GD25Q...GD25Q
GD25B...GD25B
GD25LQ...GD25LQ
GD25WQ...GD25WQ
GD25T...GD25T
GD5F...GD5F
GD32VF1...GD32VF1
GD32F1...GD32F1
GD32F3...GD32F3
GD32F4...GD32F4
GD32E1...GD32E1
GD32E2...GD32E2
GD32E5...GD32E5
GD32W5...GD32W5
GD32L2...GD32L2

MCU Line Extraction

// GD32F103C8T6 -> GD32F103 (line)
// GD32VF103CBT6 -> GD32VF103 (line)
// RISC-V has extra 'F' so needs special handling

if (mpn.startsWith("GD32VF")) {
    return mpn.substring(0, 9); // GD32VF103
}
return mpn.substring(0, 8); // GD32F103, GD32E230

Replacement Logic

The handler's

isOfficialReplacement()
method considers parts as valid replacements when:

For Flash Memory:

  • Same series (e.g., both GD25Q)
  • Same density (e.g., both 128 Mbit)
  • Package differences are acceptable

For MCUs:

  • Same MCU line (e.g., both GD32F103)
  • Same pin count (e.g., both 48-pin)
  • Flash size and package differences are acceptable

STM32 Compatibility

GD32F series MCUs are designed as drop-in replacements for STM32F:

GD32STM32 EquivalentCompatibility Notes
GD32F103STM32F103High compatibility, same peripherals
GD32F303STM32F303Good compatibility, minor timing differences
GD32F407STM32F407Compatible with some peripheral differences

Important compatibility notes:

  • Clock speeds may differ slightly (GD32 often faster)
  • Flash write timing may vary
  • Some peripheral register bits may have differences
  • USB and CAN peripherals are highly compatible
  • Always verify critical timing-sensitive code

Common Patterns

Registered Pattern Types

// Serial NOR Flash patterns
"^GD25Q\\d+.*"    // Standard
"^GD25B\\d+.*"    // Wide voltage
"^GD25LQ\\d+.*"   // Low power
"^GD25WQ\\d+.*"   // Wide voltage low power
"^GD25T\\d+.*"    // High performance

// NAND Flash pattern
"^GD5F\\d+.*"

// MCU patterns
"^GD32F1\\d{2}.*"   // Cortex-M3
"^GD32F3\\d{2}.*"   // Cortex-M4
"^GD32F4\\d{2}.*"   // High performance M4
"^GD32E[125]\\d{2}.*"  // Enhanced
"^GD32VF1\\d{2}.*"  // RISC-V
"^GD32W5\\d{2}.*"   // Wi-Fi
"^GD32L2\\d{2}.*"   // Low power

Related Files

  • Handler:
    manufacturers/GigaDeviceHandler.java
  • Component types:
    MEMORY
    ,
    MEMORY_FLASH
    ,
    MICROCONTROLLER
  • Similar handlers:
    WinbondHandler.java
    (competing Flash),
    STHandler.java
    (compatible MCUs)

Learnings & Edge Cases

  • RISC-V MPN parsing: GD32VF1xx has "VF" as the family code (2 characters), while ARM variants use single letter (F, E, L). The regex patterns handle this with
    (VF|[VEFL])
    alternation.
  • Flash suffix order: When extracting package codes, check longer suffixes first (EWIGR before WIG before IG) to avoid partial matches.
  • STM32 compatibility: While GD32 is advertised as STM32-compatible, real-world projects may need timing adjustments. The Flash programming speed and erase time can differ.
  • Density extraction: For NAND Flash (GD5F series), density is in Gigabits (e.g., GD5F1GM7 = 1 Gbit), while NOR Flash (GD25) uses Megabits.
  • Package includes pin count: The
    extractPackageCode()
    method for MCUs returns package type with pin count (e.g., "LQFP48") when the pin code can be extracted.
  • Tape and reel suffix: The "R" or "TR" suffix indicates tape and reel packaging and should be stripped before package code extraction.
  • Handler uses Set.of(): The
    getSupportedTypes()
    method correctly uses
    Set.of()
    (immutable) rather than
    HashSet
    .
<!-- Add new learnings above this line -->