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
SO8N
TSSOP20
LQFP32
UFQFPN28
-40C to 85C/105C/125C operating 4.9 6 mm
6.4 4.4 mm
7 7 mm
4 4 mm
temperature
LQFP48 UFQFPN32
5 5 mm
7 7 mm
Memories
UFQFPN48
7 7 mm
Up to 64 Kbytes of Flash memory with
WLCSP18
protection and securable area
1.86 2.14 mm
8 Kbytes of SRAM with HW parity check
Communication interfaces
CRC calculation unit
2
Two I C-bus interfaces supporting Fast-
Reset and power management
mode Plus (1 Mbit/s) with extra current
Voltage range: 1.7 V to 3.6 V
sink, one supporting SMBus/PMBus and
wakeup from Stop mode
Power-on/Power-down reset (POR/PDR)
Two USARTs with master/slave
Programmable Brownout reset (BOR)
synchronous SPI; one supporting ISO7816
Programmable voltage detector (PVD)
interface, LIN, IrDA capability, auto baud
Low-power modes:
rate detection and wakeup feature
Sleep, Stop, Standby, Shutdown
One low-power UART
V supply for RTC and backup registers
BAT
Two SPIs (32 Mbit/s) with 4- to 16-bit
Clock management
programmable bitframe, one multiplexed
2
4 to 48 MHz crystal oscillator
with I S interface
32 kHz crystal oscillator with calibration
Development support: serial wire debug (SWD)
Internal 16 MHz RC with PLL option (1 %)
96-bit unique ID
Internal 32 kHz RC oscillator (5 %)
All packages ECOPACK 2 compliant
Up to 44 fast I/Os
All mappable on external interrupt vectors
Table 1. Device summary
Multiple 5 V-tolerant I/Os
Reference Part number
5-channel DMA controller with flexible mapping
STM32G031C4, STM32G031F4,
12-bit, 0.4 s ADC (up to 16 ext. channels)
STM32G031x4 STM32G031G4, STM32G031K4,
STM32G031J4
Up to 16-bit with hardware oversampling
Conversion range: 0 to 3.6V STM32G031C6, STM32G031F6,
STM32G031x6 STM32G031G6, STM32G031K6,
11 timers (one 128 MHz capable): 16-bit for
STM32G031J6
advanced motor control, one 32-bit and four
STM32G031C8, STM32G031F8,
16-bit general-purpose, two low-power 16-bit,
STM32G031x8 STM32G031G8, STM32G031K8,
two watchdogs, SysTick timer
STM32G031Y8
Calendar RTC with alarm and periodic wakeup
from Stop/Standby/Shutdown
April 2020 DS12992 Rev 2 1/117
This is information on a product in full production. www.st.comContents STM32G031x4/x6/x8
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.7.5 Reset mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.7.6 VBAT operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
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) . . . . . . . . . . . . . . . . . . . . . . 22
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 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
REFINT
3.14.3 V battery voltage monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
BAT
3.15 Voltage reference buffer (VREFBUF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.16 Timers and watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2/117 DS12992 Rev 2