This is information on a product in full production.
October 2021 DS12992 Rev 3 1/120
STM32G031x4/x6/x8
Arm
®
Cortex
®
-M0+ 32-bit MCU, up to 64 KB Flash, 8 KB RAM,
2x USART, timers, ADC, comm. I/Fs, 1.7-3.6V
Datasheet - production data
Features
Core: Arm
®
32-bit Cortex
®
-M0+ CPU,
frequency up to 64 MHz
-40°C to 85°C/105°C/125°C operating
temperature
Memories
Up to 64 Kbytes of Flash memory with
protection and securable area
8 Kbytes of SRAM with HW parity check
CRC calculation unit
Reset and power management
Voltage range: 1.7 V to 3.6 V
Power-on/Power-down reset (POR/PDR)
Programmable Brownout reset (BOR)
Programmable voltage detector (PVD)
Low-power modes:
Sleep, Stop, Standby, Shutdown
–V
BAT
supply for RTC and backup registers
Clock management
4 to 48 MHz crystal oscillator
32 kHz crystal oscillator with calibration
Internal 16 MHz RC with PLL option (±1 %)
Internal 32 kHz RC oscillator (±5 %)
Up to 44 fast I/Os
All mappable on external interrupt vectors
Multiple 5 V-tolerant I/Os
5-channel DMA controller with flexible mapping
12-bit, 0.4 µs ADC (up to 16 ext. channels)
Up to 16-bit with hardware oversampling
Conversion range: 0 to 3.6V
11 timers (one 128 MHz capable): 16-bit for
advanced motor control, one 32-bit and four
16-bit general-purpose, two low-power 16-bit,
two watchdogs, SysTick timer
Calendar RTC with alarm and periodic wakeup
from Stop/Standby/Shutdown
Communication interfaces
–Two I
2
C-bus interfaces supporting Fast-
mode Plus (1 Mbit/s) with extra current
sink, one supporting SMBus/PMBus and
wakeup from Stop mode
Two USARTs with master/slave
synchronous SPI; one supporting ISO7816
interface, LIN, IrDA capability, auto baud
rate detection and wakeup feature
One low-power UART
Two SPIs (32 Mbit/s) with 4- to 16-bit
programmable bitframe, one multiplexed
with I
2
S interface
Development support: serial wire debug (SWD)
96-bit unique ID
All packages ECOPACK
2 compliant
Table 1. Device summary
Reference Part number
STM32G031x4
STM32G031C4, STM32G031F4,
STM32G031G4, STM32G031K4,
STM32G031J4
STM32G031x6
STM32G031C6, STM32G031F6,
STM32G031G6, STM32G031K6,
STM32G031J6
STM32G031x8
STM32G031C8, STM32G031F8,
STM32G031G8, STM32G031K8,
STM32G031Y8
UFQFPN48
UFQFPN32
UFQFPN28
LQFP48
LQFP32
7×7 mm
5×5 mm
4×4 mm
7
×
7 mm
7
×
7 mm
TSSOP20
6.4
×
4.4 mm
SO8N
4.9
×
6 mm
WLCSP18
1.86 × 2.14 mm
www.st.com
Contents STM32G031x4/x6/x8
2/120 DS12992 Rev 3
Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.1 Arm
®
Cortex
®
-M0+ core with MPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Memory protection unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Embedded Flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3.1 Securable area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4 Embedded SRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.5 Boot modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.6 Cyclic redundancy check calculation unit (CRC) . . . . . . . . . . . . . . . . . . . 15
3.7 Power supply management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.7.1 Power supply schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.7.2 Power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.7.3 Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.7.4 Low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.7.5 Reset mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.7.6 VBAT operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.8 Interconnect of peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.9 Clocks and startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.10 General-purpose inputs/outputs (GPIOs) . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.11 Direct memory access controller (DMA) . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.12 DMA request multiplexer (DMAMUX) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.13 Interrupts and events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.13.1 Nested vectored interrupt controller (NVIC) . . . . . . . . . . . . . . . . . . . . . . 23
3.13.2 Extended interrupt/event controller (EXTI) . . . . . . . . . . . . . . . . . . . . . . 23
3.14 Analog-to-digital converter (ADC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.14.1 Temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.14.2 Internal voltage reference (V
REFINT
) . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.14.3 V
BAT
battery voltage monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.15 Voltage reference buffer (VREFBUF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.16 Timers and watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25