STMicroelectronics STM32G031F8P6
- Part No.:
- STM32G031F8P6
- Manufacturer:
- STMicroelectronics
- Category:
- Microcontrollers
- Package:
- 20-TSSOP (0.173", 4.40mm Width)
- Datasheet:
-
STM32G031F8P6.pdf
- Description:
- IC MCU 32BIT 64KB FLASH 20TSSOP
- Quantity:
- Payment:

- Shipping:

Inventory:1,640
Please send an inquiry. Send us your inquiry, and we will respond immediately.
Product details
Overview
STM32G031F8P6 from STMicroelectronics is a 32-bit Arm® Cortex®-M0+ microcontroller in TSSOP20 package, operating up to 64 MHz with 64 KB Flash, 8 KB SRAM, and integrated 12-bit ADC (0.4 µs conversion), dual USARTs (one with LIN/IrDA), and RTC with wakeup from Stop/Standby modes. It targets cost-sensitive industrial control, smart sensors, and battery-powered IoT edge nodes requiring low-power operation and secure firmware execution.
For engineers reviewing the STM32G031F8P6 datasheet, STM32G031F8P6 pinout, STM32G031F8P6 application, or STM32G031F8P6 equivalent, key selection criteria include its 20-pin TSSOP footprint, 1.7–3.6 V supply range, -40°C to 85°C temperature grade, 5 V-tolerant I/Os, and support for SWD debug - all critical for compact, robust embedded designs with constrained board space and power budgets.
Technical Context
The device integrates an Arm Cortex-M0+ core with MPU, supporting TrustZone-like memory protection via readout protection (RDP) levels and securable flash area. Its clock system combines internal 16 MHz RC (±1 %) and 32 kHz RC (±5 %) oscillators with optional 4–48 MHz external crystal and PLL for precise timing control across operating modes.
Peripheral interconnect uses a centralized AHB/APB matrix enabling concurrent DMA transfers (5-channel controller), flexible GPIO remapping, and low-latency interrupt handling via NVIC. Analog subsystem includes calibrated temperature sensor, VREFINT, VBAT monitoring, and hardware oversampling (up to 16-bit effective resolution) for sensor signal conditioning without external components.
Key Specifications
| Parameter | Value and Actual Design Meaning |
|---|---|
| CPU Core | Arm Cortex-M0+, 64 MHz max - enables real-time deterministic control in resource-constrained applications. |
| Memory | 64 KB Flash (with securable area & protection), 8 KB SRAM (HW parity) - supports firmware updates and data integrity in safety-aware systems. |
| ADC | 12-bit, 0.4 µs conversion, up to 16 external channels - delivers fast, high-resolution analog sensing for motor feedback or environmental monitoring. |
| Timers | 11 timers including one 128 MHz-capable advanced timer, two low-power timers, and SysTick - enables precise PWM generation, time-stamped event capture, and ultra-low-power scheduling. |
| Communication | 2× I2C (Fast-mode Plus, 1 Mbit/s), 2× USART (LIN/IrDA/ISO7816), 2× SPI (32 Mbit/s), LPUART - provides flexible wired connectivity for sensor hubs, metering, and legacy bus integration. |
| Power Management | Supply range 1.7–3.6 V; Sleep/Stop/Standby/Shutdown modes; programmable BOR/PVD - extends battery life in portable devices while maintaining reliable reset behavior across voltage transients. |
| Operating Temp | -40°C to +85°C - qualified for industrial ambient conditions without derating or thermal management overhead. |
| Debug Interface | Serial Wire Debug (SWD) - enables full on-chip debugging, flash programming, and real-time trace with minimal pin count (2 pins). |
Pinout & Package
TSSOP20 (YA package), 6.4 × 4.4 mm body, 0.65 mm pitch, ECOPACK2-compliant. Pinout validated per STMicroelectronics DS12992 Rev 4, Section 4 (Pin assignment and description), Table 12.
| Pin/Terminal | Circuit Role | Design Meaning |
|---|---|---|
| VDD | Main power supply | 1.7–3.6 V input; powers core, peripherals, and I/Os; requires local decoupling. |
| VSS | Ground reference | Digital ground return path; must be connected to PCB ground plane with low impedance. |
| NRST | Active-low reset input | Asynchronous reset trigger; accepts external pull-up and debounced push-button interface. |
| PA0 | GPIO / ADC1_IN0 / TIM2_CH1 | Multi-function pin usable as analog input channel 0 or timer capture/compare signal. |
| PA2 | USART2_TX / LPUART1_TX | Primary UART transmit line supporting both standard and low-power communication protocols. |
| PA3 | USART2_RX / LPUART1_RX | Primary UART receive line with wake-up capability from Stop mode. |
| PA4 | SPI1_NSS / DAC_OUT1 | Chip select for SPI slave selection or buffered DAC output (if enabled). |
| PA5 | SPI1_SCK | Clock output for synchronous serial communication at up to 32 Mbit/s. |
| PA6 | SPI1_MISO | Master-in, slave-out data line for full-duplex SPI transactions. |
| PA7 | SPI1_MOSI | Master-out, slave-in data line supporting high-speed peripheral interfacing. |
| PA9 | USART1_TX | Dedicated high-speed UART TX for host interface or diagnostics. |
| PA10 | USART1_RX | Dedicated high-speed UART RX with auto-baud detection and IrDA modulation support. |
| PA13 | SWDIO | Serial Wire Debug bidirectional data line for programming and real-time debugging. |
| PA14 | SWCLK | Serial Wire Debug clock input; drives debug session timing independent of system clock. |
| PC13 | RTC_OUT / LSE_OSC | 32.768 kHz crystal oscillator output or RTC alarm pulse - enables calendar timekeeping and periodic wake-up. |
| PC14 | LSE_OSC_IN | Low-speed external crystal input for RTC accuracy and low-power clock domain. |
| PC15 | LSE_OSC_OUT | Low-speed external crystal output; forms resonant circuit with PC14 for stable 32 kHz reference. |
| PF0 | OSC_IN | High-speed external crystal input (4–48 MHz); used for main system clock when HSE enabled. |
| PF1 | OSC_OUT | High-speed external crystal output; completes oscillator loop for precise CPU timing. |
| VBAT | Battery backup supply | Provides continuous power to RTC and backup registers during main supply loss (1.8–3.6 V range). |
Key Features
| Feature | Design Value |
|---|---|
| 5 V-tolerant I/Os | Up to 18 pins tolerate 5 V logic levels while powered from 1.7–3.6 V - simplifies interface with legacy 5 V peripherals without level shifters. |
| Hardware CRC unit | Dedicated accelerator for CRC-32 calculation - offloads CPU during firmware update verification and data packet integrity checks. |
| Programmable Brownout Reset (BOR) | Configurable trip points (Level 0–3) ensure deterministic reset before supply collapse - prevents erratic code execution during brownout events. |
| Calendar RTC with alarm | Real-time clock with calendar, alarm, and periodic wakeup from Stop/Standby - enables scheduled tasks and energy-efficient polling intervals. |
| Secure boot & RDP | Readout Protection Level 2 blocks flash readout and debug access - enforces IP protection and prevents unauthorized firmware extraction. |
| 96-bit unique ID | Factory-programmed identifier accessible via system memory - supports device authentication, licensing, and secure provisioning in production. |
Applications
| Industrial Sensor Node | Smart Meter Interface |
|---|---|
Use Scenario: Compact environmental monitor measuring temperature, humidity, and pressure in factory-floor enclosures. IC Role / Device Role / Timing Role: Main controller executing sensor fusion, local decision logic, and UART-based telemetry to gateway. Use Value: Integrated 12-bit ADC with oversampling eliminates external signal conditioning; low-power Stop mode extends battery life to >5 years on coin cell. | Use Scenario: Pulse-counting module interfacing mechanical water/gas meters with LoRaWAN concentrator. IC Role / Device Role / Timing Role: Edge preprocessor converting mechanical pulses to timestamped digital events using LPTIM1 and RTC alarm. Use Value: Dual USARTs enable simultaneous RS-485 meter interface and LoRa modem control; 5 V-tolerant I/Os simplify connection to legacy meter outputs. |
| USB-C Power Adapter Controller | Home Appliance Motor Driver |
Use Scenario: Secondary-side PD controller managing USB-C power negotiation and overvoltage protection in compact AC/DC adapters. IC Role / Device Role / Timing Role: Real-time PD protocol stack executor with precise timing for BMC signaling and fault response. Use Value: SWD debug support enables field firmware updates; VBAT-backed RTC maintains accurate logging timestamps during power cycling. | Use Scenario: Brushless DC motor commutation controller in HVAC blowers and washing machine drum drives. IC Role / Device Role / Timing Role: High-resolution PWM generator using TIM1's 128 MHz capability and ADC-triggered current sampling. Use Value: Advanced timer with dead-time insertion and complementary outputs ensures safe gate driving; 64 MHz core handles FOC calculations within 10 µs loop time. |
Equivalent & Alternatives
The following parts are listed as comparable options for similar microcontroller applications.
| Alternative Part | Technical Difference | Application Difference | Selection Advice |
|---|---|---|---|
| STM32G030F6P6 | Same TSSOP20 package but only 32 KB Flash and no securable area or VREFBUF. | Lacks hardware oversampling and secure boot features - unsuitable for firmware IP protection or high-accuracy sensor applications. | Select when cost is primary constraint and security/analog precision requirements are minimal. |
| STM32G041F8P6 | Same pinout and memory size, but adds USB 2.0 FS device interface and enhanced tamper detection. | Enables direct USB connectivity and anti-tamper logging - required for certified metering or regulatory-compliant devices. | Choose when USB host/device interface or extended security compliance (e.g., IEC 62443) is mandatory. |
Compared with STM32G030F6P6, the STM32G031F8P6 offers double Flash capacity, hardware CRC, and VREFBUF for improved analog accuracy; versus STM32G041F8P6, it trades USB for lower BOM cost and reduced die complexity where wired serial suffices.
Availability
STM32G031F8P6 is available at Aetrix Electronics and suitable for industrial sensor nodes, smart meter interfaces, USB-C adapter controllers, and home appliance motor drivers requiring stable component supply across multi-year production cycles.
Supply support for STM32G031F8P6 includes scheduled delivery planning, volume procurement assistance, BOM continuity management, traceable sourcing, and lifecycle availability coordination for OEM customers, industrial embedded developers, connected-device designers, and electronics production programs.
Manufacturer
STMicroelectronics is a global semiconductor leader headquartered in Geneva, Switzerland, designing and manufacturing microcontrollers, power ICs, MEMS, and automotive semiconductors since 1987.
The STM32G0 series targets cost-optimized, low-power general-purpose applications with emphasis on security, analog integration, and simplified development - bridging entry-level Cortex-M0+ performance with production-ready features for mass-market embedded systems.
FAQ
What is the maximum operating frequency of the STM32G031F8P6?
The STM32G031F8P6 operates at up to 64 MHz using its internal 16 MHz RC oscillator with PLL multiplication or external crystal sources. This frequency is fully supported across the entire 1.7–3.6 V supply range and -40°C to +85°C temperature grade, with timing verified per DS12992 Rev 4 Section 5.3.22 (Timer characteristics) and Section 5.3.9 (PLL characteristics).
Does the STM32G031F8P6 support hardware encryption or secure boot?
The STM32G031F8P6 supports secure boot through Readout Protection Level 2 (RDP2), which permanently disables debug access and flash readout, and enables securable flash areas for protected code execution. While it lacks dedicated AES or PKA accelerators, its RDP2 + write protection + unique ID provide foundational security for firmware IP protection and anti-cloning in industrial deployments.
Can the STM32G031F8P6 drive 5 V logic peripherals directly?
Yes - up to 18 I/O pins on the STM32G031F8P6 are 5 V-tolerant when VDD is ≥ 2.0 V, as specified in DS12992 Rev 4 Section 5.3.14 (I/O port characteristics) and Table 52. This allows direct connection to 5 V UART transceivers, SPI EEPROMs, or GPIO expanders without external level-shifting circuitry, reducing BOM count and board area.
What debug interface does the STM32G031F8P6 use, and how many pins are required?
The STM32G031F8P6 uses Serial Wire Debug (SWD), requiring only two physical pins: PA13 (SWDIO) and PA14 (SWCLK). This 2-pin interface supports full programming, real-time debugging, and memory inspection via standard tools like ST-LINK/V2-1, OpenOCD, or SEGGER J-Link, with no need for JTAG pins or additional signals.
STM32G031F8P6 Specifications
- Product attributes
- Attribute value
- Manufacturer:
- STMicroelectronics
- Package/Case:
- 20-TSSOP (0.173", 4.40mm Width)
- Series:
- STM32G0
- Packaging:
- Tube
- Product Status:
- Active
- Programmable:
- Not Verified
- Core Processor:
- ARM® Cortex®-M0+
- Core Size:
- 32-Bit Single-Core
- Speed:
- 64MHz
- Connectivity:
- I2C, IrDA, LINbus, SPI, SmartCard, UART/USART
- Peripherals:
- Brown-out Detect/Reset, DMA, I2S, POR, PWM, WDT
- Number of I/O:
- 18
- Program Memory Size:
- 64KB (64K x 8)
- Program Memory Type:
- FLASH
- EEPROM Size:
- -
- RAM Size:
- 8K x 8
- Voltage - Supply (Vcc/Vdd):
- 1.7V ~ 3.6V
- Data Converters:
- A/D 17x12b SAR
- Oscillator Type:
- External, Internal
- Operating Temperature:
- -40°C ~ 85°C (TA)
- Grade:
- -
- Qualification:
- -
- Mounting Type:
- Surface Mount
- Supplier Device Package:
STM32G031F8P6 FAQ
1.How can I place an order for STM32G031F8P6 through Aetrix?
Please submit a Request for Quotation (RFQ) for STM32G031F8P6 on Aetrix. Our sales agent will provide a competitive quotation and guide you through the order confirmation once you accept the terms.
2.Are the price and stock information for STM32G031F8P6 reliable?
The price and inventory of STM32G031F8P6 are updated periodically and may fluctuate due to market conditions. Stock and pricing data are typically refreshed every 24 hours. Quotation validity for STM32G031F8P6 is usually 5 days.
3.What payment methods are accepted for STM32G031F8P6?
We accept Wire Transfer, PayPal, Credit Card, Western Union, MoneyGram, and Escrow for STM32G031F8P6 transactions.
Note: Certain payment methods may incur a processing fee.
4.How is shipping managed for STM32G031F8P6?
STM32G031F8P6 orders can be shipped via leading logistics carriers, including DHL, UPS, FedEx, TNT, or Registered Mail.
Once your STM32G031F8P6 order is processed, you will receive an email with the shipment details and tracking number.
Note: Tracking information may take up to 24 hours to appear. Express delivery typically takes 3–5 business days.
5.How can I obtain technical support or documentation for STM32G031F8P6?
For technical support, including STM32G031F8P6 datasheets, pinout diagrams, or application guidance, please contact our engineering support team. They can provide detailed documentation and assistance for your STM32G031F8P6 requirements.
6.How does Aetrix verify that STM32G031F8P6 is sourced from the original manufacturer or authorized distributors?
All STM32G031F8P6 products on Aetrix are procured from qualified distributors and authorized channels. Our dedicated quality assurance team conducts strict verification, including traceability checks and, if necessary, third-party testing. This ensures that STM32G031F8P6 meets industry standards.
7.What is the process for return or replacement of STM32G031F8P6?
All STM32G031F8P6 units undergo pre-shipment inspection (PSI). If there is an issue with STM32G031F8P6, returns or replacements are accepted under the following conditions:
1.Quantity discrepancies, incorrect items, or visible external defects (such as breakage or corrosion), acknowledged by Aetrix.
2.The issue is reported within 90 days of delivery.
3.The STM32G031F8P6 part is unused and in its original packaging.
Return procedure for STM32G031F8P6:
1.Submit a request within 90 days.
2.Obtain a Return Material Authorization (RMA) from Aetrix.
STM32G031F8P6 Tags

-
ATTINY4-TSHR
Microchip Technology

-
ATTINY10-TSHR
Microchip Technology

-
ATTINY10-TS8R
Microchip Technology

-
ATTINY202-SSNR
Microchip Technology

-
ATTINY202-SSFR
Microchip Technology

-
ATTINY402-SSNR
Microchip Technology

-
PIC16F15213T-I/MF
Microchip Technology

-
PIC16F15213-E/MF
Microchip Technology

-
PIC10F200T-I/OT
Microchip Technology

-
ATTINY412-SSNR
Microchip Technology

-
PIC10F202T-I/OT
Microchip Technology

-
ATTINY404-SSNR
Microchip Technology
Tech Hub
A practical engineering guide to 3.3V and 5V logic compatibility, input thresholds, resistor dividers, translator ICs, MOSFET level shifting, I2C pull-ups, timing limits and power-sequencing risks.
The 74HC595 uses push-pull logic outputs, while the TPIC6B595 uses 50 V open-drain DMOS sinks for higher-power loads. This guide compares timing, current limits, 3.3 V interfacing, load wiring, thermal…
The 74HC595 converts serial data into eight stable parallel outputs. This guide covers pin functions, shift and storage timing, OE and MR behavior, drive-current limits, cascading, voltage compatibilit…
A technical comparison of level-sensitive latches and edge-triggered flip-flops, covering timing windows, setup and hold limits, master–slave operation, time borrowing, race-through, HDL inference and…
A D latch stores one bit while Enable controls when data can pass. This reference covers gate-level operation, truth tables, transparency, setup and hold timing, LE versus OE, common ICs and practical …
An SR latch stores one bit through cross-coupled feedback. This engineering reference covers NOR and NAND implementations, truth tables, forbidden-state recovery, gated operation, switch debouncing, fa…
Latch circuits retain one bit through feedback. This technical reference covers SR and D latches, truth tables, transparency, timing limits, latch-versus-flip-flop behavior, applications and common log…
An engineering guide to LED driver operation, constant-current and constant-voltage outputs, linear and switching topologies, dimming, IC selection, calculations, replacement compatibility, and fault c…
Operational amplifier guide covering op amp basics, feedback, ideal vs real op amps, common configurations, buffer circuits, offset, bias current, gain-bandwidth, slew rate, rail-to-rail limits and sel…
Jumper cables guide covering safe connection order, red and black clamp placement, final ground connection, cable gauge, length, clamp quality, copper vs CCA cables, jump starter comparison and battery…

