STM32G031C4U6TR [STMICROELECTRONICS]

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;
STM32G031C4U6TR
型号: STM32G031C4U6TR
厂家: ST    ST
描述:

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

文件: 总117页 (文件大小:1931K)
中文:  中文翻译
下载:  下载PDF数据表文档文件
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  
6.4 4.4 mm  
LQFP32  
7 mm  
LQFP48  
7 mm  
UFQFPN28  
4 × 4 mm  
UFQFPN32  
5 × 5 mm  
-40°C to 85°C/105°C/125°C operating  
4.9  
×
6 mm  
×
7
×
temperature  
7
×
Memories  
UFQFPN48  
7 × 7 mm  
– Up to 64 Kbytes of Flash memory with  
protection and securable area  
WLCSP18  
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-  
mode Plus (1 Mbit/s) with extra current  
sink, one supporting SMBus/PMBus and  
wakeup from Stop mode  
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)  
– Two USARTs with master/slave  
synchronous SPI; one supporting ISO7816  
interface, LIN, IrDA capability, auto baud  
rate detection and wakeup feature  
– Low-power modes:  
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  
programmable bitframe, one multiplexed  
Clock management  
2
– 4 to 48 MHz crystal oscillator  
with I S interface  
– 32 kHz crystal oscillator with calibration  
– Internal 16 MHz RC with PLL option (±1 %)  
– Internal 32 kHz RC oscillator (±5 %)  
Development support: serial wire debug (SWD)  
96-bit unique ID  
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,  
STM32G031G4, STM32G031K4,  
STM32G031J4  
12-bit, 0.4 µs ADC (up to 16 ext. channels)  
– Up to 16-bit with hardware oversampling  
– Conversion range: 0 to 3.6V  
STM32G031x4  
STM32G031C6, STM32G031F6,  
STM32G031G6, STM32G031K6,  
STM32G031J6  
STM32G031x6  
STM32G031x8  
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  
STM32G031C8, STM32G031F8,  
STM32G031G8, STM32G031K8,  
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.com  
 
Contents  
STM32G031x4/x6/x8  
Contents  
1
2
3
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9  
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10  
Functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13  
3.1  
3.2  
3.3  
Arm® Cortex®-M0+ core with MPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13  
Memory protection unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13  
Embedded Flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13  
3.3.1  
Securable area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14  
3.4  
3.5  
3.6  
3.7  
Embedded SRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15  
Boot modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15  
Cyclic redundancy check calculation unit (CRC) . . . . . . . . . . . . . . . . . . . 15  
Power supply management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15  
3.7.1  
3.7.2  
3.7.3  
3.7.4  
3.7.5  
3.7.6  
Power supply schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15  
Power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17  
Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17  
Low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17  
Reset mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18  
VBAT operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18  
3.8  
3.9  
Interconnect of peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  
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  
STM32G031x4/x6/x8  
Contents  
3.16.1 Advanced-control timer (TIM1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25  
3.16.2 General-purpose timers (TIM2, 3, 14, 16, 17) . . . . . . . . . . . . . . . . . . . . 26  
3.16.3 Low-power timers (LPTIM1 and LPTIM2) . . . . . . . . . . . . . . . . . . . . . . . 26  
3.16.4 Independent watchdog (IWDG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27  
3.16.5 System window watchdog (WWDG) . . . . . . . . . . . . . . . . . . . . . . . . . . . 27  
3.16.6 SysTick timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27  
3.17 Real-time clock (RTC), tamper (TAMP) and backup registers . . . . . . . . . 27  
3.18 Inter-integrated circuit interface (I2C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  
3.19 Universal synchronous/asynchronous receiver transmitter (USART) . . . 29  
3.20 Low-power universal asynchronous receiver transmitter (LPUART) . . . . 30  
3.21 Serial peripheral interface (SPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31  
3.22 Development support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31  
3.22.1 Serial wire debug port (SW-DP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31  
4
5
Pinouts, pin description and alternate functions . . . . . . . . . . . . . . . . . 32  
Electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43  
5.1  
Parameter conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43  
5.1.1  
5.1.2  
5.1.3  
5.1.4  
5.1.5  
5.1.6  
5.1.7  
Minimum and maximum values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43  
Typical values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43  
Typical curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43  
Loading capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43  
Pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43  
Power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44  
Current consumption measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . 44  
5.2  
5.3  
Absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45  
Operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46  
5.3.1  
5.3.2  
5.3.3  
5.3.4  
5.3.5  
5.3.6  
General operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46  
Operating conditions at power-up / power-down . . . . . . . . . . . . . . . . . . 47  
Embedded reset and power control block characteristics . . . . . . . . . . . 47  
Embedded voltage reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48  
Supply current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49  
Wakeup time from low-power modes and voltage scaling  
transition times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57  
5.3.7  
5.3.8  
External clock source characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 59  
Internal clock source characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 63  
DS12992 Rev 2  
3/117  
4
Contents  
STM32G031x4/x6/x8  
5.3.9  
PLL characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65  
5.3.10 Flash memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65  
5.3.11 EMC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66  
5.3.12 Electrical sensitivity characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68  
5.3.13 I/O current injection characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69  
5.3.14 I/O port characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70  
5.3.15 NRST input characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75  
5.3.16 Analog switch booster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76  
5.3.17 Analog-to-digital converter characteristics . . . . . . . . . . . . . . . . . . . . . . . 76  
5.3.18 Voltage reference buffer characteristics . . . . . . . . . . . . . . . . . . . . . . . . 83  
5.3.19 Temperature sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84  
5.3.20  
V
monitoring characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84  
BAT  
5.3.21 Timer characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85  
5.3.22 Characteristics of communication interfaces . . . . . . . . . . . . . . . . . . . . . 85  
6
Package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93  
6.1  
6.2  
6.3  
6.4  
6.5  
6.6  
6.7  
6.8  
6.9  
LQFP48 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93  
UFQFPN48 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96  
LQFP32 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99  
UFQFPN32 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102  
UFQFPN28 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104  
TSSOP20 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106  
WLCSP18 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108  
SO8N package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110  
Thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113  
6.9.1  
6.9.2  
Reference document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113  
Selecting the product temperature range . . . . . . . . . . . . . . . . . . . . . . 113  
7
8
Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115  
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116  
4/117  
DS12992 Rev 2  
STM32G031x4/x6/x8  
List of tables  
List of tables  
Table 1.  
Table 2.  
Table 3.  
Table 4.  
Table 5.  
Table 6.  
Table 7.  
Table 8.  
Table 9.  
Table 10.  
Table 11.  
Table 12.  
Table 13.  
Table 14.  
Table 15.  
Table 16.  
Table 17.  
Table 18.  
Table 19.  
Table 20.  
Table 21.  
Table 22.  
Table 23.  
Table 24.  
Table 25.  
Device summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1  
STM32G031x4/x6/x8 family device features and peripheral counts. . . . . . . . . . . . . . . . . . 11  
Access status versus readout protection level and execution modes. . . . . . . . . . . . . . . . . 14  
Interconnect of STM32G031x4/x6/x8 peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  
Temperature sensor calibration values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24  
Internal voltage reference calibration values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24  
Timer feature comparison. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25  
2
I C implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  
USART implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  
SPI/I2S implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31  
Terms and symbols used in Table 12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  
Pin assignment and description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36  
Port A alternate function mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40  
Port B alternate function mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41  
Port C alternate function mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42  
Port D alternate function mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42  
Port F alternate function mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42  
Voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45  
Current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45  
Thermal characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46  
General operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46  
Operating conditions at power-up / power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47  
Embedded reset and power control block characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . 47  
Embedded internal voltage reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48  
Current consumption in Run and Low-power run modes  
at different die temperatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50  
Typical current consumption in Run and Low-power run modes,  
Table 26.  
depending on code executed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51  
Current consumption in Sleep and Low-power sleep modes . . . . . . . . . . . . . . . . . . . . . . . 52  
Current consumption in Stop 0 mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52  
Current consumption in Stop 1 mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53  
Current consumption in Standby mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53  
Current consumption in Shutdown mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54  
Current consumption in VBAT mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54  
Current consumption of peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56  
Low-power mode wakeup times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57  
Regulator mode transition times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58  
Wakeup time using LPUART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58  
High-speed external user clock characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59  
Low-speed external user clock characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59  
HSE oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60  
Table 27.  
Table 28.  
Table 29.  
Table 30.  
Table 31.  
Table 32.  
Table 33.  
Table 34.  
Table 35.  
Table 36.  
Table 37.  
Table 38.  
Table 39.  
Table 40.  
Table 41.  
Table 42.  
Table 43.  
Table 44.  
Table 45.  
Table 46.  
LSE oscillator characteristics (f  
= 32.768 kHz) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62  
LSE  
HSI16 oscillator characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63  
LSI oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64  
PLL characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65  
Flash memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65  
Flash memory endurance and data retention. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66  
EMS characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67  
DS12992 Rev 2  
5/117  
6
List of tables  
STM32G031x4/x6/x8  
Table 47.  
Table 48.  
Table 49.  
Table 50.  
Table 51.  
Table 52.  
Table 53.  
Table 54.  
Table 55.  
Table 56.  
Table 57.  
Table 58.  
Table 59.  
Table 60.  
Table 61.  
Table 62.  
Table 63.  
Table 64.  
Table 65.  
Table 66.  
Table 67.  
Table 68.  
Table 69.  
Table 70.  
Table 71.  
Table 72.  
Table 73.  
Table 74.  
Table 75.  
Table 76.  
Table 77.  
Table 78.  
Table 79.  
Table 80.  
Table 81.  
EMI characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68  
ESD absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68  
Electrical sensitivity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68  
I/O current injection susceptibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69  
I/O static characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70  
Input characteristics of FT_e I/Os. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71  
Output voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73  
I/O AC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73  
NRST pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75  
Analog switch booster characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76  
ADC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76  
Maximum ADC R  
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78  
AIN  
ADC accuracy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79  
VREFBUF characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83  
TS characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84  
V
V
monitoring characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84  
charging characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84  
BAT  
BAT  
TIMx characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85  
IWDG min/max timeout period at 32 kHz LSI clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85  
Minimum I2CCLK frequency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86  
I2C analog filter characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86  
SPI characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87  
2
I S characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89  
USART characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91  
LQFP48 mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93  
UFQFPN48 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96  
LQFP32 mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99  
UFQFPN32 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102  
UFQFPN28 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104  
TSSOP20 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106  
WLCSP18 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108  
WLCSP18 recommended PCB design rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110  
SO8N package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111  
Package thermal characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113  
Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116  
6/117  
DS12992 Rev 2  
STM32G031x4/x6/x8  
List of figures  
List of figures  
Figure 1.  
Figure 2.  
Figure 3.  
Figure 4.  
Figure 5.  
Figure 6.  
Figure 7.  
Figure 8.  
Figure 9.  
Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12  
Power supply overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16  
STM32G031CxT LQFP48 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32  
STM32G031CxU UFQFPN48 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32  
STM32G031KxT LQFP32 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33  
STM32G031KxU UFQFPN32 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33  
STM32G031GxU UFQFPN28 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34  
STM32G031Fx TSSOP20 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34  
STM32G031Yx WLCSP18 ballout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34  
Figure 10. STM32G031Jx SO8N pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  
Figure 11. Pin loading conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43  
Figure 12. Pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43  
Figure 13. Power supply scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44  
Figure 14. Current consumption measurement scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44  
Figure 15.  
V
vs. temperature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49  
REFINT  
Figure 16. High-speed external clock source AC timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59  
Figure 17. Low-speed external clock source AC timing diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60  
Figure 18. Typical application with an 8 MHz crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62  
Figure 19. Typical application with a 32.768 kHz crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63  
Figure 20. HSI16 frequency vs. temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64  
Figure 21. I/O input characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71  
Figure 22. Current injection into FT_e input with diode active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72  
(1)  
Figure 23. I/O AC characteristics definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75  
Figure 24. Recommended NRST pin protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76  
Figure 25. ADC accuracy characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82  
Figure 26. Typical connection diagram using the ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82  
Figure 27. SPI timing diagram - slave mode and CPHA = 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88  
Figure 28. SPI timing diagram - slave mode and CPHA = 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88  
Figure 29. SPI timing diagram - master mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89  
2
Figure 30. I S slave timing diagram (Philips protocol) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90  
2
Figure 31. I S master timing diagram (Philips protocol). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91  
Figure 32. LQFP48 package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93  
Figure 33. Recommended footprint for LQFP48 package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94  
Figure 34. LQFP48 package marking example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95  
Figure 35. UFQFPN48 package outline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96  
Figure 36. Recommended footprint for UFQFPN48 package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97  
Figure 37. UFQFPN48 package marking example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98  
Figure 38. LQFP32 package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99  
Figure 39. Recommended footprint for LQFP32 package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100  
Figure 40. LQFP32 package marking example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101  
Figure 41. UFQFPN32 package outline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102  
Figure 42. Recommended footprint for UFQFPN32 package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103  
Figure 43. UFQFPN32 package marking example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103  
Figure 44. UFQFPN28 package outline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104  
Figure 45. Recommended footprint for UFQFPN28 package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105  
Figure 46. UFQFPN28 package marking example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105  
Figure 47. TSSOP20 package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106  
Figure 48. TSSOP20 package footprint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107  
DS12992 Rev 2  
7/117  
8
List of figures  
STM32G031x4/x6/x8  
Figure 49. TSSOP20 package marking example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107  
Figure 50. WLCSP18 package outline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108  
Figure 51. WLCSP18 recommended PCB ball footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109  
Figure 52. WLCSP18 package marking example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110  
Figure 53. SO8N package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111  
Figure 54. SO8N package recommended footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112  
Figure 55. SO8N package marking example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112  
8/117  
DS12992 Rev 2  
STM32G031x4/x6/x8  
Introduction  
1
Introduction  
This document provides information on STM32G031x4/x6/x8 microcontrollers, such as  
description, functional overview, pin assignment and definition, electrical characteristics,  
packaging, and ordering codes.  
Information on memory mapping and control registers is object of reference manual.  
®(a)  
®
Information on Arm  
Cortex -M0+ core is available from the www.arm.com website.  
a. Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.  
DS12992 Rev 2  
9/117  
31  
 
Description  
STM32G031x4/x6/x8  
2
Description  
The STM32G031x4/x6/x8 mainstream microcontrollers are based on high-performance  
®
®
Arm Cortex -M0+ 32-bit RISC core operating at up to 64 MHz frequency. Offering a high  
level of integration, they are suitable for a wide range of applications in consumer, industrial  
and appliance domains and ready for the Internet of Things (IoT) solutions.  
The devices incorporate a memory protection unit (MPU), high-speed embedded memories  
(8 Kbytes of SRAM and up to 64 Kbytes of Flash program memory with read protection,  
write protection, proprietary code protection, and securable area), DMA, an extensive range  
of system functions, enhanced I/Os, and peripherals. The devices offer standard  
2
2
communication interfaces (two I Cs, two SPIs / one I S, and two USARTs), one 12-bit ADC  
(2.5 MSps) with up to 19 channels, an internal voltage reference buffer, a low-power RTC,  
an advanced control PWM timer running at up to double the CPU frequency, four general-  
purpose 16-bit timers, a 32-bit general-purpose timer, two low-power 16-bit timers, two  
watchdog timers, and a SysTick timer.  
The devices operate within ambient temperatures from -40 to 125°C. They can operate with  
supply voltages from 1.7 V to 3.6 V. Optimized dynamic consumption combined with a  
comprehensive set of power-saving modes, low-power timers and low-power UART, allows  
the design of low-power applications.  
VBAT direct battery input allows keeping RTC and backup registers powered.  
The devices come in packages with 8 to 48 pins.  
10/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Description  
Table 2. STM32G031x4/x6/x8 family device features and peripheral counts  
STM32G031_  
Peripheral  
_J4 _J6 _Y8 _F4 _F6 _F8 _G4 _G6 _G8 _K4 _K6 _K8 _C4 _C6 _C8  
Flash memory (Kbyte) 16  
SRAM (Kbyte)  
Advanced control  
General-purpose  
Low-power  
32  
64  
16  
32  
64  
16  
32  
64  
16  
32  
64  
16  
32  
64  
8 with parity  
1 (16-bit) high frequency  
4 (16-bit) + 1 (32-bit)  
2 (16-bit)  
SysTick  
1
2
Watchdog  
SPI [I2S](1)  
2 [1]  
2
I2C  
USART  
2
LPUART  
1
RTC  
Yes  
2
Tamper pins  
Random number  
generator  
No  
AES  
GPIOs  
No  
26  
4
6
3
16  
18  
30  
44  
Wakeup pins  
12-bit ADC channels  
(external + internal)  
15+  
2
6 + 2  
14 + 2  
16 + 2  
16 + 3  
Yes  
Internal voltage  
reference buffer  
No  
Max. CPU frequency  
Operating voltage  
64 MHz  
1.7 to 3.6 V  
Operating  
Ambient: -40 to 85 °C / -40 to 105 °C / -40 to 125 °C  
Junction: -40 to 105 °C / -40 to 125 °C / -40 to 130 °C  
temperature(2)  
Number of pins  
8
18  
20  
28  
32  
48  
1. The numbers in brackets denote the count of SPI interfaces configurable as I2S interface.  
2. Depends on order code. Refer to Section 7: Ordering information for details.  
DS12992 Rev 2  
11/117  
31  
 
Description  
STM32G031x4/x6/x8  
Figure 1. Block diagram  
POWER  
SWCLK  
SWDIO  
as AF  
DMAMUX  
SWD  
Voltage  
VCORE  
regulator  
DMA  
VDDIO1  
VDD/VDDA  
VSS/VSSA  
CPU  
VDDA  
Flash memory  
CORTEX-M0+  
fmax = 64 MHz  
I/F  
VDD  
SUPPLY  
up to 64 KB  
SUPERVISION  
POR  
Reset  
Int  
POR/BOR  
T sensor  
PVD  
SRAM  
NRST  
8 KB  
Parity  
NVIC  
IOPORT  
HSI16  
RC 16 MHz  
PLL  
PLLPCLK  
PLLQCLK  
PLLRCLK  
LSI  
GPIOs  
Port A  
PA[15:0]  
PB[15:0]  
XTAL OSC  
4-48 MHz  
RC 32 kHz  
OSC_IN  
OSC_OUT  
Port B  
Port C  
Port D  
Port F  
HSE  
IWDG  
PC[15:13,6,7]  
PD[3:0]  
I/F  
VDD  
VBAT  
LSE  
RCC  
Reset & clock control  
Low-voltage  
detector  
CRC  
PF[2:0]  
LSE  
OSC32_IN  
OSC32_OUT  
XTAL32 kHz  
System and  
peripheral  
clocks  
RTC, TAMP  
Backup regs  
RTC_OUT  
RTC_REFIN  
RTC_TS  
EXTI  
44 AF  
I/F  
TAMP_IN  
AHB-to-APB  
6 channels  
TIM1  
TIM2 (32-bit)  
TIM3  
BRK, ETR input as AF  
4 ch., ETR as AF  
4 ch., ETR as AF  
1 channel as AF  
SYSCFG  
VREF+  
16x IN  
VREFBUF  
ADC  
TIM14  
I/F  
TIM16 & 17  
1 channel as AF  
ETR, IN, OUT as AF  
LPTIM1 & 2  
MOSI/SD  
MISO/MCK  
PWRCTRL  
WWDG  
SPI1/I2S  
SCK/CK  
IR_OUT  
IRTIM  
NSS/WS as AF  
MOSI, MISO,  
SCK, NSS,  
as AF  
RX, TX,CTS, RTS,  
CK as AF  
SPI2  
USART1  
USART2  
LPUART  
DBGMCU  
RX, TX,CTS, RTS,  
CK as AF  
RX, TX,  
CTS, RTS as AF  
SCL, SDA, SMBA,  
SMBUS as AF  
I2C1  
I2C2  
SCL, SDA as AF  
Power domain of analog blocks :  
VBAT  
VDD  
VDDA  
VDDIO1  
12/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Functional overview  
3
Functional overview  
3.1  
Arm® Cortex®-M0+ core with MPU  
The Cortex-M0+ is an entry-level 32-bit Arm Cortex processor designed for a broad range of  
embedded applications. It offers significant benefits to developers, including:  
a simple architecture, easy to learn and program  
ultra-low power, energy-efficient operation  
excellent code density  
deterministic, high-performance interrupt handling  
upward compatibility with Cortex-M processor family  
platform security robustness, with integrated Memory Protection Unit (MPU).  
The Cortex-M0+ processor is built on a highly area- and power-optimized 32-bit core, with a  
2-stage pipeline Von Neumann architecture. The processor delivers exceptional energy  
efficiency through a small but powerful instruction set and extensively optimized design,  
providing high-end processing hardware including a single-cycle multiplier.  
The Cortex-M0+ processor provides the exceptional performance expected of a modern  
32-bit architecture, with a higher code density than other 8-bit and 16-bit microcontrollers.  
Owing to embedded Arm core, the STM32G031x4/x6/x8 devices are compatible with Arm  
tools and software.  
The Cortex-M0+ is tightly coupled with a nested vectored interrupt controller (NVIC)  
described in Section 3.13.1.  
3.2  
Memory protection unit  
The memory protection unit (MPU) is used to manage the CPU accesses to memory to  
prevent one task to accidentally corrupt the memory or resources used by any other active  
task.  
The MPU is especially helpful for applications where some critical or certified code has to be  
protected against the misbehavior of other tasks. It is usually managed by an RTOS (real-  
time operating system). If a program accesses a memory location that is prohibited by the  
MPU, the RTOS can detect it and take action. In an RTOS environment, the kernel can  
dynamically update the MPU area setting, based on the process to be executed.  
The MPU is optional and can be bypassed for applications that do not need it.  
3.3  
Embedded Flash memory  
STM32G031x4/x6/x8 devices feature up to 64 Kbytes of embedded Flash memory available  
for storing code and data.  
DS12992 Rev 2  
13/117  
31  
 
 
 
 
Functional overview  
STM32G031x4/x6/x8  
Flexible protections can be configured thanks to option bytes:  
Readout protection (RDP) to protect the whole memory. Three levels are available:  
Level 0: no readout protection  
Level 1: memory readout protection: the Flash memory cannot be read from or  
written to if either debug features are connected, boot in RAM or bootloader is  
selected  
Level 2: chip readout protection: debug features (Cortex-M0+ serial wire), boot in  
RAM and bootloader selection are disabled. This selection is irreversible.  
Table 3. Access status versus readout protection level and execution modes  
Debug, boot from RAM or boot  
User execution  
Protection  
level  
from system memory (loader)  
Area  
Read  
Write  
Erase  
Read  
Write  
Erase  
1
2
1
2
1
2
1
2
Yes  
Yes  
Yes  
Yes  
Yes  
Yes  
Yes  
Yes  
Yes  
Yes  
No  
Yes  
Yes  
No  
No  
N/A  
Yes  
N/A  
Yes  
N/A  
No  
No  
N/A  
No  
No  
N/A  
No  
User  
memory  
System  
memory  
No  
No  
N/A  
Yes  
N/A  
No  
N/A  
Yes  
N/A  
N/A(1)  
N/A  
Yes  
No  
Yes  
No  
N/A(1)  
Option  
bytes  
Yes  
Yes  
Backup  
registers  
N/A  
N/A  
N/A  
1. Erased upon RDP change from Level 1 to Level 0.  
Write protection (WRP): the protected area is protected against erasing and  
programming. Two areas per bank can be selected, with 2-Kbyte granularity.  
Proprietary code readout protection (PCROP): a part of the Flash memory can be  
protected against read and write from third parties. The protected area is execute-only:  
it can only be reached by the STM32 CPU as instruction code, while all other accesses  
(DMA, debug and CPU data read, write and erase) are strictly prohibited. An additional  
option bit (PCROP_RDP) determines whether the PCROP area is erased or not when  
the RDP protection is changed from Level 1 to Level 0.  
The whole non-volatile memory embeds the error correction code (ECC) feature supporting:  
single error detection and correction  
double error detection  
readout of the ECC fail address from the ECC register  
3.3.1  
Securable area  
A part of the Flash memory can be hidden from the application once the code it contains is  
executed. As soon as the write-once SEC_PROT bit is set, the securable memory cannot be  
accessed until the system resets. The securable area generally contains the secure boot  
code to execute only once at boot. This helps to isolate secret code from untrusted  
application code.  
14/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Functional overview  
3.4  
Embedded SRAM  
STM32G031x4/x6/x8 devices have 8 Kbytes of embedded SRAM with parity. Hardware  
parity check allows memory data errors to be detected, which contributes to increasing  
functional safety of applications.  
The memory can be read/write-accessed at CPU clock speed, with 0 wait states.  
3.5  
Boot modes  
At startup, the boot pin and boot selector option bit are used to select one of the three boot  
options:  
boot from User Flash memory  
boot from System memory  
boot from embedded SRAM  
The boot pin is shared with a standard GPIO and can be enabled through the boot selector  
option bit. The boot loader is located in System memory. It manages the Flash memory  
2
reprogramming through USART on pins PA9/PA10 or PA2/PA3, or through I C-bus on pins  
PB6/PB7 or PB10/PB11.  
3.6  
Cyclic redundancy check calculation unit (CRC)  
The CRC (cyclic redundancy check) calculation unit is used to get a CRC code using a  
configurable generator polynomial value and size.  
Among other applications, CRC-based techniques are used to verify data transmission or  
storage integrity. In the scope of the EN/IEC 60335-1 standard, they offer a means of  
verifying the Flash memory integrity. The CRC calculation unit helps compute a signature of  
the software during runtime, to be compared with a reference signature generated at link  
time and stored at a given memory location.  
3.7  
Power supply management  
3.7.1  
Power supply schemes  
The STM32G031x4/x6/x8 devices require a 1.7 V to 3.6 V operating supply voltage (V ).  
DD  
Several different power supplies are provided to specific peripherals:  
V
= 1.7 (1.6) to 3.6 V  
DD  
V
is the external power supply for the internal regulator and the system analog such  
DD  
as reset, power management and internal clocks. It is provided externally through  
VDD/VDDA pin.  
The minimum voltage of 1.7 V corresponds to power-on reset release threshold  
V
(max). Once this threshold is crossed and power-on reset is released, the  
POR  
functionality is guaranteed down to power-down reset threshold V  
(min).  
PDR  
V
= 1.62 V (ADC) / 2.4 V (VREFBUF) to 3.6 V  
DDA  
V
is the analog power supply for the A/D converter, voltage reference buffer. V  
DDA  
DDA  
voltage level is identical to V voltage as it is provided externally through VDD/VDDA  
DD  
pin.  
DS12992 Rev 2  
15/117  
31  
 
 
 
 
 
Functional overview  
STM32G031x4/x6/x8  
V
V
= V  
DD  
DDIO1  
DDIO1  
is the power supply for the I/Os. V  
voltage level is identical to V voltage  
DD  
DDIO1  
as it is provided externally through VDD/VDDA pin.  
V
= 1.55 V to 3.6 V. V is the power supply (through a power switch) for RTC,  
BAT  
BAT  
TAMP, low-speed external 32.768 kHz oscillator and backup registers when V is not  
DD  
present. V  
is provided externally through VBAT pin. When this pin is not available  
BAT  
on the package, VBAT bonding pad is internally bonded to the VDD/VDDA pin.  
V
REF+  
is the analog peripheral input reference voltage, or the output of the internal  
voltage reference buffer (when enabled). When V  
< 2 V, V  
must be equal to  
REF+  
DDA  
V
. When V  
≥ 2 V, V  
must be between 2 V and V  
. It can be grounded  
DDA  
DDA  
REF+  
DDA  
when the analog peripherals using V  
are not active.  
REF+  
The internal voltage reference buffer supports two output voltages, which is configured  
with VRS bit of the VREFBUF_CSR register:  
V
V
V
around 2.048 V (requiring V  
equal to or higher than 2.4 V)  
DDA  
REF+  
REF+  
around 2.5 V (requiring V  
equal to or higher than 2.8 V)  
DDA  
is delivered through VREF+ pin. On packages without VREF+ pin, V  
is  
REF+  
REF+  
internally connected with V , and the internal voltage reference buffer must be kept  
DD  
disabled (refer to datasheets for package pinout description).  
V
CORE  
An embedded linear voltage regulator is used to supply the V  
internal digital  
CORE  
power. V  
is the power supply for digital peripherals, SRAM and Flash memory.  
CORE  
The Flash memory is also supplied with V  
.
DD  
Figure 2. Power supply overview  
VDDA domain  
VREF+  
VREF+  
A/D converter  
VDDA  
Voltage reference buffer  
VSSA  
VDD domain  
VDDIO1  
I/O ring  
Reset block  
Temp. sensor  
PLL, HSI  
VCORE domain  
Core  
Standby circuitry  
(Wakeup logic,  
IWDG)  
VSS  
VDD  
VSS  
VDD  
SRAM  
Digital  
VCORE  
peripherals  
Voltage regulator  
Low-voltage  
detector  
Flash memory  
RTC domain  
BKP registers  
VBAT  
LSE crystal 32.768 KHz osc  
RCC BDCR register  
RTC  
MSv47940V1  
16/117  
DS12992 Rev 2  
 
STM32G031x4/x6/x8  
Functional overview  
3.7.2  
Power supply supervisor  
The device has an integrated power-on/power-down (POR/PDR) reset active in all power  
modes except Shutdown and ensuring proper operation upon power-on and power-down. It  
maintains the device in reset when the supply voltage is below V  
threshold, without  
POR/PDR  
the need for an external reset circuit. Brownout reset (BOR) function allows extra flexibility. It  
can be enabled and configured through option bytes, by selecting one of four thresholds for  
rising V and other four for falling V  
.
DD  
DD  
The device also features an embedded programmable voltage detector (PVD) that monitors  
the V power supply and compares it to V threshold. It allows generating an interrupt  
DD  
PVD  
when V level crosses the V  
threshold, selectively while falling, while rising, or while  
DD  
PVD  
falling and rising. The interrupt service routine can then generate a warning message and/or  
put the MCU into a safe state. The PVD is enabled by software.  
3.7.3  
Voltage regulator  
Two embedded linear voltage regulators, main regulator (MR) and low-power regulator  
(LPR), supply most of digital circuitry in the device.  
The MR is used in Run and Sleep modes. The LPR is used in Low-power run, Low-power  
sleep and Stop modes.  
In Standby and Shutdown modes, both regulators are powered down and their outputs set in  
high-impedance state, such as to bring their current consumption close to zero. However,  
SRAM data retention is possible in Standby mode, in which case the LPR remains active  
and it only supplies the SRAM.  
3.7.4  
Low-power modes  
By default, the microcontroller is in Run mode after system or power reset. It is up to the  
user to select one of the low-power modes described below:  
Sleep mode  
In Sleep mode, only the CPU is stopped. All peripherals continue to operate and can  
wake up the CPU when an interrupt/event occurs.  
Low-power run mode  
This mode is achieved with V  
supplied by the low-power regulator to minimize the  
CORE  
regulator's operating current. The code can be executed from SRAM or from Flash,  
and the CPU frequency is limited to 2 MHz. The peripherals with independent clock can  
be clocked by HSI16.  
Low-power sleep mode  
This mode is entered from the low-power run mode. Only the CPU clock is stopped.  
When wakeup is triggered by an event or an interrupt, the system reverts to the Low-  
power run mode.  
Stop 0 and Stop 1 modes  
In Stop 0 and Stop 1 modes, the device achieves the lowest power consumption while  
retaining the SRAM and register contents. All clocks in the V  
domain are stopped.  
CORE  
The PLL, as well as the HSI16 RC oscillator and the HSE crystal oscillator are  
DS12992 Rev 2  
17/117  
31  
 
 
 
Functional overview  
STM32G031x4/x6/x8  
disabled. The LSE or LSI keep running. The RTC can remain active (Stop mode with  
RTC, Stop mode without RTC).  
Some peripherals with wakeup capability can enable the HSI16 RC during Stop mode,  
so as to get clock for processing the wakeup event. The main regulator remains active  
in Stop 0 mode while it is turned off in Stop 1 mode.  
Standby mode  
The Standby mode is used to achieve the lowest power consumption, with POR/PDR  
always active in this mode. The main regulator is switched off to power down V  
CORE  
domain. The low-power regulator is either switched off or kept active. In the latter case,  
it only supplies SRAM to ensure data retention. The PLL, as well as the HSI16 RC  
oscillator and the HSE crystal oscillator are also powered down. The RTC can remain  
active (Standby mode with RTC, Standby mode without RTC).  
For each I/O, the software can determine whether a pull-up, a pull-down or no resistor  
shall be applied to that I/O during Standby mode.  
Upon entering Standby mode, register contents are lost except for registers in the RTC  
domain and standby circuitry. The SRAM contents can be retained through register  
setting.  
The device exits Standby mode upon external reset event (NRST pin), IWDG reset  
event, wakeup event (WKUP pin, configurable rising or falling edge) or RTC event  
(alarm, periodic wakeup, timestamp, tamper), or when a failure is detected on LSE  
(CSS on LSE).  
Shutdown mode  
The Shutdown mode allows to achieve the lowest power consumption. The internal  
regulator is switched off to power down the V  
domain. The PLL, as well as the  
CORE  
HSI16 and LSI RC-oscillators and HSE crystal oscillator are also powered down. The  
RTC can remain active (Shutdown mode with RTC, Shutdown mode without RTC).  
The BOR is not available in Shutdown mode. No power voltage monitoring is possible  
in this mode. Therefore, switching to RTC domain is not supported.  
SRAM and register contents are lost except for registers in the RTC domain.  
The device exits Shutdown mode upon external reset event (NRST pin), IWDG reset  
event, wakeup event (WKUP pin, configurable rising or falling edge) or RTC event  
(alarm, periodic wakeup, timestamp, tamper).  
3.7.5  
3.7.6  
Reset mode  
During and upon exiting reset, the schmitt triggers of I/Os are disabled so as to reduce  
power consumption. In addition, when the reset source is internal, the built-in pull-up  
resistor on NRST pin is deactivated.  
VBAT operation  
The V  
power domain, consuming very little energy, includes RTC, and LSE oscillator and  
BAT  
backup registers.  
18/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Functional overview  
In VBAT mode, the RTC domain is supplied from VBAT pin. The power source can be, for  
example, an external battery or an external supercapacitor. Two anti-tamper detection pins  
are available.  
The RTC domain can also be supplied from VDD/VDDA pin.  
By means of a built-in switch, an internal voltage supervisor allows automatic switching of  
RTC domain powering between V and voltage from VBAT pin to ensure that the supply  
DD  
voltage of the RTC domain (V  
) remains within valid operating conditions. If both voltages  
BAT  
are valid, the RTC domain is supplied from VDD/VDDA pin.  
An internal circuit for charging the battery on VBAT pin can be activated if the V voltage is  
DD  
within a valid range.  
Note:  
External interrupts and RTC alarm/events cannot cause the microcontroller to exit the VBAT  
mode, as in that mode the V is not within a valid range.  
DD  
3.8  
Interconnect of peripherals  
Several peripherals have direct connections between them. This allows autonomous  
communication between peripherals, saving CPU resources thus power supply  
consumption. In addition, these hardware connections allow fast and predictable latency.  
Depending on peripherals, these interconnections can operate in Run, Sleep and Stop  
modes.  
Table 4. Interconnect of STM32G031x4/x6/x8 peripherals  
Interconnect  
destination  
Interconnect source  
Interconnect action  
TIMx  
ADCx  
DMA  
Timer synchronization or chaining  
Conversion triggers  
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
-
-
-
-
-
TIMx  
Memory-to-memory transfer trigger  
Timer triggered by analog watchdog  
Timer input channel from RTC events  
ADCx  
TIM1  
TIM16  
RTC  
Low-power timer triggered by RTC  
alarms or tampers  
LPTIMERx  
Y
Y
Y
Y
Y
-
All clocks sources (internal  
and external)  
Clock source used as input channel for  
RC measurement and trimming  
TIM14,16,17  
CSS  
RAM (parity error)  
Flash memory (ECC error)  
PVD  
TIM1,16,17  
TIM1,16,17  
Timer break  
Timer break  
Y
Y
Y
-
-
-
CPU (hard fault)  
DS12992 Rev 2  
19/117  
31  
 
 
Functional overview  
STM32G031x4/x6/x8  
Table 4. Interconnect of STM32G031x4/x6/x8 peripherals (continued)  
Interconnect  
destination  
Interconnect source  
Interconnect action  
TIMx  
LPTIMERx  
ADC  
External trigger  
Y
Y
Y
Y
Y
Y
-
Y
-
GPIO  
External trigger  
Conversion external trigger  
3.9  
Clocks and startup  
The clock controller distributes the clocks coming from different oscillators to the core and  
the peripherals. It also manages clock gating for low-power modes and ensures clock  
robustness. It features:  
Clock prescaler: to get the best trade-off between speed and current consumption,  
the clock frequency to the CPU and peripherals can be adjusted by a programmable  
prescaler  
Safe clock switching: clock sources can be changed safely on the fly in run mode  
through a configuration register.  
Clock management: to reduce power consumption, the clock controller can stop the  
clock to the core, individual peripherals or memory.  
System clock source: three different sources can deliver SYSCLK system clock:  
4-48 MHz high-speed oscillator with external crystal or ceramic resonator (HSE). It  
can supply clock to system PLL. The HSE can also be configured in bypass mode  
for an external clock.  
16 MHz high-speed internal RC oscillator (HSI16), trimmable by software. It can  
supply clock to system PLL.  
System PLL with maximum output frequency of 64 MHz. It can be fed with HSE or  
HSI16 clocks.  
Auxiliary clock source: two ultra-low-power clock sources for the real-time clock  
(RTC):  
32.768 kHz low-speed oscillator with external crystal (LSE), supporting four drive  
capability modes. The LSE can also be configured in bypass mode for using an  
external clock.  
32 kHz low-speed internal RC oscillator (LSI) with ±5% accuracy, also used to  
clock an independent watchdog.  
Peripheral clock sources: several peripherals (I2S, USARTs, I2Cs, LPTIMs, ADC)  
have their own clock independent of the system clock.  
Clock security system (CSS): in the event of HSE clock failure, the system clock is  
automatically switched to HSI16 and, if enabled, a software interrupt is generated. LSE  
20/117  
DS12992 Rev 2  
 
STM32G031x4/x6/x8  
Functional overview  
clock failure can also be detected and generate an interrupt. The CCS feature can be  
enabled by software.  
Clock output:  
MCO (microcontroller clock output) provides one of the internal clocks for  
external use by the application  
LSCO (low speed clock output) provides LSI or LSE in all low-power modes  
(except in VBAT operation).  
Several prescalers allow the application to configure AHB and APB domain clock  
frequencies, 64 MHz at maximum.  
3.10  
3.11  
General-purpose inputs/outputs (GPIOs)  
Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as  
input (with or without pull-up or pull-down) or as peripheral alternate function (AF). Most of  
the GPIO pins are shared with special digital or analog functions.  
Through a specific sequence, this special function configuration of I/Os can be locked, such  
as to avoid spurious writing to I/O control registers.  
Direct memory access controller (DMA)  
The direct memory access (DMA) controller is a bus master and system peripheral with  
single-AHB architecture.  
With 5 channels, it performs data transfers between memory-mapped peripherals and/or  
memories, to offload the CPU.  
Each channel is dedicated to managing memory access requests from one or more  
peripherals. The unit includes an arbiter for handling the priority between DMA requests.  
Main features of the DMA controller:  
Single-AHB master  
Peripheral-to-memory, memory-to-peripheral, memory-to-memory and peripheral-to-  
peripheral data transfers  
Access, as source and destination, to on-chip memory-mapped devices such as Flash  
memory, SRAM, and AHB and APB peripherals  
All DMA channels independently configurable:  
Each channel is associated either with a DMA request signal coming from a  
peripheral, or with a software trigger in memory-to-memory transfers. This  
configuration is done by software.  
Priority between the requests is programmable by software (four levels per  
channel: very high, high, medium, low) and by hardware in case of equality (such  
as request to channel 1 has priority over request to channel 2).  
Transfer size of source and destination are independent (byte, half-word, word),  
emulating packing and unpacking. Source and destination addresses must be  
aligned on the data size.  
Support of transfers from/to peripherals to/from memory with circular buffer  
management  
DS12992 Rev 2  
21/117  
31  
 
 
Functional overview  
STM32G031x4/x6/x8  
16  
Programmable number of data to be transferred: 0 to 2 - 1  
Generation of an interrupt request per channel. Each interrupt request originates from  
any of the three DMA events: transfer complete, half transfer, or transfer error.  
3.12  
3.13  
DMA request multiplexer (DMAMUX)  
The DMAMUX request multiplexer enables routing a DMA request line between the  
peripherals and the DMA controller. Each channel selects a unique DMA request line,  
unconditionally or synchronously with events from its DMAMUX synchronization inputs.  
DMAMUX may also be used as a DMA request generator from programmable events on its  
input trigger signals.  
Interrupts and events  
The device flexibly manages events causing interrupts of linear program execution, called  
exceptions. The Cortex-M0+ processor core, a nested vectored interrupt controller (NVIC)  
and an extended interrupt/event controller (EXTI) are the assets contributing to handling the  
exceptions. Exceptions include core-internal events such as, for example, a division by zero  
and, core-external events such as logical level changes on physical lines. Exceptions result  
in interrupting the program flow, executing an interrupt service routine (ISR) then resuming  
the original program flow.  
The processor context (contents of program pointer and status registers) is stacked upon  
program interrupt and unstacked upon program resume, by hardware. This avoids context  
stacking and unstacking in the interrupt service routines (ISRs) by software, thus saving  
time, code and power. The ability to abandon and restart load-multiple and store-multiple  
operations significantly increases the device’s responsiveness in processing exceptions.  
3.13.1  
Nested vectored interrupt controller (NVIC)  
The configurable nested vectored interrupt controller is tightly coupled with the core. It  
handles physical line events associated with a non-maskable interrupt (NMI) and maskable  
interrupts, and Cortex-M0+ exceptions. It provides flexible priority management.  
The tight coupling of the processor core with NVIC significantly reduces the latency between  
interrupt events and start of corresponding interrupt service routines (ISRs). The ISR  
vectors are listed in a vector table, stored in the NVIC at a base address. The vector  
address of an ISR to execute is hardware-built from the vector table base address and the  
ISR order number used as offset.  
If a higher-priority interrupt event happens while a lower-priority interrupt event occurring  
just before is waiting for being served, the later-arriving higher-priority interrupt event is  
served first. Another optimization is called tail-chaining. Upon a return from a higher-priority  
ISR then start of a pending lower-priority ISR, the unnecessary processor context  
unstacking and stacking is skipped. This reduces latency and contributes to power  
efficiency.  
22/117  
DS12992 Rev 2  
 
 
 
STM32G031x4/x6/x8  
Functional overview  
Features of the NVIC:  
Low-latency interrupt processing  
4 priority levels  
Handling of a non-maskable interrupt (NMI)  
Handling of 32 maskable interrupt lines  
Handling of 10 Cortex-M0+ exceptions  
Later-arriving higher-priority interrupt processed first  
Tail-chaining  
Interrupt vector retrieval by hardware  
3.13.2  
Extended interrupt/event controller (EXTI)  
The extended interrupt/event controller adds flexibility in handling physical line events and  
allows identifying wake-up events at processor wakeup from Stop mode.  
The EXTI controller has a number of channels, of which some with rising, falling or rising,  
and falling edge detector capability. Any GPIO and a few peripheral signals can be  
connected to these channels.  
The channels can be independently masked.  
The EXTI controller can capture pulses shorter than the internal clock period.  
A register in the EXTI controller latches every event even in Stop mode, which allows the  
software to identify the origin of the processor's wake-up from Stop mode or, to identify the  
GPIO and the edge event having caused an interrupt.  
3.14  
Analog-to-digital converter (ADC)  
A native 12-bit analog-to-digital converter is embedded into STM32G031x4/x6/x8 devices. It  
can be extended to 16-bit resolution through hardware oversampling. The ADC has up to 16  
external channels and 3 internal channels (temperature sensor, voltage reference, V  
BAT  
monitoring). It performs conversions in single-shot or scan mode. In scan mode, automatic  
conversion is performed on a selected group of analog inputs.  
The ADC frequency is independent from the CPU frequency, allowing maximum sampling  
rate of ~2 MSps even with a low CPU speed. An auto-shutdown function guarantees that  
the ADC is powered off except during the active conversion phase.  
The ADC can be served by the DMA controller. It can operate in the whole V supply  
DD  
range.  
The ADC features a hardware oversampler up to 256 samples, improving the resolution to  
16 bits (refer to AN2668).  
An analog watchdog feature allows very precise monitoring of the converted voltage of one,  
some or all scanned channels. An interrupt is generated when the converted voltage is  
outside the programmed thresholds.  
The events generated by the general-purpose timers (TIMx) can be internally connected to  
the ADC start triggers, to allow the application to synchronize A/D conversions with timers.  
DS12992 Rev 2  
23/117  
31  
 
 
Functional overview  
STM32G031x4/x6/x8  
3.14.1  
Temperature sensor  
The temperature sensor (TS) generates a voltage V that varies linearly with temperature.  
TS  
The temperature sensor is internally connected to an ADC input to convert the sensor  
output voltage into a digital value.  
The sensor provides good linearity but it has to be calibrated to obtain good overall  
accuracy of the temperature measurement. As the offset of the temperature sensor may  
vary from part to part due to process variation, the uncalibrated internal temperature sensor  
is suitable only for relative temperature measurements.  
To improve the accuracy of the temperature sensor, each part is individually factory-  
calibrated by ST. The resulting calibration data are stored in the part’s engineering bytes,  
accessible in read-only mode.  
Table 5. Temperature sensor calibration values  
Calibration value name  
Description  
Memory address  
TS ADC raw data acquired at a  
temperature of 30 °C (± 5 °C),  
TS_CAL1  
0x1FFF 75A8 - 0x1FFF 75A9  
VDDA = VREF+ = 3.0 V (± 10 mV)  
TS ADC raw data acquired at a  
temperature of 130 °C (± 5 °C),  
TS_CAL2  
0x1FFF 75CA - 0x1FFF 75CB  
VDDA = VREF+ = 3.0 V (± 10 mV)  
3.14.2  
3.14.3  
24/117  
Internal voltage reference (V  
)
REFINT  
The internal voltage reference (V  
) provides a stable (bandgap) voltage output for the  
REFINT  
ADC. V  
is internally connected to an ADC input. The V  
voltage is individually  
REFINT  
REFINT  
precisely measured for each part by ST during production test and stored in the part’s  
engineering bytes. It is accessible in read-only mode.  
Table 6. Internal voltage reference calibration values  
Calibration value name  
Description  
Memory address  
Raw data acquired at a  
temperature of 30 °C (± 5 °C),  
VDDA = VREF+ = 3.0 V (± 10 mV)  
0x1FFF 75AA - 0x1FFF 75AB  
V
REFINT  
V
battery voltage monitoring  
BAT  
This embedded hardware feature allows the application to measure the V  
using an internal ADC input. As the V  
the ADC input range, the VBAT pin is internally connected to a bridge divider by three. As a  
consequence, the converted digital value is one third the V voltage.  
battery voltage  
BAT  
voltage may be higher than V  
and thus outside  
BAT  
DDA  
BAT  
DS12992 Rev 2  
 
 
 
 
 
STM32G031x4/x6/x8  
Functional overview  
3.15  
Voltage reference buffer (VREFBUF)  
When enabled, an embedded buffer provides the internal reference voltage to analog  
blocks (for example ADC) and to VREF+ pin for external components.  
The internal voltage reference buffer supports two voltages:  
2.048 V  
2.5 V  
An external voltage reference can be provided through the VREF+ pin when the internal  
voltage reference buffer is disabled.  
On some packages, the VREF+ pad of the silicon die is double-bonded with supply pad to  
common VDD/VDDA pin and so the internal voltage reference buffer cannot be used.  
3.16  
Timers and watchdogs  
The device includes an advanced-control timer, five general-purpose timers, two low-power  
timers, two watchdog timers and a SysTick timer. Table 7 compares features of the  
advanced-control, general-purpose and basic timers.  
Table 7. Timer feature comparison  
Maximum  
operating  
frequency  
DMA  
request  
generation channels  
Capture/  
compare mentary  
Comple-  
Counter  
resolution  
Counter  
type  
Prescaler  
factor  
Timer type  
Timer  
outputs  
Advanced-  
control  
Up, down,  
up/down  
Integer from  
1 to 216  
TIM1  
TIM2  
TIM3  
TIM14  
16-bit  
32-bit  
16-bit  
16-bit  
16-bit  
16-bit  
128 MHz  
64 MHz  
64 MHz  
64 MHz  
64 MHz  
64 MHz  
Yes  
Yes  
Yes  
No  
4
4
3
Up, down,  
up/down  
Integer from  
1 to 216  
-
-
Up, down,  
up/down  
Integer from  
1 to 216  
4
Integer from  
1 to 216  
General-  
purpose  
Up  
Up  
Up  
1
-
TIM16  
TIM17  
Integer from  
1 to 216  
Yes  
No  
1
1
-
LPTIM1  
LPTIM2  
2n where  
n=0 to 7  
Low-power  
N/A  
3.16.1  
Advanced-control timer (TIM1)  
The advanced-control timer can be seen as a three-phase PWM unit multiplexed on 6  
channels. It has complementary PWM outputs with programmable inserted dead-times. It  
DS12992 Rev 2  
25/117  
31  
 
 
 
 
Functional overview  
STM32G031x4/x6/x8  
can also be seen as a complete general-purpose timer. The four independent channels can  
be used for:  
input capture  
output compare  
PWM output (edge or center-aligned modes) with full modulation capability (0-100%)  
one-pulse mode output  
In debug mode, the advanced-control timer counter can be frozen and the PWM outputs  
disabled, so as to turn off any power switches driven by these outputs.  
Many features are shared with those of the general-purpose TIMx timers (described in  
Section 3.16.2) using the same architecture, so the advanced-control timers can work  
together with the TIMx timers via the Timer Link feature for synchronization or event  
chaining.  
3.16.2  
General-purpose timers (TIM2, 3, 14, 16, 17)  
There are five synchronizable general-purpose timers embedded in the device (refer to  
Table 7 for comparison). Each general-purpose timer can be used to generate PWM outputs  
or act as a simple timebase.  
TIM2, TIM3  
These are full-featured general-purpose timers:  
TIM2 with 32-bit auto-reload up/downcounter and 16-bit prescaler  
TIM3 with 16-bit auto-reload up/downcounter and 16-bit prescaler  
They have four independent channels for input capture/output compare, PWM or one-  
pulse mode output. They can operate in combination with other general-purpose timers  
via the Timer Link feature for synchronization or event chaining. They can generate  
independent DMA request and support quadrature encoders. Their counter can be  
frozen in debug mode.  
TIM14  
This timer is based on a 16-bit auto-reload upcounter and a 16-bit prescaler. It has one  
channel for input capture/output compare, PWM output or one-pulse mode output. Its  
counter can be frozen in debug mode.  
TIM16, TIM17  
These are general-purpose timers featuring:  
16-bit auto-reload upcounter and 16-bit prescaler  
1 channel and 1 complementary channel  
All channels can be used for input capture/output compare, PWM or one-pulse mode  
output. The timers can operate together via the Timer Link feature for synchronization  
or event chaining. They can generate independent DMA request. Their counters can  
be frozen in debug mode.  
3.16.3  
Low-power timers (LPTIM1 and LPTIM2)  
These timers have an independent clock. When fed with LSE, LSI or external clock, they  
keep running in Stop mode and they can wake up the system from it.  
26/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Functional overview  
Features of LPTIM1 and LPTIM2:  
16-bit up counter with 16-bit autoreload register  
16-bit compare register  
Configurable output (pulse, PWM)  
Continuous/one-shot mode  
Selectable software/hardware input trigger  
Selectable clock source:  
Internal: LSE, LSI, HSI16 or APB clocks  
External: over LPTIM input (working even with no internal clock source running,  
used by pulse counter application)  
Programmable digital glitch filter  
Encoder mode  
3.16.4  
Independent watchdog (IWDG)  
The independent watchdog is based on an 8-bit prescaler and 12-bit downcounter with  
user-defined refresh window. It is clocked from an independent 32 kHz internal RC (LSI).  
Independent of the main clock, it can operate in Stop and Standby modes. It can be used  
either as a watchdog to reset the device when a problem occurs, or as a free-running timer  
for application timeout management. It is hardware- or software-configurable through the  
option bytes. Its counter can be frozen in debug mode.  
3.16.5  
3.16.6  
System window watchdog (WWDG)  
The window watchdog is based on a 7-bit downcounter that can be set as free-running. It  
can be used as a watchdog to reset the device when a problem occurs. It is clocked by the  
system clock. It has an early-warning interrupt capability. Its counter can be frozen in debug  
mode.  
SysTick timer  
This timer is dedicated to real-time operating systems, but it can also be used as a standard  
down counter.  
Features of SysTick timer:  
24-bit down counter  
Autoreload capability  
Maskable system interrupt generation when the counter reaches 0  
Programmable clock source  
3.17  
Real-time clock (RTC), tamper (TAMP) and backup registers  
The device embeds an RTC and five 32-bit backup registers, located in the RTC domain of  
the silicon die.  
The ways of powering the RTC domain are described in Section 3.7.6.  
The RTC is an independent BCD timer/counter.  
DS12992 Rev 2  
27/117  
31  
 
 
 
 
Functional overview  
STM32G031x4/x6/x8  
Features of the RTC:  
Calendar with subsecond, seconds, minutes, hours (12 or 24 format), week day, date,  
month, year, in BCD (binary-coded decimal) format  
Automatic correction for 28, 29 (leap year), 30, and 31 days of the month  
Programmable alarm  
On-the-fly correction from 1 to 32767 RTC clock pulses, usable for synchronization with  
a master clock  
Reference clock detection - a more precise second-source clock (50 or 60 Hz) can be  
used to improve the calendar precision  
Digital calibration circuit with 0.95 ppm resolution, to compensate for quartz crystal  
inaccuracy  
Two anti-tamper detection pins with programmable filter  
Timestamp feature to save a calendar snapshot, triggered by an event on the  
timestamp pin or a tamper event, or by switching to VBAT mode  
17-bit auto-reload wakeup timer (WUT) for periodic events, with programmable  
resolution and period  
Multiple clock sources and references:  
A 32.768 kHz external crystal (LSE)  
An external resonator or oscillator (LSE)  
The internal low-power RC oscillator (LSI, with typical frequency of 32 kHz)  
The high-speed external clock (HSE) divided by 32  
When clocked by LSE, the RTC operates in VBAT mode and in all low-power modes. When  
clocked by LSI, the RTC does not operate in VBAT mode, but it does in low-power modes  
except for the Shutdown mode.  
All RTC events (Alarm, WakeUp Timer, Timestamp or Tamper) can generate an interrupt  
and wake the device up from the low-power modes.  
The backup registers allow keeping 20 bytes of user application data in the event of V  
DD  
failure, if a valid backup supply voltage is provided on VBAT pin. They are not affected by  
the system reset, power reset, and upon the device’s wakeup from Standby or Shutdown  
modes.  
3.18  
Inter-integrated circuit interface (I2C)  
The device embeds two I2C peripherals. Refer to Table 8 for the features.  
2
The I C-bus interface handles communication between the microcontroller and the serial  
2
2
I C-bus. It controls all I C-bus-specific sequencing, protocol, arbitration and timing.  
28/117  
DS12992 Rev 2  
 
STM32G031x4/x6/x8  
Functional overview  
Features of the I2C peripheral:  
I2C-bus specification and user manual rev. 5 compatibility:  
Slave and master modes, multimaster capability  
Standard-mode (Sm), with a bitrate up to 100 kbit/s  
Fast-mode (Fm), with a bitrate up to 400 kbit/s  
Fast-mode Plus (Fm+), with a bitrate up to 1 Mbit/s and extra output drive I/Os  
7-bit and 10-bit addressing mode, multiple 7-bit slave addresses  
Programmable setup and hold times  
Clock stretching  
SMBus specification rev 3.0 compatibility:  
Hardware PEC (packet error checking) generation and verification with ACK  
control  
Command and data acknowledge control  
Address resolution protocol (ARP) support  
Host and Device support  
SMBus alert  
Timeouts and idle condition detection  
PMBus rev 1.3 standard compatibility  
Independent clock: a choice of independent clock sources allowing the I2C  
communication speed to be independent of the PCLK reprogramming  
Wakeup from Stop mode on address match  
Programmable analog and digital noise filters  
1-byte buffer with DMA capability  
2
Table 8. I C implementation  
I2C features(1)  
I2C1  
I2C2  
Standard mode (up to 100 kbit/s)  
X
X
X
X
X
X
X
X
X
X
X
-
Fast mode (up to 400 kbit/s)  
Fast Mode Plus (up to 1 Mbit/s) with extra output drive I/Os  
Programmable analog and digital noise filters  
SMBus/PMBus hardware support  
Independent clock  
-
Wakeup from Stop mode on address match  
1. X: supported  
-
3.19  
Universal synchronous/asynchronous receiver transmitter  
(USART)  
The device embeds universal synchronous/asynchronous receivers/transmitters (USART1,  
USART2) that communicate at speeds of up to 8 Mbit/s.  
They provide hardware management of the CTS, RTS and RS485 DE signals,  
multiprocessor communication mode, master synchronous communication and single-wire  
DS12992 Rev 2  
29/117  
31  
 
 
Functional overview  
STM32G031x4/x6/x8  
half-duplex communication mode. Some can also support SmartCard communication (ISO  
7816), IrDA SIR ENDEC, LIN Master/Slave capability and auto baud rate feature, and have  
a clock domain independent of the CPU clock, which allows them to wake up the MCU from  
Stop mode. The wakeup events from Stop mode are programmable and can be:  
start bit detection  
any received data frame  
a specific programmed data frame  
All USART interfaces can be served by the DMA controller.  
Table 9. USART implementation  
USART modes/features(1)  
USART1  
USART2  
Hardware flow control for modem  
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
-
Continuous communication using DMA  
Multiprocessor communication  
Synchronous mode  
Smartcard mode  
Single-wire half-duplex communication  
IrDA SIR ENDEC block  
LIN mode  
X
-
-
Dual clock domain and wakeup from Stop mode  
Receiver timeout interrupt  
Modbus communication  
Auto baud rate detection  
Driver Enable  
-
-
-
-
X
1. X: supported  
3.20  
Low-power universal asynchronous receiver transmitter  
(LPUART)  
The device embeds one LPUART. The peripheral supports asynchronous serial  
communication with minimum power consumption. It supports half duplex single wire  
communication and modem operations (CTS/RTS). It allows multiprocessor  
communication.  
The LPUART has a clock domain independent of the CPU clock, and can wakeup the  
system from Stop mode. The Stop mode wakeup events are programmable and can be:  
start bit detection  
any received data frame  
a specific programmed data frame  
Only a 32.768 kHz clock (LSE) is needed to allow LPUART communication up to 9600  
baud. Therefore, even in Stop mode, the LPUART can wait for an incoming frame while  
having an extremely low energy consumption. Higher speed clock can be used to reach  
higher baudrates.  
30/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Functional overview  
The LPUART interface can be served by the DMA controller.  
3.21  
Serial peripheral interface (SPI)  
The device contains two SPIs running at up to 32 Mbits/s in master and slave modes. It  
supports half-duplex, full-duplex and simplex communications. A 3-bit prescaler gives eight  
master mode frequencies. The frame size is configurable from 4 bits to 16 bits. The SPI  
peripherals support NSS pulse mode, TI mode and hardware CRC calculation.  
The SPI peripherals can be served by the DMA controller.  
2
The I S interface mode of the SPI peripheral (if supported, see the following table) supports  
four different audio standards can operate as master or slave, in half-duplex communication  
mode. It can be configured to transfer 16 and 24 or 32 bits with 16-bit or 32-bit data  
resolution and synchronized by a specific signal. Audio sampling frequency from 8 kHz up to  
192 kHz can be set by an 8-bit programmable linear prescaler. When operating in master  
mode, it can output a clock for an external audio component at 256 times the sampling  
frequency.  
Table 10. SPI/I2S implementation  
SPI features(1)  
SPI1  
SPI2  
Hardware CRC calculation  
X
X
X
X
X
X
X
X
-
Rx/Tx FIFO  
NSS pulse mode  
I2S mode  
TI mode  
X
1. X = supported.  
3.22  
Development support  
3.22.1  
Serial wire debug port (SW-DP)  
An Arm SW-DP interface is provided to allow a serial wire debugging tool to be connected to  
the MCU.  
DS12992 Rev 2  
31/117  
31  
 
 
 
 
Pinouts, pin description and alternate functions  
STM32G031x4/x6/x8  
4
Pinouts, pin description and alternate functions  
Figure 3. STM32G031CxT LQFP48 pinout  
Top view  
1
36  
35  
34  
33  
32  
31  
30  
29  
28  
27  
26  
25  
PC13  
PA14-BOOT0  
PA13  
PA12 [PA10]  
PA11 [PA9]  
PA10  
PC7  
PC6  
PA9  
PA8  
2
PC14-OSC32_IN  
PC15-OSC32_OUT  
VBAT  
3
4
5
VREF+  
6
VDD/VDDA  
VSS/VSSA  
PF0-OSC_IN  
PF1-OSC_OUT  
PF2-NRST  
PA0  
LQFP48  
7
8
9
10  
11  
12  
PB15  
PB14  
PB13  
PA1  
MSv39711V3  
Figure 4. STM32G031CxU UFQFPN48 pinout  
Top view  
PC13  
PC14-OSC32_IN  
PC15-OSC32_OUT  
VBAT  
PA14-BOOT0  
PA13  
PA12 [PA10]  
PA11 [PA9]  
PA10  
PC7  
PC6  
PA9  
PA8  
PB15  
PB14  
VREF+  
VDD/VDDA  
VSS/VSSA  
PF0-OSC_IN  
PF1-OSC_OUT  
PF2-NRST  
PA0  
UFQFPN48  
PA1  
PB13  
VSS  
MSv39714V3  
32/117  
DS12992 Rev 2  
 
 
 
 
STM32G031x4/x6/x8  
Pinouts, pin description and alternate functions  
Figure 5. STM32G031KxT LQFP32 pinout  
Top view  
1
2
3
4
5
6
7
8
24  
23  
22  
21  
20  
19  
18  
17  
PB9  
PA13  
PC14-OSC32_IN  
PC15-OSC32_OUT  
VDD/VDDA  
VSS/VSSA  
PF2-NRST  
PA0  
PA12 [PA10]  
PA11 [PA9]  
PA10  
LQFP32  
PC6  
PA9  
PA8  
PA1  
PB2  
MSv39712V3  
Figure 6. STM32G031KxU UFQFPN32 pinout  
Top view  
PB9  
PC14-OSC32_IN  
PC15-OSC32_OUT  
VDD/VDDA  
VSS/VSSA  
PA13  
PA12 [PA10]  
PA11 [PA9]  
PA10  
FQFPN
PC6  
PF2-NRST  
PA9  
PA0  
PA1  
PA8  
PB2  
VSS  
MSv39715V3  
DS12992 Rev 2  
33/117  
39  
 
 
Pinouts, pin description and alternate functions  
STM32G031x4/x6/x8  
Figure 7. STM32G031GxU UFQFPN28 pinout  
Top view  
1
2
3
4
5
6
7
21  
20  
19  
18  
17  
16  
15  
PC14-OSC32_IN  
PC15-OSC32_OUT  
VDD/VDDA  
VSS/VSSA  
PF2-NRST  
PA0  
PA14-BOOT0  
PA13  
PA12 [PA10]  
PA11 [PA9]  
PC6  
PA8  
PB1  
UFQFPN28  
PA1  
MSv39713V4  
Figure 8. STM32G031Fx TSSOP20 pinout  
Top view  
PB7/PB8  
1
2
3
4
5
6
7
20  
19  
18  
17  
16  
15  
14  
13  
12  
11  
PB3/PB4/PB5/PB6  
PA15/PA14-BOOT0  
PA13  
PA12[PA10]  
PA11[PA9]  
PB0/PB1/PB2/PA8  
PA7  
PA6  
PA5  
PB9/PC14-OSC32_IN  
PC15-OSC32_OUT  
VDD/VDDA  
VSS/VSSA  
PF2-NRST  
PA0  
PA1  
PA2  
PA3  
8
9
10  
PA4  
MSv47953V2  
Figure 9. STM32G031Yx WLCSP18 ballout  
1
2
3
4
5
6
7
Top view  
PA14-  
BOOT0  
/PA15  
PC15-  
OSC32  
_OUT  
PB7/  
PB8  
PA13  
A
B
C
D
E
PB5/  
PB6/  
PB3/  
PB4  
PC14-  
OSC32  
_IN/  
PA12  
[PA10]  
PB9  
PA11  
[PA9]  
VDD/  
VDDA  
PA5  
PA6  
PA1  
PA2  
PA3/  
PA4  
VSS/  
VSSA  
PA7  
PA8/  
PB0/  
PB1/  
PB2  
PF2-  
NRST/  
PA0  
MSv47970V1  
34/117  
DS12992 Rev 2  
 
 
 
STM32G031x4/x6/x8  
Pinouts, pin description and alternate functions  
Figure 10. STM32G031Jx SO8N pinout  
Top view  
1
2
3
4
8
7
6
5
PB7/PB8/PB9/PC14-OSC32_IN  
VDD/VDDA  
PB5/PB6/PA14-BOOT0/PA15  
PA13  
VSS/VSSA  
PA12[PA10]  
PA0/PA1/PA2/PF2-NRST  
PA8/PA11[PA9]/PB0/PB1  
MSv47956V1  
Table 11. Terms and symbols used in Table 12  
Symbol Definition  
Column  
Terminal name corresponds to its by-default function at reset, unless otherwise specified in  
parenthesis under the pin name.  
Pin name  
S
I
Supply pin  
Pin type  
Input only pin  
I/O  
FT  
RST  
Input / output pin  
5 V tolerant I/O  
Bidirectional reset pin with embedded weak pull-up resistor  
Options for FT I/Os  
I/O structure  
_f  
_a  
_e  
I/O, Fm+ capable  
I/O, with analog switch function  
I/O, with switchable diode to VDD  
Note  
Alternate  
Upon reset, all I/Os are set as analog inputs, unless otherwise specified.  
Functions selected through GPIOx_AFR registers  
functions  
Pin  
functions  
Additional  
functions  
Functions directly selected/enabled through peripheral registers  
DS12992 Rev 2  
35/117  
39  
 
 
Pinouts, pin description and alternate functions  
STM32G031x4/x6/x8  
Table 12. Pin assignment and description  
Pin  
Pin name  
Alternate  
functions  
Additional  
functions  
(function  
upon reset)  
TAMP_IN1, RTC_TS,  
RTC_OUT1, WKUP2  
(1)(2)  
(1)(2)  
-
-
-
-
-
-
-
-
-
1
2
PC13  
I/O  
I/O  
FT  
FT  
TIM1_BK  
PC14-  
OSC32_IN  
(PC14)  
-
TIM1_BK2  
OSC32_IN  
OSC32_IN, OSC_IN  
OSC32_OUT  
PC14-  
OSC32_IN  
(PC14)  
(1)(2)  
(1)(2)  
1
-
B6  
A7  
2
3
1
2
2
3
-
I/O  
FT  
FT  
TIM1_BK2  
PC15-  
OSC32_OUT I/O  
(PC15)  
3
OSC32_EN, OSC_EN  
-
-
-
-
-
-
-
-
-
4
5
6
7
VBAT  
S
S
S
S
-
-
-
-
-
-
-
-
-
-
-
-
VBAT  
-
VREF+  
VREF_OUT  
2
3
C7  
D6  
4
5
3
4
4
5
VDD/VDDA  
VSS/VSSA  
-
-
PF0-OSC_IN  
(PF0)  
-
-
-
-
-
-
-
-
-
-
8
9
I/O  
I/O  
FT  
FT  
-
-
TIM14_CH1  
OSC_EN  
OSC_IN  
PF1-  
OSC_OUT  
(PF1)  
OSC_OUT  
4
4
E7  
E7  
6
7
5
6
6
7
10  
11  
PF2-NRST  
PA0  
I/O  
I/O  
-
-
-
MCO  
NRST  
SPI2_SCK, USART2_CTS,  
TIM2_CH1_ETR, LPTIM1_OUT TAMP_IN2,WKUP1  
ADC_IN0,  
FT_a  
SPI1_SCK/I2S1_CK,  
USART2_RTS_DE_CK,  
ADC_IN1  
4
C5  
E5  
8
9
7
8
9
12  
13  
PA1  
I/O FT_ea  
-
TIM2_CH2, I2C1_SMBA,  
EVENTOUT  
SPI1_MOSI/I2S1_SD,  
ADC_IN2,  
4
-
8
9
-
PA2  
PA3  
PA4  
I/O  
FT_a  
-
-
-
USART2_TX, TIM2_CH3,  
WKUP4,LSCO  
LPUART1_TX  
SPI2_MISO, USART2_RX,  
D4 10  
10 14  
I/O FT_ea  
TIM2_CH4, LPUART1_RX,  
EVENTOUT  
ADC_IN3  
SPI1_NSS/I2S1_WS,  
SPI2_MOSI, TIM14_CH1,  
LPTIM2_OUT, EVENTOUT  
-
-
-
-
15  
I/O  
FT_a  
ADC_IN4, RTC_OUT2  
36/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Pin  
Pinouts, pin description and alternate functions  
Table 12. Pin assignment and description (continued)  
Pin name  
Alternate  
functions  
Additional  
functions  
(function  
upon reset)  
SPI1_NSS/I2S1_WS,  
SPI2_MOSI, TIM14_CH1,  
LPTIM2_OUT, EVENTOUT  
ADC_IN4,  
TAMP_IN1, RTC_TS,  
RTC_OUT1, WKUP2  
-
-
D4 11 10 11  
-
PA4  
PA5  
PA6  
PA7  
PB0  
I/O  
FT_a  
-
-
-
-
-
SPI1_SCK/I2S1_CK,  
TIM2_CH1_ETR,  
LPTIM2_ETR, EVENTOUT  
C3 12 11 12 16  
E3 13 12 13 17  
D2 14 13 14 18  
E1 15 14 15 19  
I/O FT_ea  
I/O FT_ea  
ADC_IN5  
ADC_IN6  
ADC_IN7  
ADC_IN8  
SPI1_MISO/I2S1_MCK,  
TIM3_CH1, TIM1_BK,  
TIM16_CH1, LPUART1_CTS  
-
SPI1_MOSI/I2S1_SD,  
TIM3_CH2, TIM1_CH1N,  
TIM14_CH1, TIM17_CH1  
-
I/O  
FT_a  
SPI1_NSS/I2S1_WS,  
TIM3_CH3, TIM1_CH2N,  
LPTIM1_OUT  
5
I/O FT_ea  
TIM14_CH1, TIM3_CH4,  
TIM1_CH3N, LPTIM2_IN1,  
LPUART1_RTS_DE,  
EVENTOUT  
5
E1 15 15 16 20  
PB1  
I/O FT_ea  
I/O FT_ea  
-
ADC_IN9  
SPI2_MISO, LPTIM1_OUT,  
EVENTOUT  
-
-
-
E1 15  
-
-
-
17 21  
PB2  
PB10  
PB11  
-
-
-
ADC_IN10  
ADC_IN11  
ADC_IN15  
LPUART1_RX, TIM2_CH3,  
SPI2_SCK, I2C2_SCL  
-
-
-
-
-
-
22  
23  
I/O  
I/O  
FT_fa  
FT_fa  
SPI2_MOSI, LPUART1_TX,  
TIM2_CH4, I2C2_SDA  
SPI2_NSS,  
LPUART1_RTS_DE, TIM1_BK,  
EVENTOUT  
-
-
-
-
-
-
-
-
-
-
24  
25  
PB12  
PB13  
I/O  
I/O  
FT_a  
FT_f  
-
-
ADC_IN16  
-
SPI2_SCK, LPUART1_CTS,  
TIM1_CH1N, I2C2_SCL,  
EVENTOUT  
SPI2_MISO, TIM1_CH2N,  
I2C2_SDA, EVENTOUT  
-
-
-
-
-
-
-
-
-
-
26  
27  
PB14  
PB15  
PA8  
I/O  
I/O  
I/O  
FT_f  
FT  
-
-
-
-
SPI2_MOSI, TIM1_CH3N,  
EVENTOUT  
RTC_REFIN  
-
MCO, SPI2_NSS, TIM1_CH1,  
LPTIM2_OUT, EVENTOUT  
5
E1 15 16 18 28  
FT  
DS12992 Rev 2  
37/117  
39  
Pinouts, pin description and alternate functions  
STM32G031x4/x6/x8  
Table 12. Pin assignment and description (continued)  
Pin  
Pin name  
Alternate  
functions  
Additional  
functions  
(function  
upon reset)  
MCO, USART1_TX,  
TIM1_CH2, SPI2_MISO,  
I2C1_SCL, EVENTOUT  
-
-
-
-
19 29  
PA9  
I/O  
FT_f  
-
-
-
-
-
-
-
-
17 20 30  
PC6  
PC7  
I/O  
I/O  
FT  
FT  
-
-
TIM3_CH1, TIM2_CH3  
TIM3_CH2, TIM2_CH4  
-
-
-
-
31  
SPI2_MOSI, USART1_RX,  
TIM1_CH3, TIM17_BK,  
I2C1_SDA, EVENTOUT  
-
-
-
-
-
-
-
21 32  
PA10  
I/O  
I/O  
I/O  
FT_f  
FT_f  
-
-
SPI1_MISO/I2S1_MCK,  
USART1_CTS, TIM1_CH4,  
TIM1_BK2, I2C2_SCL  
(3)  
-
-
33  
-
PA11 [PA9]  
PA11 [PA9]  
-
SPI1_MISO/I2S1_MCK,  
USART1_CTS, TIM1_CH4,  
TIM1_BK2, I2C2_SCL  
(3)  
(3)  
5
C1 16 18 22  
FT_fa  
ADC_IN15  
SPI1_MOSI/I2S1_SD,  
USART1_RTS_DE_CK,  
TIM1_ETR, I2S_CKIN,  
I2C2_SDA  
-
-
-
-
-
34 PA12 [PA10] I/O  
FT_f  
-
SPI1_MOSI/I2S1_SD,  
USART1_RTS_DE_CK,  
TIM1_ETR, I2S_CKIN,  
I2C2_SDA  
(3)  
6
B2 17 19 23  
-
PA12 [PA10] I/O  
FT_fa  
ADC_IN16  
(4)  
(4)  
7
8
A1 18 20 24 35  
PA13  
I/O FT_ea  
SWDIO, IR_OUT, EVENTOUT  
ADC_IN17  
SWCLK, USART2_TX,  
EVENTOUT  
A3 19 21 25 36 PA14-BOOT0 I/O  
FT_a  
FT  
ADC_IN18, BOOT0  
SPI1_NSS/I2S1_WS,  
USART2_RX,TIM2_CH1_ETR,  
EVENTOUT  
8
-
A3 19 22 26 37  
PA15  
PD0  
I/O  
I/O  
-
-
-
-
EVENTOUT, SPI2_NSS,  
TIM16_CH1  
-
-
-
-
38  
FT  
EVENTOUT, SPI2_SCK,  
TIM17_CH1  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
39  
40  
41  
PD1  
PD2  
PD3  
I/O  
I/O  
I/O  
FT  
FT  
FT  
-
-
-
-
-
-
TIM3_ETR, TIM1_CH1N  
USART2_CTS, SPI2_MISO,  
TIM1_CH2N  
38/117  
DS12992 Rev 2  
STM32G031x4/x6/x8  
Pin  
Pinouts, pin description and alternate functions  
Table 12. Pin assignment and description (continued)  
Pin name  
Alternate  
functions  
Additional  
functions  
(function  
upon reset)  
SPI1_SCK/I2S1_CK,  
TIM1_CH2, TIM2_CH2,  
USART1_RTS_DE_CK,  
EVENTOUT  
-
B4 20 23 27 42  
PB3  
I/O  
FT  
-
-
SPI1_MISO/I2S1_MCK,  
TIM3_CH1, USART1_CTS,  
TIM17_BK, EVENTOUT  
-
B4 20 24 28 43  
B4 20 25 29 44  
PB4  
PB5  
I/O  
I/O  
FT  
FT  
-
-
-
SPI1_MOSI/I2S1_SD,  
TIM3_CH2, TIM16_BK,  
LPTIM1_IN1, I2C1_SMBA  
8
WKUP6  
USART1_TX, TIM1_CH3,  
TIM16_CH1N, SPI2_MISO,  
LPTIM1_ETR, I2C1_SCL,  
EVENTOUT  
8
-
B4 20 26 30 45  
PB6  
PB7  
I/O  
I/O  
FT_f  
FT_f  
-
-
-
USART1_RX, SPI2_MOSI,  
TIM17_CH1N, LPTIM1_IN2,  
I2C1_SDA, EVENTOUT  
-
-
-
-
46  
-
PVD_IN  
USART1_RX, SPI2_MOSI,  
TIM17_CH1N, LPTIM1_IN2,  
I2C1_SDA, EVENTOUT  
1
1
1
A5  
A5  
B6  
1
1
2
27 31  
PB7  
PB8  
PB9  
I/O  
I/O  
I/O  
FT_fa  
FT_f  
FT_f  
-
-
-
ADC_IN11, PVD_IN  
SPI2_SCK, TIM16_CH1,  
I2C1_SCL, EVENTOUT  
28 32 47  
-
-
IR_OUT, TIM17_CH1,  
SPI2_NSS, I2C1_SDA,  
EVENTOUT  
-
1
48  
1. PC13, PC14 and PC15 are supplied through the power switch. Since the switch only sinks a limited amount of current (3  
mA), the use of GPIOs PC13 to PC15 in output mode is limited:  
- The speed should not exceed 2 MHz with a maximum load of 30 pF  
- These GPIOs must not be used as current sources (for example to drive a LED).  
2. After an RTC domain power-up, PC13, PC14 and PC15 operate as GPIOs. Their function then depends on the content of  
the RTC registers. The RTC registers are not reset upon system reset. For details on how to manage these GPIOs, refer to  
the RTC domain and RTC register descriptions in the RM0444 reference manual.  
3. Pins PA9 and PA10 can be remapped in place of pins PA11 and PA12 (default mapping), using SYSCFG_CFGR1 register.  
4. Upon reset, these pins are configured as SWD alternate functions, and the internal pull-up on PA13 pin and the internal pull-  
down on PA14 pin are activated.  
DS12992 Rev 2  
39/117  
39  
Table 13. Port A alternate function mapping  
Port  
AF0  
AF1  
AF2  
AF3  
AF4  
AF5  
AF6  
AF7  
PA0  
SPI2_SCK  
USART2_CTS  
TIM2_CH1_ETR  
-
-
LPTIM1_OUT  
-
-
SPI1_SCK/  
I2S1_CK  
USART2_RTS  
_DE_CK  
PA1  
TIM2_CH2  
-
-
-
I2C1_SMBA  
EVENTOUT  
SPI1_MOSI/  
I2S1_SD  
PA2  
PA3  
PA4  
USART2_TX  
USART2_RX  
SPI2_MOSI  
TIM2_CH3  
TIM2_CH4  
-
-
-
-
-
-
LPUART1_TX  
-
SPI2_MISO  
-
-
LPUART1_RX  
-
EVENTOUT  
EVENTOUT  
SPI1_NSS/  
I2S1_WS  
TIM14_CH1  
LPTIM2_OUT  
SPI1_SCK/  
I2S1_CK  
PA5  
PA6  
PA7  
-
TIM2_CH1_ETR  
TIM1_BKIN  
-
-
-
LPTIM2_ETR  
TIM16_CH1  
TIM17_CH1  
-
EVENTOUT  
SPI1_MISO/  
I2S1_MCK  
TIM3_CH1  
TIM3_CH2  
-
LPUART1_CTS  
-
-
-
SPI1_MOSI/  
I2S1_SD  
TIM1_CH1N  
TIM14_CH1  
-
-
-
-
PA8  
PA9  
MCO  
MCO  
SPI2_NSS  
USART1_TX  
USART1_RX  
TIM1_CH1  
TIM1_CH2  
TIM1_CH3  
-
LPTIM2_OUT  
-
EVENTOUT  
EVENTOUT  
EVENTOUT  
SPI2_MISO  
-
-
I2C1_SCL  
I2C1_SDA  
PA10  
SPI2_MOSI  
TIM17_BKIN  
SPI1_MISO/  
I2S1_MCK  
PA11  
PA12  
USART1_CTS  
TIM1_CH4  
TIM1_ETR  
-
-
-
-
TIM1_BKIN2  
I2S_CKIN  
I2C2_SCL  
I2C2_SDA  
-
-
SPI1_MOSI/  
I2S1_SD  
USART1_RTS  
_DE_CK  
PA13  
PA14  
SWDIO  
SWCLK  
IR_OUT  
-
-
-
-
-
-
-
-
-
-
EVENTOUT  
EVENTOUT  
USART2_TX  
SPI1_NSS/  
I2S1_WS  
PA15  
USART2_RX  
TIM2_CH1_ETR  
-
-
-
-
EVENTOUT  
 
Table 14. Port B alternate function mapping  
Port  
AF0  
AF1  
AF2  
AF3  
AF4  
AF5  
AF6  
AF7  
SPI1_NSS/  
I2S1_WS  
PB0  
TIM3_CH3  
TIM1_CH2N  
-
-
LPTIM1_OUT  
-
-
LPUART1_RTS  
_DE  
PB1  
PB2  
PB3  
TIM14_CH1  
-
TIM3_CH4  
SPI2_MISO  
TIM1_CH2  
TIM1_CH3N  
-
-
-
-
-
-
LPTIM2_IN1  
EVENTOUT  
EVENTOUT  
EVENTOUT  
LPTIM1_OUT  
-
-
-
SPI1_SCK/  
I2S1_CK  
USART1_RTS  
_DE_CK  
TIM2_CH2  
SPI1_MISO/  
I2S1_MCK  
PB4  
PB5  
TIM3_CH1  
TIM3_CH2  
-
-
-
USART1_CTS  
-
TIM17_BKIN  
LPTIM1_IN1  
-
EVENTOUT  
-
SPI1_MOSI/  
I2S1_SD  
TIM16_BKIN  
I2C1_SMBA  
PB6  
PB7  
USART1_TX  
TIM1_CH3  
SPI2_MOSI  
SPI2_SCK  
-
TIM16_CH1N  
TIM17_CH1N  
TIM16_CH1  
TIM17_CH1  
TIM2_CH3  
-
-
-
-
-
-
SPI2_MISO  
LPTIM1_ETR  
I2C1_SCL  
I2C1_SDA  
I2C1_SCL  
I2C1_SDA  
I2C2_SCL  
I2C2_SDA  
EVENTOUT  
EVENTOUT  
EVENTOUT  
EVENTOUT  
-
USART1_RX  
-
-
-
-
-
LPTIM1_IN2  
PB8  
-
IR_OUT  
-
-
PB9  
SPI2_NSS  
SPI2_SCK  
-
PB10  
PB11  
LPUART1_RX  
LPUART1_TX  
SPI2_MOSI  
TIM2_CH4  
-
LPUART1_RTS  
_DE  
PB12  
SPI2_NSS  
TIM1_BKIN  
-
-
-
-
EVENTOUT  
PB13  
PB14  
PB15  
SPI2_SCK  
SPI2_MISO  
SPI2_MOSI  
LPUART1_CTS  
TIM1_CH1N  
TIM1_CH2N  
TIM1_CH3N  
-
-
-
-
-
-
-
-
-
I2C2_SCL  
I2C2_SDA  
-
EVENTOUT  
EVENTOUT  
EVENTOUT  
-
-
 
Table 15. Port C alternate function mapping  
Port  
AF0  
AF1  
AF2  
AF3  
AF4  
AF5  
AF6  
AF7  
PC6  
PC7  
-
TIM3_CH1  
TIM2_CH3  
TIM2_CH4  
TIM1_BKIN  
TIM1_BKIN2  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
TIM3_CH2  
PC13  
PC14  
PC15  
-
-
-
-
OSC32_EN  
OSC_EN  
*
Table 16. Port D alternate function mapping  
Port  
AF0  
AF1  
AF2  
AF3  
AF4  
AF5  
AF6  
AF7  
PD0  
PD1  
PD2  
PD3  
EVENTOUT  
EVENTOUT  
-
SPI2_NSS  
SPI2_SCK  
TIM3_ETR  
SPI2_MISO  
TIM16_CH1  
TIM17_CH1  
TIM1_CH1N  
TIM1_CH2N  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
USART2_CTS  
Table 17. Port F alternate function mapping  
Port  
AF0  
AF1  
AF2  
AF3  
AF4  
AF5  
AF6  
AF7  
PF0  
PF1  
PF2  
-
-
-
-
TIM14_CH1  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
OSC_EN  
MCO  
-
-
 
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
5
Electrical characteristics  
5.1  
Parameter conditions  
Unless otherwise specified, all voltages are referenced to V  
.
SS  
Parameter values defined at temperatures or in temperature ranges out of the ordering  
information scope are to be ignored.  
Packages used for characterizing certain electrical parameters may differ from the  
commercial packages as per the ordering information.  
5.1.1  
Minimum and maximum values  
Unless otherwise specified, the minimum and maximum values are guaranteed in the worst  
conditions of ambient temperature, supply voltage and frequencies by tests in production on  
100% of the devices with an ambient temperature at T = 25 °C and T = T (max) (given by  
A
A
A
the selected temperature range).  
Data based on characterization results, design simulation and/or technology characteristics  
are indicated in the table footnotes and are not tested in production. Based on  
characterization, the minimum and maximum values refer to sample tests and represent the  
mean value plus or minus three times the standard deviation (mean ±3σ).  
5.1.2  
5.1.3  
Typical values  
Unless otherwise specified, typical data are based on T = 25 °C, V = V = 3 V. They  
DDA  
are given only as design guidelines and are not tested.  
A
DD  
Typical ADC accuracy values are determined by characterization of a batch of samples from  
a standard diffusion lot over the full temperature range, where 95% of the devices have an  
error less than or equal to the value indicated (mean ±2σ).  
Typical curves  
Unless otherwise specified, all typical curves are given only as design guidelines and are  
not tested.  
5.1.4  
5.1.5  
Loading capacitor  
The loading conditions used for pin parameter measurement are shown in Figure 11.  
Pin input voltage  
The input voltage measurement on a pin of the device is described in Figure 12.  
Figure 11. Pin loading conditions  
Figure 12. Pin input voltage  
MCU pin  
MCU pin  
C = 50 pF  
VIN  
DS12992 Rev 2  
43/117  
92  
 
 
 
 
 
 
 
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
5.1.6  
Power supply scheme  
Figure 13. Power supply scheme  
VBAT  
Backup circuitry  
(LSE, RTC and  
backup registers)  
1.55 V to 3.6 V  
Power  
switch  
VDD  
VCORE  
VDD/VDDA  
GPIOs  
VDD  
Regulator  
VDDIO1  
OUT  
IN  
Kernel logic  
(CPU, digital and  
memories)  
IO  
logic  
1 x 100 nF  
+ 1 x 4.7 μF  
VSS  
VDDA  
VREF  
VREF+  
1 μF  
VREF+  
VREF-  
ADC  
VREFBUF  
100 nF  
VSSA  
VSS/VSSA  
MSv47997V1  
Caution:  
Power supply pin pair (VDD/VDDA and VSS/VSSA) must be decoupled with filtering  
ceramic capacitors as shown above. These capacitors must be placed as close as possible  
to, or below, the appropriate pins on the underside of the PCB to ensure the good  
functionality of the device.  
5.1.7  
Current consumption measurement  
Figure 14. Current consumption measurement scheme  
IDDVBAT  
VBAT  
VBAT  
IDD  
VDD/VDDA  
VDD  
(VDDA  
)
MSv47901V1  
44/117  
DS12992 Rev 2  
 
 
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
5.2  
Absolute maximum ratings  
Stresses above the absolute maximum ratings listed in Table 18, Table 19 and Table 20  
may cause permanent damage to the device. These are stress ratings only and functional  
operation of the device at these conditions is not implied. Exposure to maximum rating  
conditions for extended periods may affect device reliability.  
All voltages are defined with respect to V  
.
SS  
Table 18. Voltage characteristics  
Ratings Min  
External supply voltage  
Symbol  
Max  
Unit  
VDD  
VBAT  
- 0.3  
- 0.3  
- 0.3  
- 0.3  
- 0.3  
4.0  
4.0  
External supply voltage on VBAT pin  
External voltage on VREF+ pin  
Input voltage on FT_xx  
VREF+  
Min(VDD + 0.4, 4.0)  
VDD + 4.0(2)  
4.0  
V
(1)  
VIN  
Input voltage on any other pin  
1. Refer to Table 19 for the maximum allowed injected current values.  
2. To sustain a voltage higher than 4 V the internal pull-up/pull-down resistors must be disabled.  
Table 19. Current characteristics  
Symbol  
Ratings  
Max  
Unit  
IVDD/VDDA Current into VDD/VDDA power pin (source)(1)  
IVSS/VSSA Current out of VSS/VSSA ground pin (sink)(1)  
Output current sunk by any I/O and control pin except FT_f  
100  
100  
15  
IIO(PIN)  
Output current sunk by any FT_f pin  
20  
Output current sourced by any I/O and control pin  
Total output current sunk by sum of all I/Os and control pins  
Total output current sourced by sum of all I/Os and control pins  
15  
mA  
80  
∑IIO(PIN)  
80  
-5 / NA(3)  
25  
(2)  
Injected current on a FT_xx pin  
IINJ(PIN)  
∑|IINJ(PIN)  
|
Total injected current (sum of all I/Os and control pins)(4)  
1. All main power (VDD/VDDA, VBAT) and ground (VSS/VSSA) pins must always be connected to the external power  
supplies, in the permitted range.  
2. A positive injection is induced by VIN > VDDIOx while a negative injection is induced by VIN < VSS. IINJ(PIN) must never be  
exceeded. Refer also to Table 18: Voltage characteristics for the maximum allowed input voltage values.  
3. Positive injection is not possible on these I/Os and does not occur for input voltages lower than the specified maximum  
value.  
4. When several inputs are submitted to a current injection, the maximum ∑|IINJ(PIN)| is the absolute sum of the negative  
injected currents (instantaneous values).  
DS12992 Rev 2  
45/117  
92  
 
 
 
 
 
 
Electrical characteristics  
Symbol  
STM32G031x4/x6/x8  
Table 20. Thermal characteristics  
Ratings  
Value  
Unit  
TSTG  
TJ  
Storage temperature range  
Maximum junction temperature  
–65 to +150  
150  
°C  
°C  
5.3  
Operating conditions  
5.3.1  
General operating conditions  
Table 21. General operating conditions  
Symbol  
Parameter  
Conditions  
Min  
Max  
Unit  
fHCLK Internal AHB clock frequency  
fPCLK Internal APB clock frequency  
-
0
0
64  
64  
MHz  
V
-
VDD  
Standard operating voltage  
-
1.7(1)  
3.6  
3.6  
For ADC operation  
1.62  
VDDA Analog supply voltage  
V
For VREFBUF operation  
2.4  
3.6  
VBAT  
VIN  
Backup operating voltage  
I/O input voltage  
-
1.55  
-0.3  
-40  
-40  
-40  
-40  
-40  
-40  
3.6  
V
V
-
Min(VDD + 3.6, 5.5)(2)  
Suffix 6(4)  
Suffix 7(4)  
Suffix 3(4)  
Suffix 6(4)  
Suffix 7(4)  
Suffix 3(4)  
85  
TA  
Ambient temperature(3)  
105  
125  
105  
125  
130  
°C  
°C  
TJ  
Junction temperature  
1. When RESET is released functionality is guaranteed down to VPDR min.  
2. For operation with voltage higher than VDD +0.3 V, the internal pull-up and pull-down resistors must be disabled.  
3. The TA(max) applies to PD(max). At PD < PD(max) the ambient temperature is allowed to go higher than TA(max) provided  
that the junction temperature TJ does not exceed TJ(max). Refer to Section 6.9: Thermal characteristics.  
4. Temperature range digit in the order code. See Section 7: Ordering information.  
46/117  
DS12992 Rev 2  
 
 
 
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
5.3.2  
Operating conditions at power-up / power-down  
The parameters given in Table 22 are derived from tests performed under the ambient  
temperature condition summarized in Table 21.  
Table 22. Operating conditions at power-up / power-down  
Symbol  
Parameter  
Conditions  
Min  
Max  
Unit  
VDD rising  
-
µs/V  
tVDD  
VDD slew rate  
VDD falling; ULPEN = 0  
VDD falling; ULPEN = 1  
10  
100  
ms/V  
5.3.3  
Embedded reset and power control block characteristics  
The parameters given in Table 23 are derived from tests performed under the ambient  
temperature conditions summarized in Table 21: General operating conditions.  
Table 23. Embedded reset and power control block characteristics  
Symbol  
Parameter  
Conditions(1) Min  
Typ  
Max Unit  
(2)  
tRSTTEMPO  
POR temporization when VDD crosses VPOR  
Power-on reset threshold  
VDD rising  
-
250  
400  
μs  
V
(2)  
VPOR  
-
-
1.62 1.66 1.70  
1.60 1.64 1.69  
2.05 2.10 2.18  
1.95 2.00 2.08  
2.20 2.31 2.38  
2.10 2.21 2.28  
2.50 2.62 2.68  
2.40 2.52 2.58  
2.80 2.91 3.00  
2.70 2.81 2.90  
2.05 2.15 2.22  
1.95 2.05 2.12  
2.20 2.30 2.37  
2.10 2.20 2.27  
2.35 2.46 2.54  
2.25 2.36 2.44  
2.50 2.62 2.70  
2.40 2.52 2.60  
2.65 2.74 2.87  
2.55 2.64 2.77  
(2)  
VPDR  
Power-down reset threshold  
V
V
DD rising  
VDD falling  
DD rising  
VBOR1  
VBOR2  
VBOR3  
VBOR4  
VPVD0  
VPVD1  
VPVD2  
VPVD3  
VPVD4  
Brownout reset threshold 1  
Brownout reset threshold 2  
Brownout reset threshold 3  
Brownout reset threshold 4  
Programmable voltage detector threshold 0  
PVD threshold 1  
V
V
V
V
V
V
V
V
V
V
VDD falling  
VDD rising  
VDD falling  
V
DD rising  
VDD falling  
DD rising  
VDD falling  
DD rising  
VDD falling  
DD rising  
VDD falling  
DD rising  
VDD falling  
DD rising  
VDD falling  
V
V
V
PVD threshold 2  
V
PVD threshold 3  
V
PVD threshold 4  
DS12992 Rev 2  
47/117  
92  
 
 
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
Table 23. Embedded reset and power control block characteristics (continued)  
Symbol  
Parameter  
Conditions(1) Min  
DD rising  
VDD falling  
DD rising  
Typ  
Max Unit  
V
2.80 2.91 3.03  
2.70 2.81 2.93  
2.90 3.01 3.14  
2.80 2.91 3.04  
VPVD5  
PVD threshold 5  
PVD threshold 6  
V
V
V
VPVD6  
VDD falling  
Hysteresis in  
continuous  
mode  
-
-
20  
30  
-
-
Vhyst_POR_PDR  
Hysteresis of VPOR and VPDR  
mV  
Hysteresis in  
other mode  
Vhyst_BOR_PVD  
Hysteresis of VBORx and VPVDx  
BOR and PVD consumption  
-
-
-
-
100  
1.1  
-
mV  
µA  
(2)  
IDD(BOR_PVD)  
1.6  
1. Continuous mode means Run/Sleep modes, or temperature sensor enable in Low-power run/Low-power sleep modes.  
2. Guaranteed by design.  
5.3.4  
Embedded voltage reference  
The parameters given in Table 24 are derived from tests performed under the ambient  
temperature and supply voltage conditions summarized in Table 21: General operating  
conditions.  
Table 24. Embedded internal voltage reference  
Symbol  
VREFINT  
Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
Internal reference voltage  
-40°C < TJ < 130°C  
1.182 1.212 1.232  
V
ADC sampling time when reading  
the internal reference voltage  
(1)  
tS_vrefint  
-
-
-
4(2)  
-
8
-
µs  
µs  
Start time of reference voltage  
buffer when ADC is enable  
tstart_vrefint  
-
-
-
12(2)  
20(2)  
VREFINT buffer consumption from  
VDD when converted by ADC  
IDD(VREFINTBUF)  
12.5  
µA  
mV  
Internal reference voltage spread  
over the temperature range  
∆VREFINT  
V
DD = 3 V  
5
7.5(2)  
50(2)  
TCoeff_vrefint  
ACoeff  
Temperature coefficient  
Long term stability  
Voltage coefficient  
-
-
-
30  
ppm/°C  
ppm  
1000 hours, T = 25 °C  
3.0 V < VDD < 3.6 V  
300 1000(2)  
VDDCoeff  
-
250 1200(2) ppm/V  
VREFINT_DIV1 1/4 reference voltage  
VREFINT_DIV2 1/2 reference voltage  
VREFINT_DIV3 3/4 reference voltage  
24  
49  
74  
25  
50  
75  
26  
51  
76  
%
-
VREFINT  
1. The shortest sampling time can be determined in the application by multiple iterations.  
2. Guaranteed by design.  
48/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
Figure 15. V  
vs. temperature  
REFINT  
V
1.235  
1.23  
1.225  
1.22  
1.215  
1.21  
1.205  
1.2  
1.195  
1.19  
1.185  
°C  
-40  
-20  
0
20  
40  
60  
80  
100  
120  
Mean  
Min  
Max  
MSv40169V1  
5.3.5  
Supply current characteristics  
The current consumption is a function of several parameters and factors such as the  
operating voltage, ambient temperature, I/O pin loading, device software configuration,  
operating frequencies, I/O pin switching rate, program location in memory and executed  
binary code.  
The current consumption is measured as described in Figure 14: Current consumption  
measurement scheme.  
Typical and maximum current consumption  
The MCU is placed under the following conditions:  
All I/O pins are in analog input mode  
All peripherals are disabled except when explicitly mentioned  
The Flash memory access time is adjusted with the minimum wait states number,  
depending on the f  
frequency (refer to the table “Number of wait states according  
HCLK  
to CPU clock (HCLK) frequency” available in the RM0444 reference manual).  
When the peripherals are enabled f  
= f  
PCLK  
HCLK  
PCLK  
For Flash memory and shared peripherals f  
= f  
= f  
HCLK HCLKS  
Unless otherwise stated, values given in Table 25 through Table 33 are derived from tests  
performed under ambient temperature and supply voltage conditions summarized in  
Table 21: General operating conditions.  
DS12992 Rev 2  
49/117  
92  
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
Table 25. Current consumption in Run and Low-power run modes  
at different die temperatures  
Conditions  
Typ  
Max(1)  
Symbol  
Parameter  
Unit  
Fetch  
25° 85° 125° 25° 85° 130°  
General  
fHCLK  
from(2)  
C
C
C
C
C
C
64 MHz  
56 MHz  
48 MHz  
32 MHz  
24 MHz  
16 MHz  
64 MHz  
56 MHz  
48 MHz  
32 MHz  
24 MHz  
16 MHz  
16 MHz  
8 MHz  
5.2  
5.4  
5.6  
6.7  
6.9  
7.6  
4.7  
4.2  
2.9  
2.3  
1.5  
4.3  
3.8  
3.4  
2.4  
1.9  
1.2  
1.2  
0.7  
0.2  
1.0  
0.5  
0.2  
4.8  
4.3  
3.0  
2.4  
1.5  
4.4  
3.9  
3.5  
2.5  
1.9  
1.2  
1.2  
0.7  
0.3  
1.0  
0.6  
0.3  
4.9  
4.5  
3.2  
2.5  
1.7  
4.6  
4.1  
3.7  
2.6  
2.0  
1.4  
1.4  
0.8  
0.4  
1.2  
0.7  
0.4  
5.9  
4.8  
3.8  
2.9  
2.1  
6.0  
5.4  
4.8  
3.4  
2.7  
1.9  
1.6  
1.1  
0.5  
1.5  
1.0  
0.5  
6.0  
5.0  
4.1  
3.2  
2.4  
6.2  
5.6  
5.0  
3.6  
2.9  
2.0  
1.9  
1.3  
0.8  
1.7  
1.1  
0.7  
6.6  
5.6  
4.7  
3.9  
3.0  
6.6  
5.9  
5.3  
3.9  
3.3  
2.5  
2.5  
1.7  
1.3  
2.1  
1.5  
1.2  
Flash  
memory  
Range 1;  
PLL enabled;  
fHCLK = fHSE_bypass  
(≤16 MHz),  
fHCLK = fPLLRCLK  
(>16 MHz);  
(3)  
Supply  
current in  
Run mode  
IDD(Run)  
SRAM  
mA  
Range 2;  
Flash  
memory  
PLL enabled;  
fHCLK = fHSE_bypass  
(≤16 MHz),  
2 MHz  
16 MHz  
8 MHz  
fHCLK = fPLLRCLK  
(>16 MHz);  
SRAM  
(3)  
2 MHz  
2 MHz  
165 205 305 470 660 1190  
1 MHz  
90  
53  
23  
16  
120 225 400 580 1140  
Flash  
memory  
500 kHz  
125 kHz  
32 kHz  
2 MHz  
81  
51  
43  
185 360 530 1060  
155 310 500 990  
145 270 400 990  
PLL disabled;  
fHCLK = fHSE  
Supply  
current in bypass (> 32 kHz),  
Low-power fHCLK = fLSE  
IDD(LPRun)  
µA  
146 174 275 460 660 1160  
run mode bypass (= 32 kHz);  
(3)  
1 MHz  
83  
44  
19  
14  
104 195 390 630 1080  
500 kHz  
125 kHz  
32 kHz  
SRAM  
74  
46  
34  
155 340 590 1050  
135 300 420 920  
130 260 340 890  
1. Based on characterization results, not tested in production.  
2. Prefetch and cache enabled when fetching from Flash. Code compiled with high optimization for space in SRAM.  
3. VDD = 3.0 V for values in Typ columns and 3.6 V for values in Max columns, all peripherals disabled, cache enabled,  
prefetch disabled for code and data fetch from Flash and enabled from SRAM  
50/117  
DS12992 Rev 2  
 
STM32G031x4/x6/x8  
Electrical characteristics  
Table 26. Typical current consumption in Run and Low-power run modes,  
depending on code executed  
Conditions  
Typ  
Typ  
Symbol  
Parameter  
Unit  
Unit  
Fetch  
General  
Code  
25 °C  
25 °C  
from(1)  
Reduced code(3)  
Coremark  
5.4  
5.2  
5.3  
4.3  
4.0  
4.4  
5.6  
5.6  
4.3  
4.0  
1.6  
1.5  
1.5  
1.1  
1.0  
1.3  
1.4  
1.4  
1.0  
1.0  
345  
400  
400  
365  
415  
225  
515  
515  
295  
290  
84  
81  
Flash  
memory  
Dhrystone 2.1  
Fibonacci  
82  
67  
Range 1;  
While(1) loop  
Reduced code(3)  
Coremark  
62  
fHCLK = fPLLRCLK  
=
64 MHz;  
69  
(2)  
88  
SRAM  
Dhrystone 2.1  
Fibonacci  
88  
67  
Supply  
current in  
Run mode  
While(1) loop  
Reduced code(3)  
Coremark  
63  
IDD(Run)  
mA  
uA/MHz  
100  
81  
Flash  
memory  
Dhrystone 2.1  
Fibonacci  
81  
66  
Range 2;  
f
HCLK = fHSI16 =  
While(1) loop  
Reduced code(3)  
Coremark  
59  
16 MHz,  
78  
PLL disabled,  
(2)  
88  
SRAM  
Dhrystone 2.1  
Fibonacci  
88  
63  
While(1) loop  
Reduced code(3)  
Coremark  
60  
173  
200  
200  
183  
208  
113  
258  
258  
148  
145  
Flash  
memory  
Dhrystone 2.1  
Fibonacci  
Supply  
fHCLK = fHSI16/8 =  
While(1) loop  
Reduced code(3)  
Coremark  
current in 2 MHz;  
IDD(LPRun)  
uA  
uA/MHz  
Low-power PLL disabled,  
(2)  
run mode  
SRAM  
Dhrystone 2.1  
Fibonacci  
While(1) loop  
1. Prefetch and cache enabled when fetching from Flash. Code compiled with high optimization for space in SRAM.  
2. = 3.3 V, all peripherals disabled, cache enabled, prefetch disabled for execution in Flash and enabled in SRAM  
V
DD  
3. Reduced code used for characterization results provided in Table 25.  
DS12992 Rev 2  
51/117  
92  
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
Table 27. Current consumption in Sleep and Low-power sleep modes  
Conditions Typ  
Max(1)  
Symbol  
Parameter  
Unit  
Voltage  
scaling  
25° 85° 125° 25° 85° 130°  
General  
fHCLK  
C
C
C
C
C
C
64 MHz 1.3 1.4 1.5 1.8 2.0 2.8  
56 MHz 1.2 1.3 1.4 1.6 1.8 2.7  
48 MHz 1.1 1.1 1.3 1.5 1.6 2.6  
32 MHz 0.8 0.8 1.0 1.2 1.2 2.2  
24 MHz 0.7 0.7 0.8 0.9 1.0 1.8  
16 MHz 0.4 0.4 0.5 0.6 0.7 1.6  
16 MHz 0.3 0.4 0.5 0.5 0.6 1.3  
Flash memory enabled;  
fHCLK = fHSE bypass  
(≤16 MHz; PLL  
Range 1  
Supply  
current in disabled),  
IDD(Sleep)  
mA  
Sleep  
mode  
fHCLK = fPLLRCLK  
(>16 MHz; PLL  
enabled);  
All peripherals disabled  
Range 2 8 MHz 0.2 0.3 0.4 0.3 0.5 1.2  
2 MHz 0.1 0.2 0.3 0.2 0.4 1.1  
2 MHz  
1 MHz  
40  
27  
70 175 145 340 1055  
55 155 125 315 960  
Flash memory disabled;  
PLL disabled;  
Supply  
current in  
Low-power  
sleep mode  
IDD(LPSleep)  
fHCLK = fHSE bypass (> 32 kHz), 500 kHz 21  
47 150 120 240 825 µA  
42 145 110 225 680  
40 140 105 215 630  
fHCLK = fLSE bypass (= 32 kHz);  
All peripherals disabled  
125 kHz 15  
32 kHz 12  
1. Based on characterization results, not tested in production.  
Table 28. Current consumption in Stop 0 mode  
Conditions  
Typ  
Max(1)  
Symbol  
Parameter  
Unit  
HSI kernel  
VDD  
25°C  
85°C 125°C 25°C  
85°C 130°C  
1.8 V  
2.4 V  
3 V  
265  
265  
270  
270  
92  
290  
290  
295  
295  
130  
130  
135  
135  
375  
375  
380  
385  
225  
225  
230  
235  
330  
330  
345  
370  
120  
120  
125  
125  
420  
450  
485  
495  
180  
220  
235  
245  
745  
840  
940  
1000  
490  
605  
710  
830  
Enabled  
Supply  
current in  
Stop 0  
3.6 V  
1.8 V  
2.4 V  
3 V  
IDD(Stop 0)  
µA  
mode  
95  
Disabled  
97  
3.6 V  
99  
1. Based on characterization results, not tested in production.  
52/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
Table 29. Current consumption in Stop 1 mode  
Conditions  
Typ  
Max(1)  
Symbol  
Parameter  
Unit  
Flash  
memory  
RTC(2)  
VDD  
25°C 85°C 125°C 25°C 85°C 130°C  
1.8 V  
2.4 V  
3 V  
2.9  
3.1  
3.3  
3.6  
3.3  
3.6  
3.7  
4.2  
7.0  
7.3  
7.5  
7.8  
25  
26  
26  
26  
25  
26  
26  
27  
30  
30  
30  
31  
105  
110  
110  
110  
105  
110  
110  
110  
110  
115  
115  
115  
9
95  
590  
600  
610  
610  
610  
615  
620  
630  
630  
640  
660  
700  
11  
16  
20  
11  
14  
18  
23  
17  
18  
19  
23  
110  
120  
130  
95  
Disabled  
Enabled  
3.6 V  
1.8 V  
2.4 V  
3 V  
Not  
powered  
Supply  
current in  
Stop 1  
110  
120  
130  
130  
135  
140  
140  
IDD(Stop 1)  
µA  
mode  
3.6 V  
1.8 V  
2.4 V  
3 V  
Powered Disabled  
3.6 V  
1. Based on characterization results, not tested in production.  
2. Clocked by LSI  
Table 30. Current consumption in Standby mode  
Conditions Typ  
General  
Max(1)  
Symbol  
Parameter  
Unit  
VDD  
25°C 85°C 125°C 25°C 85°C 130°C  
1.8 V  
2.4 V  
3.0 V  
3.6 V  
1.8 V  
2.4 V  
3.0 V  
3.6 V  
1.8 V  
2.4 V  
3.0 V  
3.6 V  
1.8 V  
2.4 V  
3.0 V  
3.6 V  
0.1  
0.1  
0.2  
0.4  
0.3  
0.4  
0.6  
0.8  
0.2  
0.3  
0.4  
0.7  
0.7  
0.9  
1.1  
1.3  
1.5  
1.8  
2.1  
2.5  
1.7  
2.1  
2.5  
3.0  
1.6  
2.0  
2.4  
2.8  
1.4  
1.7  
2.0  
2.4  
5
6
7
8
5
6
7
8
5
6
7
8
5
6
7
8
0.7  
0.7  
0.9  
1.0  
0.8  
1.0  
1.2  
1.6  
0.8  
0.8  
1.1  
1.7  
1.0  
1.0  
1.4  
1.5  
9
30  
34  
39  
45  
33  
39  
46  
54  
32  
37  
44  
51  
32  
38  
50  
55  
11  
14  
16  
14  
14  
16  
16  
10  
12  
14  
17  
9
RTC disabled  
RTC enabled,  
clocked by LSI;  
Supply current  
in Standby  
mode(2)  
IDD(Standby)  
µA  
IWDG enabled,  
clocked by LSI  
10  
10  
12  
ULPEN = 0  
DS12992 Rev 2  
53/117  
92  
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
Table 30. Current consumption in Standby mode (continued)  
Conditions Typ  
Max(1)  
General 25°C 85°C 125°C 25°C 85°C 130°C  
Symbol  
Parameter  
Unit  
VDD  
1.8 V  
2.4 V  
3.0 V  
3.6 V  
0.3  
0.4  
0.5  
0.6  
0.8  
0.9  
1.0  
1.1  
3
3
3
4
0.4  
0.9  
1.3  
1.3  
7
8
8
9
21  
21  
23  
22  
Extra supply  
current to  
SRAM retention  
enabled  
∆IDD(SRAM)  
µA  
retain SRAM  
content(3)  
1. Based on characterization results, not tested in production.  
2. Without SRAM retention and with ULPEN bit set  
3. To be added to IDD(Standby) as appropriate  
Table 31. Current consumption in Shutdown mode  
Conditions  
Typ  
Max(1)  
Symbol  
Parameter  
Unit  
RTC  
VDD  
25 °C 85 °C 125 °C 25 °C 85 °C 130 °C  
1.8 V  
2.4 V  
3.0 V  
3.6 V  
1.8 V  
2.4 V  
3.0 V  
3.6 V  
12  
18  
370  
430  
500  
620  
550  
675  
835  
2950  
3350  
3900  
4550  
3100  
250  
450  
800  
900  
850  
2700 26500  
3000 29500  
3700 33500  
4500 38500  
2700 26500  
Disabled  
25  
Supply current  
in Shutdown  
mode  
42  
IDD(Shutdown)  
nA  
185  
265  
350  
460  
Enabled, clocked  
by LSE bypass at  
32.768 kHz  
3600 1450 3000 29500  
4300 2350 3700 33500  
1050 5050 3100 4400 38000  
1. Based on characterization results, not tested in production.  
Table 32. Current consumption in VBAT mode  
Conditions  
Typ  
Symbol  
Parameter  
Unit  
RTC  
VDD  
25°C  
85°C  
125°C  
1.8 V  
2.4 V  
3.0 V  
3.6 V  
1.8 V  
2.4 V  
3.0 V  
3.6 V  
1.8 V  
2.4 V  
3.0 V  
3.6 V  
180  
250  
330  
430  
300  
380  
460  
580  
1
240  
330  
420  
550  
360  
420  
480  
700  
59  
770  
910  
Enabled, clocked by  
LSE bypass at  
32.768 kHz  
1080  
1310  
840  
Enabled, clocked by  
LSE crystal at  
32.768 kHz  
1010  
1190  
1410  
590  
Supply current in  
VBAT mode  
IDD(VBAT)  
nA  
1
68  
660  
Disabled  
2
78  
740  
5
97  
860  
I/O system current consumption  
The current consumption of the I/O system has two components: static and dynamic.  
54/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
I/O static current consumption  
All the I/Os used as inputs with pull-up generate current consumption when the pin is  
externally held low. The value of this current consumption can be simply computed by using  
the pull-up/pull-down resistors values given in Table 51: I/O static characteristics.  
For the output pins, any external pull-down or external load must also be considered to  
estimate the current consumption.  
Additional I/O current consumption is due to I/Os configured as inputs if an intermediate  
voltage level is externally applied. This current consumption is caused by the input Schmitt  
trigger circuits used to discriminate the input value. Unless this specific configuration is  
required by the application, this supply current consumption can be avoided by configuring  
these I/Os in analog mode. This is notably the case of ADC input pins which should be  
configured as analog inputs.  
Caution:  
Any floating input pin can also settle to an intermediate voltage level or switch inadvertently,  
as a result of external electromagnetic noise. To avoid current consumption related to  
floating pins, they must either be configured in analog mode, or forced internally to a definite  
digital value. This can be done either by using pull-up/down resistors or by configuring the  
pins in output mode.  
I/O dynamic current consumption  
In addition to the internal peripheral current consumption measured previously (see  
Table 33: Current consumption of peripherals, the I/Os used by an application also  
contribute to the current consumption. When an I/O pin switches, it uses the current from  
the I/O supply voltage to supply the I/O pin circuitry and to charge/discharge the capacitive  
load (internal or external) connected to the pin:  
ISW = VDDIO1 × fSW × C  
where  
I
is the current sunk by a switching I/O to charge/discharge the capacitive load  
SW  
V
is the I/O supply voltage  
DDIO1  
f
is the I/O switching frequency  
SW  
C is the total capacitance seen by the I/O pin: C = C + C  
+ C  
S
INT  
EXT  
C is the PCB board capacitance including the pad pin.  
S
The test pin is configured in push-pull output mode and is toggled by software at a fixed  
frequency.  
DS12992 Rev 2  
55/117  
92  
Electrical characteristics  
STM32G031x4/x6/x8  
On-chip peripheral current consumption  
The current consumption of the on-chip peripherals is given in the following table. The MCU  
is placed under the following conditions:  
All I/O pins are in Analog mode  
The given value is calculated by measuring the difference of the current consumptions:  
when the peripheral is clocked on  
when the peripheral is clocked off  
Ambient operating temperature and supply voltage conditions summarized in Table 18:  
Voltage characteristics  
The power consumption of the digital part of the on-chip peripherals is given in the  
following table. The power consumption of the analog part of the peripherals (where  
applicable) is indicated in each related section of the datasheet.  
Table 33. Current consumption of peripherals  
Consumption in µA/MHz  
Peripheral  
Bus  
Low-power run  
and sleep  
Range 1  
Range 2  
IOPORT Bus  
GPIOA  
IOPORT  
IOPORT  
IOPORT  
IOPORT  
IOPORT  
IOPORT  
AHB  
0.5  
3.1  
2.9  
0.9  
0.7  
0.5  
3.2  
9.8  
3.4  
0.5  
4.3  
23.5  
0.2  
0.4  
0.4  
0.2  
7.0  
4.7  
3.6  
1.5  
2.3  
1.0  
3.1  
2.7  
0.4  
2.4  
2.3  
0.8  
0.6  
0.5  
2.2  
8.2  
2.9  
0.4  
3.6  
20.0  
0.2  
0.3  
0.4  
0.3  
5.9  
3.8  
3.1  
1.3  
2.0  
0.8  
2.7  
2.3  
0.3  
3.0  
3.0  
1.0  
1.0  
1.0  
2.8  
8.5  
3.0  
0.5  
3.5  
20.5  
0.1  
0.5  
0.5  
0.5  
6.5  
3.5  
3.5  
1.5  
2.5  
0.3  
3.0  
2.5  
GPIOB  
GPIOC  
GPIOD  
GPIOF  
Bus matrix  
All AHB Peripherals  
DMA1/DMAMUX  
CRC  
AHB  
AHB  
AHB  
FLASH  
AHB  
All APB peripherals  
AHB to APB bridge(1)  
PWR  
APB  
APB  
APB  
SYSCFG/VREFBUF  
WWDG  
APB  
APB  
TIM1  
APB  
TIM2  
APB  
TIM3  
APB  
TIM14  
APB  
TIM16  
APB  
TIM17  
APB  
LPTIM1  
APB  
LPTIM2  
APB  
56/117  
DS12992 Rev 2  
 
STM32G031x4/x6/x8  
Electrical characteristics  
Table 33. Current consumption of peripherals (continued)  
Consumption in µA/MHz  
Peripheral  
Bus  
Low-power run  
and sleep  
Range 1  
Range 2  
I2C1  
I2C2  
APB  
APB  
APB  
APB  
APB  
APB  
APB  
APB  
3.2  
0.7  
2.2  
1.3  
6.6  
1.8  
4.3  
1.6  
2.7  
0.6  
1.8  
1.1  
5.6  
1.5  
3.5  
1.5  
3.0  
1.0  
2.0  
1.5  
6.0  
2.0  
4.0  
1.5  
SPI1  
SPI2  
USART1  
USART2  
LPUART1  
ADC  
1. The AHB to APB Bridge is automatically active when at least one peripheral is ON on the APB.  
5.3.6  
Wakeup time from low-power modes and voltage scaling  
transition times  
The wakeup times given in Table 34 are the latency between the event and the execution of  
the first user instruction.  
(1)  
Table 34. Low-power mode wakeup times  
Symbol  
Parameter  
Conditions  
Typ Max  
Unit  
Wakeup time from  
tWUSLEEP Sleep to Run  
mode  
-
11  
11  
11  
14  
CPU  
cycles  
Transiting to Low-power-run-mode execution in Flash  
memory not powered in Low-power sleep mode;  
Wakeup time from  
tWULPSLEEP Low-power sleep  
mode  
HCLK = HSI16 / 8 = 2 MHz  
Transiting to Run-mode execution in Flash memory not  
powered in Stop 0 mode;  
5.6  
2
6
HCLK = HSI16 = 16 MHz;  
Regulator in Range 1 or Range 2  
Wakeup time from  
tWUSTOP0  
Stop 0  
µs  
Transiting to Run-mode execution in SRAM or in Flash  
memory powered in Stop 0 mode;  
2.4  
HCLK = HSI16 = 16 MHz;  
Regulator in Range 1 or Range 2  
DS12992 Rev 2  
57/117  
92  
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
(1)  
Table 34. Low-power mode wakeup times (continued)  
Symbol  
Parameter  
Conditions  
Typ Max  
Unit  
Transiting to Run-mode execution in Flash memory not  
powered in Stop 1 mode;  
9.0  
5
11.2  
7.5  
HCLK = HSI16 = 16 MHz;  
Regulator in Range 1 or Range 2  
Transiting to Run-mode execution in SRAM or in Flash  
memory powered in Stop 1 mode;  
HCLK = HSI16 = 16 MHz;  
Regulator in Range 1 or Range 2  
Wakeup time from  
Stop 1  
tWUSTOP1  
µs  
Transiting to Low-power-run-mode execution in Flash  
memory not powered in Stop 1 mode;  
22  
25.3  
HCLK = HSI16/8 = 2 MHz;  
Regulator in low-power mode (LPR = 1 in PWR_CR1)  
Transiting to Low-power-run-mode execution in SRAM or  
in Flash memory powered in Stop 1 mode;  
18  
23.5  
30  
HCLK = HSI16 / 8 = 2 MHz;  
Regulator in low-power mode (LPR = 1 in PWR_CR1)  
Transiting to Run mode;  
HCLK = HSI16 = 16 MHz;  
Regulator in Range 1  
Wakeup time from  
Standby mode  
tWUSTBY  
14.5  
µs  
Transiting to Run mode;  
HCLK = HSI16 = 16 MHz;  
Regulator in Range 1  
Wakeup time from  
Shutdown mode  
tWUSHDN  
258  
5
340  
7
µs  
µs  
Wakeup time from  
Transiting to Run mode;  
tWULPRUN Low-power run  
HSISYS = HSI16/8 = 2 MHz  
mode(2)  
1. Based on characterization results, not tested in production.  
2. Time until REGLPF flag is cleared in PWR_SR2.  
(1)  
Table 35. Regulator mode transition times  
Symbol  
Parameter  
Conditions  
Typ  
20  
Max  
40  
Unit  
Transition times between regulator  
Range 1 and Range 2(2)  
tVOST  
HSISYS = HSI16  
µs  
1. Based on characterization results, not tested in production.  
2. Time until VOSF flag is cleared in PWR_SR2.  
(1)  
Table 36. Wakeup time using LPUART  
Symbol  
Parameter  
Conditions  
Stop mode 0  
Typ  
Max  
Unit  
-
-
1.7  
8.5  
Wakeup time needed to calculate the maximum  
tWULPUART LPUART baud rate allowing to wakeup up from Stop  
mode when LPUART clock source is HSI16  
µs  
Stop mode 1  
1. Guaranteed by design.  
58/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
5.3.7  
External clock source characteristics  
High-speed external user clock generated from an external source  
In bypass mode the HSE oscillator is switched off and the input pin is a standard GPIO.  
The external clock signal has to respect the I/O characteristics in Section 5.3.14. See  
Figure 16 for recommended clock input waveform.  
(1)  
Table 37. High-speed external user clock characteristics  
Symbol  
Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
Voltage scaling  
Range 1  
-
8
48  
fHSE_ext User external clock source frequency  
MHz  
Voltage scaling  
Range 2  
-
8
26  
VHSEH OSC_IN input pin high level voltage  
VHSEL OSC_IN input pin low level voltage  
-
-
0.7 VDDIO1  
VSS  
-
-
VDDIO1  
V
0.3 VDDIO1  
Voltage scaling  
Range 1  
7
-
-
-
-
tw(HSEH)  
OSC_IN high or low time  
tw(HSEL)  
ns  
Voltage scaling  
Range 2  
18  
1. Guaranteed by design.  
Figure 16. High-speed external clock source AC timing diagram  
t
w(HSEH)  
V
HSEH  
90%  
10%  
V
HSEL  
t
t
t
t
r(HSE)  
f(HSE)  
w(HSEL)  
T
HSE  
MS19214V2  
Low-speed external user clock generated from an external source  
In bypass mode the LSE oscillator is switched off and the input pin is a standard GPIO.  
The external clock signal has to respect the I/O characteristics in Section 5.3.14. See  
Figure 17 for recommended clock input waveform.  
(1)  
Table 38. Low-speed external user clock characteristics  
Symbol  
Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
fLSE_ext User external clock source frequency  
-
-
32.768  
1000  
kHz  
DS12992 Rev 2  
59/117  
92  
 
 
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
(1)  
Table 38. Low-speed external user clock characteristics (continued)  
Symbol  
Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
VLSEH OSC32_IN input pin high level voltage  
VLSEL OSC32_IN input pin low level voltage  
-
-
0.7 VDDIO1  
VSS  
-
-
VDDIO1  
V
0.3 VDDIO1  
tw(LSEH)  
OSC32_IN high or low time  
tw(LSEL)  
-
250  
-
-
ns  
1. Guaranteed by design.  
Figure 17. Low-speed external clock source AC timing diagram  
t
w(LSEH)  
V
LSEH  
90%  
10%  
V
LSEL  
t
t
t
r(LSE)  
f(LSE)  
t
w(LSEL)  
T
LSE  
MS19215V2  
High-speed external clock generated from a crystal/ceramic resonator  
The high-speed external (HSE) clock can be supplied with a 4 to 48 MHz crystal/ceramic  
resonator oscillator. All the information given in this paragraph are based on design  
simulation results obtained with typical external components specified in Table 39. In the  
application, the resonator and the load capacitors have to be placed as close as possible to  
the oscillator pins in order to minimize output distortion and startup stabilization time. Refer  
to the crystal resonator manufacturer for more details on the resonator characteristics  
(frequency, package, accuracy).  
(1)  
Table 39. HSE oscillator characteristics  
Symbol  
Parameter  
Oscillator frequency  
Feedback resistor  
Conditions(2)  
Min  
Typ  
Max  
Unit  
fOSC_IN  
RF  
-
-
4
-
8
48  
-
MHz  
kΩ  
200  
60/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Symbol  
Electrical characteristics  
(1)  
Table 39. HSE oscillator characteristics (continued)  
Parameter  
Conditions(2)  
During startup(3)  
DD = 3 V,  
Min  
Typ  
Max  
Unit  
-
-
5.5  
V
Rm = 30 Ω,  
CL = 10 pF@8 MHz  
-
-
-
-
-
0.58  
0.59  
0.89  
1.14  
1.94  
-
-
-
-
-
VDD = 3 V,  
Rm = 45 Ω,  
CL = 10 pF@8 MHz  
VDD = 3 V,  
IDD(HSE)  
HSE current consumption  
mA  
Rm = 30 Ω,  
CL = 5 pF@48 MHz  
VDD = 3 V,  
Rm = 30 Ω,  
CL = 10 pF@48 MHz  
VDD = 3 V,  
Rm = 30 Ω,  
CL = 20 pF@48 MHz  
Maximum critical crystal  
transconductance  
Gm  
Startup  
-
-
-
1.5  
-
mA/V  
ms  
(4)  
tSU(HSE)  
Startup time  
VDD is stabilized  
2
1. Guaranteed by design.  
2. Resonator characteristics given by the crystal/ceramic resonator manufacturer.  
3. This consumption level occurs during the first 2/3 of the tSU(HSE) startup time  
4. tSU(HSE) is the startup time measured from the moment it is enabled (by software) to a stabilized 8 MHz oscillation is  
reached. This value is measured for a standard crystal resonator and it can vary significantly with the crystal manufacturer  
For C and C , it is recommended to use high-quality external ceramic capacitors in the  
L1  
L2  
5 pF to 20 pF range (typ.), designed for high-frequency applications, and selected to match  
the requirements of the crystal or resonator (see Figure 18). C and C are usually the  
L1  
L2  
same size. The crystal manufacturer typically specifies a load capacitance which is the  
series combination of C and C . PCB and MCU pin capacitance must be included (10 pF  
L1  
L2  
can be used as a rough estimate of the combined pin and board capacitance) when sizing  
and C .  
C
L1  
L2  
Note:  
For information on selecting the crystal, refer to the application note AN2867 “Oscillator  
design guide for ST microcontrollers” available from the ST website www.st.com.  
DS12992 Rev 2  
61/117  
92  
Electrical characteristics  
STM32G031x4/x6/x8  
Figure 18. Typical application with an 8 MHz crystal  
Resonator with integrated  
capacitors  
CL1  
OSC_IN  
fHSE  
Bias  
controlled  
gain  
8 MHz  
resonator  
RF  
(1)  
OSC_OUT  
REXT  
CL2  
MS19876V1  
1. REXT value depends on the crystal characteristics.  
Low-speed external clock generated from a crystal resonator  
The low-speed external (LSE) clock can be supplied with a 32.768 kHz crystal resonator  
oscillator. All the information given in this paragraph are based on design simulation results  
obtained with typical external components specified in Table 40. In the application, the  
resonator and the load capacitors have to be placed as close as possible to the oscillator  
pins in order to minimize output distortion and startup stabilization time. Refer to the crystal  
resonator manufacturer for more details on the resonator characteristics (frequency,  
package, accuracy).  
(1)  
Table 40. LSE oscillator characteristics (fLSE = 32.768 kHz)  
Symbol  
Parameter  
Conditions(2)  
Min  
Typ  
Max Unit  
LSEDRV[1:0] = 00  
Low drive capability  
-
250  
-
LSEDRV[1:0] = 01  
Medium low drive capability  
-
-
-
-
-
-
315  
-
IDD(LSE) LSE current consumption  
nA  
LSEDRV[1:0] = 10  
Medium high drive capability  
500  
-
LSEDRV[1:0] = 11  
High drive capability  
630  
-
LSEDRV[1:0] = 00  
Low drive capability  
-
-
-
0.5  
LSEDRV[1:0] = 01  
Medium low drive capability  
0.75  
µA/V  
1.7  
Maximum critical crystal  
Gmcritmax  
gm  
LSEDRV[1:0] = 10  
Medium high drive capability  
LSEDRV[1:0] = 11  
High drive capability  
-
-
-
2.7  
(3)  
tSU(LSE)  
Startup time  
VDD is stabilized  
2
-
s
1. Guaranteed by design.  
2. Refer to the note and caution paragraphs below the table, and to the application note AN2867 “Oscillator design guide for  
ST microcontrollers”.  
62/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
3. tSU(LSE) is the startup time measured from the moment it is enabled (by software) to a stabilized 32.768 kHz oscillation is  
reached. This value is measured for a standard crystal and it can vary significantly with the crystal manufacturer  
Note:  
For information on selecting the crystal, refer to the application note AN2867 “Oscillator  
design guide for ST microcontrollers” available from the ST website www.st.com.  
Figure 19. Typical application with a 32.768 kHz crystal  
Resonator with integrated  
capacitors  
CL1  
OSC32_IN  
fLSE  
Drive  
32.768 kHz  
resonator  
programmable  
amplifier  
OSC32_OUT  
CL2  
MS30253V2  
Note:  
An external resistor is not required between OSC32_IN and OSC32_OUT and it is forbidden  
to add one.  
5.3.8  
Internal clock source characteristics  
The parameters given in Table 41 are derived from tests performed under ambient  
temperature and supply voltage conditions summarized in Table 21: General operating  
conditions. The provided curves are characterization results, not tested in production.  
High-speed internal (HSI16) RC oscillator  
(1)  
Table 41. HSI16 oscillator characteristics  
Symbol  
Parameter  
HSI16 Frequency  
Conditions  
Min  
Typ  
Max  
Unit  
fHSI16  
VDD=3.0 V, TA=30 °C  
TA= 0 to 85 °C  
15.88  
-1  
-
-
-
16.08  
1
MHz  
%
HSI16 oscillator frequency drift over  
temperature  
Temp(HSI16)  
TA= -40 to 125 °C  
-2  
1.5  
%
%
HSI16 oscillator frequency drift over  
VDD  
VDD=1.62 V to 3.6 V  
-0.1  
-8  
-
0.05  
-4  
VDD(HSI16)  
From code 127 to 128  
From code 63 to 64  
-6  
-5.8  
-3.8  
-1.8  
TRIM  
HSI16 frequency user trimming step From code 191 to 192  
%
For all other code  
increments  
0.2  
0.3  
0.4  
(2)  
DHSI16  
Duty Cycle  
-
-
45  
-
-
55  
%
(2)  
tsu(HSI16)  
HSI16 oscillator start-up time  
0.8  
1.2  
μs  
DS12992 Rev 2  
63/117  
92  
 
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
(1)  
Table 41. HSI16 oscillator characteristics (continued)  
Symbol  
Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
(2)  
tstab(HSI16)  
HSI16 oscillator stabilization time  
HSI16 oscillator power consumption  
-
-
-
-
3
5
μs  
(2)  
IDD(HSI16)  
155  
190  
μA  
1. Based on characterization results, not tested in production.  
2. Guaranteed by design.  
Figure 20. HSI16 frequency vs. temperature  
MHz  
16.4  
+2%  
+1.5%  
+1%  
16.3  
16.2  
16.1  
16  
15.9  
15.8  
15.7  
15.6  
-1%  
-1.5%  
-2%  
-40  
-20  
0
min  
20  
40  
mean  
60  
80  
100  
120 °C  
max  
MSv39299V1  
Low-speed internal (LSI) RC oscillator  
(1)  
Table 42. LSI oscillator characteristics  
Symbol  
Parameter  
Conditions  
Min Typ Max Unit  
VDD = 3.0 V, TA = 30 °C  
31.04  
29.5  
-
-
32.96  
34  
fLSI  
LSI frequency  
kHz  
VDD = 1.62 V to 3.6 V, TA = -40 to  
125 °C  
(2)  
tSU(LSI)  
LSI oscillator start-up time  
-
-
-
80  
130  
180  
μs  
μs  
(2)  
tSTAB(LSI)  
LSI oscillator stabilization time 5% of final frequency  
125  
LSI oscillator power  
consumption  
(2)  
IDD(LSI)  
-
-
110  
180  
nA  
1. Based on characterization results, not tested in production.  
2. Guaranteed by design.  
64/117  
DS12992 Rev 2  
 
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
5.3.9  
PLL characteristics  
The parameters given in Table 43 are derived from tests performed under temperature and  
V
supply voltage conditions summarized in Table 21: General operating conditions.  
DD  
(1)  
Table 43. PLL characteristics  
Symbol  
Parameter  
Conditions  
Min  
2.66  
45  
Typ Max Unit  
fPLL_IN  
PLL input clock frequency(2)  
PLL input clock duty cycle  
-
-
-
-
16  
55  
MHz  
%
DPLL_IN  
Voltage scaling Range 1  
Voltage scaling Range 2  
Voltage scaling Range 1  
Voltage scaling Range 2  
Voltage scaling Range 1  
Voltage scaling Range 2  
Voltage scaling Range 1  
Voltage scaling Range 2  
-
3.09  
3.09  
12  
12  
12  
12  
96  
96  
-
-
-
122  
40  
128  
33  
64  
16  
344  
128  
40  
-
fPLL_P_OUT PLL multiplier output clock P  
fPLL_Q_OUT PLL multiplier output clock Q  
fPLL_R_OUT PLL multiplier output clock R  
fVCO_OUT PLL VCO output  
MHz  
MHz  
MHz  
-
-
-
-
-
MHz  
μs  
-
tLOCK  
Jitter  
PLL lock time  
15  
50  
40  
RMS cycle-to-cycle jitter  
RMS period jitter  
-
System clock 56 MHz  
±ps  
-
-
VCO freq = 96 MHz  
VCO freq = 192 MHz  
VCO freq = 344 MHz  
-
200 260  
300 380  
520 650  
PLL power consumption  
on VDD  
IDD(PLL)  
-
μA  
(1)  
-
1. Guaranteed by design.  
2. Take care of using the appropriate division factor M to obtain the specified PLL input clock values. The M factor is shared  
between the two PLLs.  
5.3.10  
Flash memory characteristics  
(1)  
Table 44. Flash memory characteristics  
Symbol  
Parameter  
Conditions  
Typ  
Max  
Unit  
tprog  
64-bit programming time  
-
85  
2.7  
125  
4.6  
µs  
Normal programming  
Fast programming  
Normal programming  
Fast programming  
-
tprog_row  
Row (32 double word) programming time  
1.7  
2.8  
21.8  
13.7  
22.0  
0.7  
36.6  
22.4  
40.0  
1.2  
ms  
tprog_page Page (2 Kbyte) programming time  
tERASE Page (2 Kbyte) erase time  
tprog_bank Bank (64 Kbyte(2)) programming time  
tME Mass erase time  
Normal programming  
Fast programming  
-
s
0.4  
0.7  
22.1  
40.1  
ms  
DS12992 Rev 2  
65/117  
92  
 
 
 
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
(1)  
Table 44. Flash memory characteristics (continued)  
Parameter Conditions  
Programming  
Symbol  
Typ  
Max  
Unit  
3
3
5
-
-
-
IDD(FlashA) Average consumption from VDD  
Page erase  
Mass erase  
mA  
Programming, 2 µs peak  
duration  
7
7
-
-
IDD(FlashP) Maximum current (peak)  
1. Guaranteed by design.  
mA  
Erase, 41 µs peak duration  
2. Values provided also apply to devices with less Flash memory than one 64 Kbyte bank  
Table 45. Flash memory endurance and data retention  
Symbol  
Parameter  
Endurance  
Conditions  
Min(1)  
Unit  
NEND  
TA = -40 to +105 °C  
10  
30  
15  
7
kcycles  
1 kcycle(2) at TA = 85 °C  
1 kcycle(2) at TA = 105 °C  
1 kcycle(2) at TA = 125 °C  
10 kcycles(2) at TA = 55 °C  
10 kcycles(2) at TA = 85 °C  
10 kcycles(2) at TA = 105 °C  
tRET  
Data retention  
Years  
30  
15  
10  
1. Guaranteed by characterization results.  
2. Cycling performed over the whole temperature range.  
5.3.11  
EMC characteristics  
Susceptibility tests are performed on a sample basis during device characterization.  
Functional EMS (electromagnetic susceptibility)  
While a simple application is executed on the device (toggling 2 LEDs through I/O ports).  
the device is stressed by two electromagnetic events until a failure occurs. The failure is  
indicated by the LEDs:  
Electrostatic discharge (ESD) (positive and negative) is applied to all device pins until  
a functional disturbance occurs. This test is compliant with the IEC 61000-4-2 standard.  
FTB: A Burst of Fast Transient voltage (positive and negative) is applied to V and  
DD  
V
through a 100 pF capacitor, until a functional disturbance occurs. This test is  
SS  
compliant with the IEC 61000-4-4 standard.  
A device reset allows normal operations to be resumed.  
The test results are given in Table 46. They are based on the EMS levels and classes  
defined in application note AN1709.  
66/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Symbol  
Electrical characteristics  
Level/  
Table 46. EMS characteristics  
Parameter  
Conditions  
Class  
VDD = 3.3 V, TA = +25 °C,  
fHCLK = 64 MHz, LQFP48,  
conforming to IEC 61000-4-2  
Voltage limits to be applied on any I/O pin to  
induce a functional disturbance  
VFESD  
2B  
Fast transient voltage burst limits to be applied  
VDD = 3.3 V, TA = +25 °C,  
VEFTB  
through 100 pF on VDD and VSS pins to induce a fHCLK = 64 MHz, LQFP48,  
functional disturbance conforming to IEC 61000-4-4  
5A  
Designing hardened software to avoid noise problems  
EMC characterization and optimization are performed at component level with a typical  
application environment and simplified MCU software. It should be noted that good EMC  
performance is highly dependent on the user application and the software in particular.  
Therefore it is recommended that the user applies EMC software optimization and  
prequalification tests in relation with the EMC level requested for his application.  
Software recommendations  
The software flowchart must include the management of runaway conditions such as:  
corrupted program counter  
unexpected reset  
critical data corruption (for example control registers)  
Prequalification trials  
Most of the common failures (unexpected reset and program counter corruption) can be  
reproduced by manually forcing a low state on the NRST pin or the Oscillator pins for 1  
second.  
To complete these trials, ESD stress can be applied directly on the device, over the range of  
specification values. When unexpected behavior is detected, the software can be hardened  
to prevent unrecoverable errors occurring (see application note AN1015).  
Electromagnetic Interference (EMI)  
The electromagnetic field emitted by the device are monitored while a simple application is  
executed (toggling 2 LEDs through the I/O ports). This emission test is compliant with  
IEC 61967-2 standard which specifies the test board and the pin loading.  
DS12992 Rev 2  
67/117  
92  
 
Electrical characteristics  
STM32G031x4/x6/x8  
Max vs.  
Table 47. EMI characteristics  
[fHSE/fHCLK  
]
Monitored  
frequency band  
Symbol  
Parameter  
Conditions  
Unit  
8 MHz / 64 MHz  
0.1 MHz to 30 MHz  
30 MHz to 130 MHz  
130 MHz to 1 GHz  
1 GHz to 2 GHz  
EMI level  
-4  
1
VDD = 3.6 V, TA = 25 °C,  
Peak level LQFP64 package  
compliant with IEC 61967-2  
dBµV  
-
SEMI  
3
8
2.5  
5.3.12  
Electrical sensitivity characteristics  
Based on three different tests (ESD, LU) using specific measurement methods, the device is  
stressed in order to determine its performance in terms of electrical sensitivity.  
Electrostatic discharge (ESD)  
Electrostatic discharges (a positive then a negative pulse separated by 1 second) are  
applied to the pins of each sample according to each pin combination. The sample size  
depends on the number of supply pins in the device (3 parts × (n+1) supply pins). This test  
conforms to the ANSI/JEDEC standard.  
Table 48. ESD absolute maximum ratings  
Maximum  
Symbol  
Ratings  
Conditions  
Class  
Unit  
value(1)  
Electrostatic discharge voltage  
(human body model)  
TA = +25 °C, conforming to  
ANSI/ESDA/JEDEC JS-001  
VESD(HBM)  
VESD(CDM)  
1C  
1000  
V
Electrostatic discharge voltage  
(charge device model)  
TA = +25 °C, conforming to  
ANSI/ESDA/JEDEC JS-002  
C2a  
500  
1. Based on characterization results, not tested in production.  
Static latch-up  
Two complementary static tests are required on six parts to assess the latch-up  
performance:  
A supply overvoltage is applied to each power supply pin.  
A current is injected to each input, output and configurable I/O pin.  
These tests are compliant with EIA/JESD 78A IC latch-up standard.  
Table 49. Electrical sensitivity  
Symbol  
Parameter  
Conditions  
Class  
II Level A  
LU  
Static latch-up class  
TA = +125 °C conforming to JESD78  
68/117  
DS12992 Rev 2  
 
 
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
5.3.13  
I/O current injection characteristics  
As a general rule, current injection to the I/O pins, due to external voltage below V or  
SS  
above V  
(for standard, 3.3 V-capable I/O pins) should be avoided during normal  
DDIO1  
product operation. However, in order to give an indication of the robustness of the  
microcontroller in cases when abnormal injection accidentally happens, susceptibility tests  
are performed on a sample basis during device characterization.  
Functional susceptibility to I/O current injection  
While a simple application is executed on the device, the device is stressed by injecting  
current into the I/O pins programmed in floating input mode. While current is injected into  
the I/O pin, one at a time, the device is checked for functional failures.  
The failure is indicated by an out-of-range parameter: ADC error above a certain limit  
(higher than 5 LSB TUE), induced leakage current on adjacent pins out of conventional  
limits (-5 µA/+0 µA range) or other functional failure (for example reset occurrence or  
oscillator frequency deviation).  
Negative induced leakage current is caused by negative injection and positive induced  
leakage current is caused by positive injection.  
(1)  
Table 50. I/O current injection susceptibility  
Functional susceptibility  
Symbol  
Description  
Unit  
Negative  
injection  
Positive  
injection  
All except PA1, PA3, PA5, PA6,  
PA13, PB0, PB1, PB2, and PB8  
-5  
N/A  
+5 / N/A(2)  
+5 / N/A(2)  
N/A  
Injected current on  
pin  
PA1, PA5, PA13, PB1, PB2  
PA3, PA6, PB0  
PB8  
0
-5  
0
IINJ  
mA  
1. Based on characterization results, not tested in production.  
2. The injection current value is applicable when the switchable diode is activated, N/A when not activated.  
DS12992 Rev 2  
69/117  
92  
 
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
5.3.14  
I/O port characteristics  
General input/output characteristics  
Unless otherwise specified, the parameters given in Table 51 are derived from tests  
performed under the conditions summarized in Table 21: General operating conditions. All  
I/Os are designed as CMOS- and TTL-compliant.  
Table 51. I/O static characteristics  
Symbol  
Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
0.3 x VDDIO1  
V
(2)  
I/O input low level  
voltage  
(1)  
VIL  
All  
All  
1.62 V < VDDIO1 < 3.6 V  
-
-
0.39 x VDDIO1  
- 0.06 (3)  
(
0.7 x VDDIO1  
-
-
-
-
-
2)  
I/O input high level  
voltage  
(1)  
VIH  
1.62 V < VDDIO1 < 3.6 V  
V
0.49 x VDDIO1  
+ 0.26(3)  
FT_xx,  
NRST  
(3)  
Vhys  
I/O input hysteresis  
1.62 V < VDDIO1 < 3.6 V  
0 < VIN ≤ VDDIO1  
-
200  
mV  
-
-
-
-
±70  
All  
except  
FT_e  
VDDIO1 ≤ VIN ≤ VDDIO1+1 V  
600(4)  
nA  
Input leakage  
current(3)  
VDDIO1 +1 V < VIN  
5.5 V(3)  
-
-
-
-
150(4)  
Ilkg  
FT_e  
0 < VIN < VDDIO1  
5
µA  
kΩ  
(5)  
Weak pull-up  
RPU  
equivalent resistor  
VIN = VSS  
25  
40  
55  
(6)  
Weak pull-down  
RPD  
CIO  
VIN = VDDIO1  
25  
-
40  
5
55  
-
kΩ  
pF  
equivalent resistor(6)  
I/O pin capacitance  
-
1. Refer to Figure 21: I/O input characteristics.  
2. Tested in production.  
3. Guaranteed by design.  
4. This value represents the pad leakage of the I/O itself. The total product pad leakage is provided by this formula:  
ITotal_Ileak_max = 10 µA + [number of I/Os where VIN is applied on the pad] ₓ Ilkg(Max).  
5. FT_e with diode enabled. Input leakage current of FT_e I/Os with the diode disabled is the same as standard I/Os.  
6. Pull-up and pull-down resistors are designed with a true resistance in series with a switchable PMOS/NMOS. This  
PMOS/NMOS contribution to the series resistance is minimal (~10% order).  
70/117  
DS12992 Rev 2  
 
 
 
 
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
All I/Os are CMOS- and TTL-compliant (no software configuration required). Their  
characteristics cover more than the strict CMOS-technology or TTL parameters, as shown  
in Figure 21.  
Figure 21. I/O input characteristics  
3
2.5  
2
Minimum required  
logic level 1 zone  
TTL standard requirement  
VIN (V)  
1.5  
Undefined input range  
1
TTL standard requirement  
0.5  
0
Minimum required  
logic level 0 zone  
1.6  
1.8  
2.0  
2.2  
2.4  
2.6  
2.8  
3.0  
3.2  
3.4  
3.6  
VDDIO (V)  
Device characteristics  
Test thresholds  
MSv47925V1  
Characteristics of FT_e I/Os  
The following table and figure specify input characteristics of FT_e I/Os.  
Table 52. Input characteristics of FT_e I/Os  
Symbol  
Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
IINJ  
DDIO1-VIN  
Rd  
Injected current on pin  
Voltage over VDDIO1  
-
-
-
-
-
-
-
5
2
mA  
V
V
IINJ = 5 mA  
IINJ = 5 mA  
Diode dynamic serial resistor  
300  
Ω
DS12992 Rev 2  
71/117  
92  
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
Figure 22. Current injection into FT_e input with diode active  
5
4
3
-40°C  
25°C  
125°C  
IINJ (mA)  
2
1
0
0
0.2  
0.4  
0.6  
0.8  
1.0  
1.2  
1.4  
1.6  
1.8  
2
VIN – VDDIO1 (V)  
MSv63112V1  
Output driving current  
The GPIOs (general purpose input/outputs) can sink or source up to ±6 mA, and up to  
±15 mA with relaxed V /V  
.
OL OH  
In the user application, the number of I/O pins which can drive current must be limited to  
respect the absolute maximum rating specified in Section 5.2:  
The sum of the currents sourced by all the I/Os on V  
plus the maximum  
DDIO1,  
consumption of the MCU sourced on V  
cannot exceed the absolute maximum rating  
DD,  
I
(see Table 18: Voltage characteristics).  
VDD  
The sum of the currents sunk by all the I/Os on V , plus the maximum consumption of  
SS  
the MCU sunk on V , cannot exceed the absolute maximum rating I  
(see Table 18:  
SS  
VSS  
Voltage characteristics).  
Output voltage levels  
Unless otherwise specified, the parameters given in the table below are derived from tests  
performed under the ambient temperature and supply voltage conditions summarized in  
Table 21: General operating conditions. All I/Os are CMOS- and TTL-compliant (FT OR TT  
unless otherwise specified).  
72/117  
DS12992 Rev 2  
 
STM32G031x4/x6/x8  
Symbol  
Electrical characteristics  
(1)  
Table 53. Output voltage characteristics  
Parameter Conditions  
CMOS port(2)  
Min  
Max  
0.4  
-
Unit  
VOL  
VOH  
Output low level voltage for an I/O pin  
-
|IIO| 6 mA  
VDDIO1 ≥ 2.7 V  
Output high level voltage for an I/O pin  
Output low level voltage for an I/O pin  
Output high level voltage for an I/O pin  
Output low level voltage for an I/O pin  
Output high level voltage for an I/O pin  
VDDIO1 - 0.4  
VOL  
TTL port(2)  
|IIO| = 6 mA  
VDDIO1 ≥ 2.7 V  
-
0.4  
-
(3)  
(3)  
VOH  
2.4  
(3)  
(3)  
VOL  
All I/Os  
|IIO| = 15 mA  
VDDIO1 ≥ 2.7 V  
-
1.3  
-
V
VOH  
VDDIO1 - 1.3  
(3)  
VOL  
VOH  
Output low level voltage for an I/O pin  
Output high level voltage for an I/O pin  
-
0.4  
-
|IIO| = 3 mA  
VDDIO1 ≥ 1.62 V  
(3)  
VDDIO1 - 0.45  
|IIO| = 20 mA  
VDDIO1 ≥ 2.7 V  
-
-
0.4  
0.4  
VOLFM+ Output low level voltage for an FT I/O  
(3)  
pin in FM+ mode (FT I/O with _f option)  
|IIO| = 9 mA  
VDDIO1 ≥ 1.62 V  
1. The IIO current sourced or sunk by the device must always respect the absolute maximum rating specified in Table 18:  
Voltage characteristics, and the sum of the currents sourced or sunk by all the I/Os (I/O ports and control pins) must always  
respect the absolute maximum ratings ΣIIO  
.
2. TTL and CMOS outputs are compatible with JEDEC standards JESD36 and JESD52.  
3. Guaranteed by design.  
Input/output AC characteristics  
The definition and values of input/output AC characteristics are given in Figure 23 and  
Table 54, respectively.  
Unless otherwise specified, the parameters given are derived from tests performed under  
the ambient temperature and supply voltage conditions summarized in Table 21: General  
operating conditions.  
(1)(2)  
Table 54. I/O AC characteristics  
Speed Symbol  
Parameter  
Conditions  
Min  
Max  
Unit  
C=50 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
-
2
C=50 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=10 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=10 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=50 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=50 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=10 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=10 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
-
-
-
-
-
-
-
0.35  
3
Fmax Maximum frequency  
MHz  
0.45  
100  
225  
75  
00  
Tr/Tf Output rise and fall time  
ns  
150  
DS12992 Rev 2  
73/117  
92  
 
 
 
Electrical characteristics  
Speed Symbol  
STM32G031x4/x6/x8  
(1)(2)  
Table 54. I/O AC characteristics  
(continued)  
Parameter  
Conditions  
Min  
Max  
Unit  
C=50 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
-
10  
C=50 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=10 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=10 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=50 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=50 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=10 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=10 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=50 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=50 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=10 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=10 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=50 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=50 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=10 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=10 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=30 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=30 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=10 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=10 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=30 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=30 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
C=10 pF, 2.7 V ≤ VDDIO1 ≤ 3.6 V  
C=10 pF, 1.6 V ≤ VDDIO1 ≤ 2.7 V  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2
15  
2.5  
30  
60  
15  
30  
30  
15  
60  
30  
11  
22  
4
Fmax Maximum frequency  
Tr/Tf Output rise and fall time  
Fmax Maximum frequency  
Tr/Tf Output rise and fall time  
Fmax Maximum frequency  
MHz  
01  
ns  
MHz  
ns  
10  
8
60  
30  
80(3)  
40  
5.5  
11  
2.5  
5
MHz  
ns  
11  
Tr/Tf Output rise and fall time  
Fmax Maximum frequency  
1
MHz  
ns  
Fm+  
C=50 pF, 1.6 V ≤ VDDIO1 ≤ 3.6 V  
Tf  
Output fall time(4)  
5
1. The I/O speed is configured using the OSPEEDRy[1:0] bits. The Fm+ mode is configured in the SYSCFG_CFGR1 register.  
Refer to the RM0444 reference manual for a description of GPIO Port configuration register.  
2. Guaranteed by design.  
3. This value represents the I/O capability but the maximum system frequency is limited to 64 MHz.  
4. The fall time is defined between 70% and 30% of the output waveform, according to I2C specification.  
74/117  
DS12992 Rev 2  
STM32G031x4/x6/x8  
Electrical characteristics  
(1)  
Figure 23. I/O AC characteristics definition  
10%  
90%  
50%  
50%  
10%  
90%  
t
t
r(IO)out  
f(IO)out  
T
Maximum frequency is achieved if (t + t (≤ 2/3)T and if the duty cycle is (45-55%)  
r
f
when loaded by the specified capacitance.  
MS32132V2  
1. Refer to Table 54: I/O AC characteristics.  
5.3.15  
NRST input characteristics  
The NRST input driver uses CMOS technology. It is connected to a permanent  
pull-up resistor, R  
.
PU  
Unless otherwise specified, the parameters given in the following table are derived from  
tests performed under the ambient temperature and supply voltage conditions summarized  
in Table 21: General operating conditions.  
(1)  
Table 55. NRST pin characteristics  
Symbol  
Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
NRST input low level  
voltage  
VIL(NRST)  
VIH(NRST)  
Vhys(NRST)  
RPU  
-
-
-
0.3 x VDDIO1  
V
NRST input high level  
voltage  
-
0.7 x VDDIO1  
-
200  
40  
-
-
-
NRST Schmitt trigger  
voltage hysteresis  
-
-
25  
-
mV  
kΩ  
ns  
Weak pull-up  
VIN = VSS  
55  
70  
-
equivalent resistor(2)  
NRST input filtered  
pulse  
VF(NRST)  
VNF(NRST)  
-
NRST input not filtered  
pulse  
1.7 V ≤ VDD ≤ 3.6 V  
350  
-
ns  
1. Guaranteed by design.  
2. The pull-up is designed with a true resistance in series with a switchable PMOS. This PMOS contribution to the series  
resistance is minimal (~10% order).  
DS12992 Rev 2  
75/117  
92  
 
 
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
Figure 24. Recommended NRST pin protection  
External  
reset circuit(1)  
VDD  
RPU  
NRST(2)  
Internal reset  
Filter  
0.1 μF  
MS19878V3  
1. The reset network protects the device against parasitic resets.  
2. The user must ensure that the level on the NRST pin can go below the VIL(NRST) max level specified in  
Table 55: NRST pin characteristics. Otherwise the reset will not be taken into account by the device.  
3. The external capacitor on NRST must be placed as close as possible to the device.  
5.3.16  
Analog switch booster  
(1)  
Table 56. Analog switch booster characteristics  
Symbol  
Parameter  
Supply voltage  
Min  
Typ  
Max  
Unit  
VDD  
1.62 V  
-
-
-
3.6  
V
tSU(BOOST)  
Booster startup time  
240  
µs  
Booster consumption for  
1.62 V ≤ VDD ≤ 2.0 V  
-
-
-
-
-
-
250  
500  
900  
Booster consumption for  
2.0 V ≤ VDD ≤ 2.7 V  
IDD(BOOST)  
µA  
Booster consumption for  
2.7 V ≤ VDD ≤ 3.6 V  
1. Guaranteed by design.  
5.3.17  
Analog-to-digital converter characteristics  
Unless otherwise specified, the parameters given in Table 57 are preliminary values derived  
from tests performed under ambient temperature, f  
frequency and V  
supply voltage  
PCLK  
DDA  
conditions summarized in Table 21: General operating conditions.  
Note:  
It is recommended to perform a calibration after each power-up.  
(1)  
Table 57. ADC characteristics  
Symbol  
Parameter  
Conditions(2)  
Min  
Typ  
Max  
Unit  
VDDA  
Analog supply voltage  
-
1.62  
2
-
-
3.6  
V
VDDA ≥ 2 V  
VDDA < 2 V  
VDDA  
Positive reference  
voltage  
VREF+  
V
VDDA  
76/117  
DS12992 Rev 2  
 
 
 
 
 
 
STM32G031x4/x6/x8  
Symbol  
Electrical characteristics  
(1)  
Table 57. ADC characteristics  
(continued)  
Parameter  
Conditions(2)  
Min  
Typ  
Max  
Unit  
Range 1  
Range 2  
12 bits  
10 bits  
8 bits  
0.14  
-
-
-
-
-
-
-
-
35  
16  
fADC  
ADC clock frequency  
MHz  
0.14  
-
-
-
-
-
-
2.50  
2.92  
3.50  
4.38  
2.33  
fADC/15  
fs  
Sampling rate  
MSps  
MHz  
6 bits  
fADC = 35 MHz; 12 bits  
12 bits  
External trigger  
frequency  
fTRIG  
Conversion voltage  
range  
(3)  
VAIN  
-
-
-
-
VSSA  
-
-
VREF+  
V
External input  
impedance  
RAIN  
CADC  
tSTAB  
-
-
50  
-
kΩ  
pF  
Internal sample and  
hold capacitor  
5
2
Conversion  
cycle  
ADC power-up time  
Calibration time  
f
ADC = 35 MHz  
-
2.35  
82  
-
µs  
tCAL  
1/fADC  
1/fADC  
CKMODE = 00  
CKMODE = 01  
CKMODE = 10  
CKMODE = 11  
2
3
6.5  
12.5  
3.5  
-
Trigger conversion  
latency  
tLATR  
1/fPCLK  
0.043  
1.5  
4.59  
160.5  
4.59  
µs  
fADC = 35 MHz;  
VDDA > 2V  
-
1/fADC  
µs  
ts  
Sampling time  
0.1  
-
fADC = 35 MHz;  
VDDA < 2V  
3.5  
160.5  
1/fADC  
ADC voltage regulator  
start-up time  
-
-
-
-
20  
tADCVREG_STUP  
µs  
fADC = 35 MHz  
Resolution = 12 bits  
0.40  
4.95  
µs  
Total conversion time  
(including sampling  
time)  
tCONV  
ts + 12.5 cycles for successive  
approximation  
Resolution = 12 bits  
1/fADC  
= 14 to 173  
Laps of time allowed  
between two  
conversions without  
rearm  
-
-
-
100  
µs  
t
IDLE  
DS12992 Rev 2  
77/117  
92  
Electrical characteristics  
STM32G031x4/x6/x8  
(1)  
Table 57. ADC characteristics  
Conditions(2)  
(continued)  
Symbol  
Parameter  
Min  
Typ  
Max  
Unit  
fs = 2.5 MSps  
-
-
-
-
-
-
410  
164  
17  
-
-
-
-
-
-
ADC consumption  
from VDDA  
IDDA(ADC)  
fs = 1 MSps  
fs = 10 kSps  
fs = 2.5 MSps  
fs = 1 MSps  
fs = 10 kSps  
µA  
65  
ADC consumption  
from VREF+  
IDDV(ADC)  
26  
µA  
0.26  
1. Guaranteed by design  
2. I/O analog switch voltage booster must be enabled (BOOSTEN = 1 in the SYSCFG_CFGR1) when VDDA < 2.4 V and  
disabled when VDDA ≥ 2.4 V.  
3. VREF+ is internally connected to VDDA on some packages.Refer to Section 4: Pinouts, pin description and alternate  
functions for further details.  
Table 58. Maximum ADC R  
.
AIN  
(1)(2)  
Sampling time at 35 MHz  
[ns]  
Max. RAIN  
(Ω)  
Resolution  
Sampling cycle at 35 MHz  
1.5(3)  
3.5  
43  
100  
214  
357  
557  
1129  
2271  
4586  
43  
50  
680  
7.5  
2200  
4700  
8200  
15000  
33000  
50000  
68  
12.5  
19.5  
39.5  
79.5  
160.5  
1.5(3)  
3.5  
12 bits  
100  
214  
357  
557  
1129  
2271  
4586  
820  
7.5  
3300  
5600  
10000  
22000  
39000  
50000  
12.5  
19.5  
39.5  
79.5  
160.5  
10 bits  
78/117  
DS12992 Rev 2  
 
STM32G031x4/x6/x8  
Resolution  
Electrical characteristics  
Table 58. Maximum ADC R  
. (continued)  
AIN  
(1)(2)  
Sampling time at 35 MHz  
[ns]  
Max. RAIN  
Sampling cycle at 35 MHz  
(Ω)  
1.5(3)  
3.5  
43  
100  
214  
357  
557  
1129  
2271  
4586  
43  
82  
1500  
7.5  
3900  
12.5  
19.5  
39.5  
79.5  
160.5  
1.5(3)  
3.5  
6800  
8 bits  
12000  
27000  
50000  
50000  
390  
100  
214  
357  
557  
1129  
2271  
4586  
2200  
7.5  
5600  
12.5  
19.5  
39.5  
79.5  
160.5  
10000  
15000  
33000  
50000  
50000  
6 bits  
1. Guaranteed by design.  
2. I/O analog switch voltage booster must be enabled (BOOSTEN = 1 in the SYSCFG_CFGR1) when VDDA < 2.4 V and  
disabled when VDDA ≥ 2.4 V.  
3. Only allowed with VDDA > 2 V  
(1)(2)(3)  
Table 59. ADC accuracy  
Symbol  
Parameter  
Conditions(4)  
Min  
Typ  
Max  
Unit  
VDDA = VREF+ = 3 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
TA = 25 °C  
-
3
4
2 V < VDDA=VREF+ < 3.6 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
TA = entire range  
Total  
unadjusted  
error  
-
-
3
3
6.5  
7.5  
ET  
LSB  
1.65 V < VDDA=VREF+ < 3.6 V;  
TA = entire range  
Range 1: fADC = 35 MHz; fs ≤ 2.2 MSps;  
Range 2: fADC = 16 MHz; fs ≤ 1.1 MSps;  
DS12992 Rev 2  
79/117  
92  
 
Electrical characteristics  
STM32G031x4/x6/x8  
(1)(2)(3)  
Table 59. ADC accuracy  
Conditions(4)  
DDA = VREF+ = 3 V;  
(continued)  
Symbol  
Parameter  
Min  
Typ  
Max  
Unit  
V
fADC = 35 MHz; fs ≤ 2.5 MSps;  
TA = 25 °C  
-
1.5  
2
2 V < VDDA = VREF+ < 3.6 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
TA = entire range  
-
-
1.5  
1.5  
4.5  
5.5  
EO  
Offset error  
LSB  
1.65 V < VDDA=VREF+ < 3.6 V;  
TA = entire range  
Range 1: fADC = 35 MHz; fs ≤ 2.2 MSps;  
Range 2: fADC = 16 MHz; fs ≤ 1.1 MSps;  
VDDA = VREF+ = 3 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
TA = 25 °C  
-
-
3
3
3.5  
5
2 V < VDDA = VREF+ < 3.6 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
TA = entire range  
EG  
ED  
EL  
Gain error  
LSB  
LSB  
LSB  
1.65 V < VDDA = VREF+ < 3.6 V;  
TA = entire range  
Range 1: fADC = 35 MHz; fs ≤ 2.2 MSps;  
Range 2: fADC = 16 MHz; fs ≤ 1.1 MSps;  
-
3
6.5  
VDDA = VREF+ = 3 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
TA = 25 °C  
-
-
1.2  
1.2  
1.5  
1.5  
2 V < VDDA = VREF+ < 3.6 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
Differential  
linearity error TA = entire range  
1.65 V < VDDA = VREF+ < 3.6 V;  
TA = entire range  
Range 1: fADC = 35 MHz; fs ≤ 2.2 MSps;  
Range 2: fADC = 16 MHz; fs ≤ 1.1 MSps;  
-
1.2  
1.5  
VDDA = VREF+ = 3 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
-
-
2.5  
2.5  
3
3
TA = 25 °C  
2 V < VDDA = VREF+ < 3.6 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
Integral  
linearity error TA = entire range  
1.65 V < VDDA = VREF+ < 3.6 V;  
TA = entire range  
Range 1: fADC = 35 MHz; fs ≤ 2.2 MSps;  
Range 2: fADC = 16 MHz; fs ≤ 1.1 MSps;  
-
2.5  
3.5  
80/117  
DS12992 Rev 2  
STM32G031x4/x6/x8  
Electrical characteristics  
(1)(2)(3)  
Table 59. ADC accuracy  
Conditions(4)  
DDA = VREF+ = 3 V;  
(continued)  
Symbol  
Parameter  
Min  
Typ  
Max  
Unit  
V
fADC = 35 MHz; fs ≤ 2.5 MSps;  
TA = 25 °C  
10.1  
10.2  
-
2 V < VDDA = VREF+ < 3.6 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
number of bits TA = entire range  
Effective  
9.6  
9.5  
10.2  
10.2  
-
-
ENOB  
bit  
1.65 V < VDDA = VREF+ < 3.6 V;  
TA = entire range  
Range 1: fADC = 35 MHz; fs ≤ 2.2 MSps;  
Range 2: fADC = 16 MHz; fs ≤ 1.1 MSps;  
VDDA = VREF+ = 3 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
TA = 25 °C  
62.5  
59.5  
63  
63  
-
-
2 V < VDDA = VREF+ < 3.6 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
TA = entire range  
Signal-to-noise  
and distortion  
ratio  
dB  
dB  
dB  
SINAD  
1.65 V < VDDA = VREF+ < 3.6 V;  
TA = entire range  
Range 1: fADC = 35 MHz; fs ≤ 2.2 MSps;  
Range 2: fADC = 16 MHz; fs ≤ 1.1 MSps;  
59  
63  
-
VDDA = VREF+ = 3 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
TA = 25 °C  
63  
60  
64  
64  
-
-
2 V < VDDA = VREF+ < 3.6 V;  
Signal-to-noise fADC = 35 MHz; fs ≤ 2.5 MSps;  
SNR  
ratio  
TA = entire range  
1.65 V < VDDA = VREF+ < 3.6 V;  
TA = entire range  
Range 1: fADC = 35 MHz; fs ≤ 2.2 MSps;  
Range 2: fADC = 16 MHz; fs ≤ 1.1 MSps;  
60  
64  
-
VDDA = VREF+ = 3 V;  
fADC = 35 MHz; fs ≤ 2.5 MSps;  
-
-
-74  
-74  
-73  
-70  
TA = 25 °C  
2 V < VDDA = VREF+ < 3.6 V;  
Total harmonic fADC = 35 MHz; fs ≤ 2.5 MSps;  
THD  
distortion  
TA = entire range  
1.65 V < VDDA = VREF+ < 3.6 V;  
TA = entire range  
Range 1: fADC = 35 MHz; fs ≤ 2.2 MSps;  
Range 2: fADC = 16 MHz; fs ≤ 1.1 MSps;  
-
-74  
-70  
1. Based on characterization results, not tested in production.  
2. ADC DC accuracy values are measured after internal calibration.  
3. Injecting negative current on any analog input pin significantly reduces the accuracy of A-to-D conversion of signal on  
another analog input. It is recommended to add a Schottky diode (pin to ground) to analog pins susceptible to receive  
negative current.  
4. I/O analog switch voltage booster enabled (BOOSTEN = 1 in the SYSCFG_CFGR1) when VDDA < 2.4 V and disabled  
when VDDA ≥ 2.4 V.  
DS12992 Rev 2  
81/117  
92  
Electrical characteristics  
STM32G031x4/x6/x8  
Figure 25. ADC accuracy characteristics  
EG  
Code  
4095  
(1) Example of an actual transfer curve  
(2) Ideal transfer curve  
4094  
(3) End point correlation line  
4093  
ET  
total unadjusted error: maximum deviation  
between the actual and ideal transfer curves.  
(2)  
ET  
EO  
offset error: maximum deviation between the  
(3)  
7
6
first actual transition and the first ideal one.  
(1)  
EG gain error: deviation between the last ideal  
transition and the last actual one.  
5
EL  
EO  
ED  
differential linearity error: maximum deviation  
between actual steps and the ideal ones.  
4
3
2
1
ED  
EL integral linearity error: maximum deviation between  
any actual transition and the end point correlation line.  
1 LSB ideal  
0
1
2
3
4
5
6
7
4093 4094 4095  
(VAIN / VREF+)*4095  
MSv19880V3  
Figure 26. Typical connection diagram using the ADC  
VDDA  
VT  
VT  
Sample and hold ADC converter  
(1)  
RAIN  
RADC  
AINx  
12-bit  
converter  
(2)  
(3)  
Cparasitic  
CADC  
Ilkg  
VAIN  
MS33900V5  
1. Refer to Table 57: ADC characteristics for the values of RAIN and CADC  
.
2. Cparasitic represents the capacitance of the PCB (dependent on soldering and PCB layout quality) plus the  
pad capacitance (refer to Table 51: I/O static characteristics for the value of the pad capacitance). A high  
C
parasitic value will downgrade conversion accuracy. To remedy this, fADC should be reduced.  
3. Refer to Table 51: I/O static characteristics for the values of Ilkg.  
General PCB design guidelines  
Power supply decoupling should be performed as shown in Figure 13: Power supply  
scheme. The 100 nF capacitor should be ceramic (good quality) and it should be placed as  
close as possible to the chip.  
82/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
5.3.18  
Voltage reference buffer characteristics  
(1)  
Table 60. VREFBUF characteristics  
Symbol  
Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
V
RS = 0  
2.4  
2.8  
-
-
-
-
3.6  
3.6  
2.4  
2.8  
Normal mode  
VRS = 1  
VRS = 0  
Analog supply  
voltage  
VDDA  
1.65  
Degraded mode(2)  
Normal mode  
V
RS = 1  
RS = 0  
1.65  
V
V
2.046(3)  
2.498(3)  
VDDA-150 mV  
VDDA-150 mV  
2.048 2.049(3)  
VRS = 1  
VRS = 0  
VRS = 1  
2.5  
2.502(3)  
VREFBUF_ Voltage  
reference output  
OUT  
-
-
VDDA  
Degraded mode(2)  
VDDA  
Trim step  
resolution  
TRIM  
CL  
-
-
-
-
-
±0.05  
1
±0.1  
1.5  
%
Load capacitor  
0.5  
µF  
Equivalent  
Serial Resistor  
of Cload  
esr  
-
-
-
-
-
-
-
-
2
4
Ω
Static load  
current  
Iload  
mA  
I
load = 500 µA  
-
-
-
200  
100  
50  
1000  
500  
Iline_reg  
Iload_reg  
Line regulation 2.8 V ≤ VDDA ≤ 3.6 V  
ppm/V  
Iload = 4 mA  
Load regulation 500 μA ≤ Iload ≤4 mA Normal mode  
Temperature  
500  
ppm/mA  
TCoeff_vrefbuf coefficient of  
-40 °C < TJ < +125 °C  
-
-
50  
ppm/ °C  
dB  
VREFBUF(4)  
DC  
40  
25  
-
60  
40  
-
Power supply  
PSRR  
rejection  
100 kHz  
-
CL = 0.5 µF(5)  
CL = 1.1 µF(5)  
CL = 1.5 µF(5)  
300  
500  
650  
350  
650  
800  
tSTART  
Start-up time  
-
µs  
mA  
µA  
-
Control of  
maximum DC  
current drive on  
VREFBUF_OUT  
during start-up  
phase (6)  
IINRUSH  
-
-
8
-
Iload = 0 µA  
-
-
-
16  
18  
35  
25  
30  
50  
VREFBUF  
consumption  
from VDDA  
IDDA(VREFB  
Iload = 500 µA  
UF)  
Iload = 4 mA  
1. Guaranteed by design.  
DS12992 Rev 2  
83/117  
92  
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
2. In degraded mode, the voltage reference buffer can not maintain accurately the output voltage which will follow (VDDA  
drop voltage).  
-
3. Guaranteed by test in production.  
4. The temperature coefficient at VREF+ output is the sum of TCoeff_vrefint and TCoeff_vrefbuf  
.
5. The capacitive load must include a 100 nF capacitor in order to cut-off the high frequency noise.  
6. To correctly control the VREFBUF inrush current during start-up phase and scaling change, the VDDA voltage should be in  
the range [2.4 V to 3.6 V] and [2.8 V to 3.6 V] respectively for VRS = 0 and VRS = 1.  
5.3.19  
Temperature sensor characteristics  
Table 61. TS characteristics  
Symbol  
Parameter  
Min  
Typ  
Max  
Unit  
(1)  
TL  
VTS linearity with temperature  
-
±1  
2.5  
±2  
2.7  
°C  
mV/°C  
V
Avg_Slope(2) Average slope  
2.3  
V30  
Voltage at 30°C (±5 °C)(3)  
0.742  
0.76  
0.785  
Sensor Buffer Start-up time in continuous mode(4)  
Start-up time when entering in continuous mode(4)  
ADC sampling time when reading the temperature  
-
-
8
70  
-
15  
120  
-
µs  
µs  
µs  
(1)  
tSTART(TS_BUF)  
(1)  
tSTART  
(1)  
tS_temp  
5
Temperature sensor consumption from VDD, when  
selected by ADC  
(1)  
IDD(TS)  
-
4.7  
7
µA  
1. Guaranteed by design.  
2. Based on characterization results, not tested in production.  
3. Measured at VDDA = 3.0 V ±10 mV. The V30 ADC conversion result is stored in the TS_CAL1 byte.  
4. Continuous mode means Run/Sleep modes, or temperature sensor enable in Low-power run/Low-power sleep modes.  
5.3.20  
V
monitoring characteristics  
BAT  
Table 62. V  
monitoring characteristics  
BAT  
Symbol  
Parameter  
Resistor bridge for VBAT  
Min  
Typ  
Max  
Unit  
R
Q
-
-
39  
3
-
-
-
kΩ  
-
Ratio on VBAT measurement  
Error on Q  
Er(1)  
-10  
12  
10  
-
%
µs  
(1)  
tS_vbat  
ADC sampling time when reading the VBAT  
-
1. Guaranteed by design.  
Table 63. V  
charging characteristics  
BAT  
Symbol  
Parameter  
Conditions  
VBRS = 0  
VBRS = 1  
Min  
Typ  
5
Max  
Unit  
Battery  
charging  
resistor  
-
-
-
-
RBC  
kΩ  
1.5  
84/117  
DS12992 Rev 2  
 
 
 
 
 
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
5.3.21  
Timer characteristics  
The parameters given in the following tables are guaranteed by design. Refer to  
Section 5.3.14: I/O port characteristics for details on the input/output alternate function  
characteristics (output compare, input capture, external clock, PWM output).  
(1)  
Table 64. TIMx characteristics  
Symbol  
tres(TIM)  
Parameter  
Conditions  
Min  
Max  
Unit  
-
1
-
tTIMxCLK  
ns  
Timer resolution time  
fTIMxCLK = 64 MHz  
15.625  
-
fTIMxCLK/2  
40  
-
0
Timer external clock frequency  
on CH1 to CH4  
fEXT  
MHz  
bit  
fTIMxCLK = 64 MHz  
0
TIMx (except TIM2)  
-
16  
ResTIM  
Timer resolution  
TIM2  
-
32  
-
fTIMxCLK = 64 MHz  
-
1
65536  
1024  
tTIMxCLK  
µs  
tTIMxCLK  
s
tCOUNTER  
16-bit counter clock period  
0.015625  
-
-
65536 × 65536  
67.10  
Maximum possible count with  
32-bit counter  
tMAX_COUNT  
fTIMxCLK = 64 MHz  
1. TIMx, is used as a general term in which x stands for 1, 2, 3, 4, 5, 6, 7, 8, 15, 16 or 17.  
(1)  
Table 65. IWDG min/max timeout period at 32 kHz LSI clock  
Prescaler divider PR[2:0] bits  
Min timeout RL[11:0]= 0x000  
Max timeout RL[11:0]= 0xFFF  
Unit  
/4  
/8  
0
0.125  
0.250  
0.500  
1.0  
512  
1024  
2048  
4096  
8192  
16384  
32768  
1
/16  
/32  
/64  
/128  
/256  
2
3
4
ms  
2.0  
5
4.0  
6 or 7  
8.0  
1. The exact timings further depend on the phase of the APB interface clock versus the LSI clock, which causes an  
uncertainty of one RC period.  
5.3.22  
Characteristics of communication interfaces  
I2C-bus interface characteristics  
2
2
The I C-bus interface meets timing requirements of the I C-bus specification and user  
manual rev. 03 for:  
Standard-mode (Sm): with a bit rate up to 100 kbit/s  
Fast-mode (Fm): with a bit rate up to 400 kbit/s  
Fast-mode Plus (Fm+): with a bit rate up to 1 Mbit/s.  
DS12992 Rev 2  
85/117  
92  
 
 
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
The timings are guaranteed by design as long as the I2C peripheral is properly configured  
(refer to the reference manual RM0444) and when the I2CCLK frequency is greater than the  
minimum shown in the following table.  
Table 66. Minimum I2CCLK frequency  
Symbol  
Parameter  
Condition  
Typ  
Unit  
Standard-mode  
2
Analog filter enabled  
9
9
DNF = 0  
Analog filter disabled  
DNF = 1  
Fast-mode  
Minimum I2CCLK  
frequency for correct  
operation of I2C  
peripheral  
fI2CCLK(min)  
MHz  
Analog filter enabled  
DNF = 0  
18  
16  
Fast-mode Plus  
Analog filter disabled  
DNF = 1  
The SDA and SCL I/O requirements are met with the following restrictions: the SDA and  
SCL I/O pins are not “true” open-drain. When configured as open-drain, the PMOS  
connected between the I/O pin and V  
is disabled, but is still present. Only FT_f I/O pins  
DDIO1  
support Fm+ low-level output current maximum requirement. Refer to Section 5.3.14: I/O  
port characteristics for the I2C I/Os characteristics.  
All I2C SDA and SCL I/Os embed an analog filter. Refer to the following table for its  
characteristics:  
(1)  
Table 67. I2C analog filter characteristics  
Symbol  
Parameter  
Min  
Max  
Unit  
Limiting duration of spikes suppressed  
by the filter(2)  
tAF  
50  
260  
ns  
1. Based on characterization results, not tested in production.  
2. Spikes shorter than the limiting duration are suppressed.  
SPI/I2S characteristics  
Unless otherwise specified, the parameters given in Table 68 for SPI are derived from tests  
performed under the ambient temperature, f frequency and supply voltage conditions  
PCLKx  
summarized in Table 21: General operating conditions. The additional general conditions  
are:  
OSPEEDRy[1:0] set to 11 (output speed)  
capacitive load C = 30 pF  
measurement points at CMOS levels: 0.5 x V  
DD  
Refer to Section 5.3.14: I/O port characteristics for more details on the input/output alternate  
function characteristics (NSS, SCK, MOSI, MISO for SPI).  
86/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
(1)  
Table 68. SPI characteristics  
Conditions  
Symbol  
Parameter  
Min  
Typ  
Max  
Unit  
Master mode  
1.65 < VDD < 3.6 V  
Range 1  
32  
Master transmitter  
1.65 < VDD < 3.6 V  
Range 1  
32  
32  
32  
Slave receiver  
1.65 < VDD < 3.6 V  
Range 1  
fSCK  
1/tc(SCK)  
SPI clock frequency  
-
-
MHz  
Slave transmitter/full duplex  
2.7 < VDD < 3.6 V  
Range 1  
Slave transmitter/full duplex  
1.65 < VDD < 3.6 V  
Range 1  
25  
8
1.65 < VDD < 3.6 V  
Range 2  
tsu(NSS) NSS setup time  
th(NSS) NSS hold time  
Slave mode, SPI prescaler = 2  
Slave mode, SPI prescaler = 2  
4 ₓ TPCLK  
2 ₓ TPCLK  
-
-
-
-
ns  
ns  
TPCLK  
- 1.5  
TPCLK  
+ 1  
tw(SCKH) SCK high time  
tw(SCKL) SCK low time  
Master mode  
TPCLK  
ns  
ns  
ns  
ns  
ns  
ns  
TPCLK  
- 1.5  
TPCLK  
+ 1  
Master mode  
TPCLK  
Master data input setup  
tsu(MI)  
tsu(SI)  
th(MI)  
th(SI)  
-
-
-
-
1
3
5
2
-
-
-
-
-
-
-
-
time  
Slave data input setup  
time  
Master data input hold  
time  
Slave data input hold  
time  
ta(SO) Data output access time Slave mode  
tdis(SO) Data output disable time Slave mode  
9
9
-
-
34  
16  
ns  
ns  
2.7 < VDD < 3.6 V  
Range 1  
-
-
-
-
9
9
12  
19.5  
24  
Slave data output valid  
time  
1.65 < VDD < 3.6 V  
Range 1  
tv(SO)  
ns  
ns  
1.65 < VDD < 3.6 V  
Voltage Range 2  
11  
3
Master data output valid  
time  
tv(MO)  
-
5
DS12992 Rev 2  
87/117  
92  
 
Electrical characteristics  
STM32G031x4/x6/x8  
(1)  
Table 68. SPI characteristics (continued)  
Symbol  
Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
Slave data output hold  
time  
th(SO)  
-
5
-
-
ns  
Master data output hold  
time  
th(MO)  
-
1
-
-
ns  
1. Based on characterization results, not tested in production.  
Figure 27. SPI timing diagram - slave mode and CPHA = 0  
NSS input  
tc(SCK)  
th(NSS)  
tsu(NSS)  
tw(SCKH)  
tr(SCK)  
CPHA=0  
CPOL=0  
CPHA=0  
CPOL=1  
ta(SO)  
tw(SCKL)  
tv(SO)  
th(SO)  
tf(SCK)  
Last bit OUT  
tdis(SO)  
MISO output  
MOSI input  
First bit OUT  
th(SI)  
Next bits OUT  
tsu(SI)  
First bit IN  
Next bits IN  
Last bit IN  
MSv41658V1  
Figure 28. SPI timing diagram - slave mode and CPHA = 1  
NSS input  
tc(SCK)  
tsu(NSS)  
tw(SCKH)  
tf(SCK)  
th(NSS)  
CPHA=1  
CPOL=0  
CPHA=1  
CPOL=1  
ta(SO)  
tw(SCKL)  
tv(SO)  
First bit OUT  
tsu(SI) th(SI)  
First bit IN  
th(SO)  
Next bits OUT  
tr(SCK)  
tdis(SO)  
MISO output  
MOSI input  
Last bit OUT  
Next bits IN  
Last bit IN  
MSv41659V1  
1. Measurement points are done at CMOS levels: 0.3 VDD and 0.7 VDD  
.
88/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
Electrical characteristics  
Figure 29. SPI timing diagram - master mode  
High  
NSS input  
t
c(SCK)  
CPHA=0  
CPOL=0  
CPHA=0  
CPOL=1  
CPHA=1  
CPOL=0  
CPHA=1  
CPOL=1  
t
t
t
t
w(SCKH)  
w(SCKL)  
r(SCK)  
t
su(MI)  
f(SCK)  
MISO  
INPUT  
BIT6 IN  
LSB IN  
MSB IN  
t
h(MI)  
MOSI  
OUTPUT  
BIT1 OUT  
LSB OUT  
MSB OUT  
t
t
h(MO)  
v(MO)  
ai14136c  
1. Measurement points are set at CMOS levels: 0.3 VDD and 0.7 VDD  
.
2
(1)  
Table 69. I S characteristics  
Conditions  
Symbol  
Parameter  
Min  
Max  
Unit  
fMCK= 256 x Fs; (Fs = audio sampling  
frequency)  
fMCK  
I2S main clock output  
2.048  
49.152  
MHz  
Fsmin = 8 kHz; Fsmax = 192 kHz;  
Master data  
Slave data  
-
-
64xFs  
64xFs  
fCK  
I2S clock frequency  
MHz  
%
I2S clock frequency duty  
cycle  
DCK  
Slave receiver  
30  
70  
DS12992 Rev 2  
89/117  
92  
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
2
(1)  
Table 69. I S characteristics (continued)  
Conditions  
Symbol  
Parameter  
WS valid time  
Min  
Max  
Unit  
tv(WS)  
th(WS)  
tsu(WS)  
Master mode  
Master mode  
Slave mode  
-
6
-
WS hold time  
WS setup time  
WS hold time  
3
3
-
th(WS)  
Slave mode  
2
4
-
-
-
-
-
tsu(SD_MR)  
tsu(SD_SR)  
th(SD_MR)  
th(SD_SR)  
Master receiver  
Slave receiver  
Master receiver  
Slave receiver  
Data input setup time  
Data input hold time  
5
4.5  
2
ns  
after enable edge; 2.7 < VDD < 3.6V  
after enable edge; 1.65 < VDD < 3.6V  
10  
15  
Data output valid time -  
slave transmitter  
tv(SD_ST)  
-
Data output valid time -  
master transmitter  
tv(SD_MT)  
th(SD_ST)  
th(SD_MT)  
after enable edge  
after enable edge  
after enable edge  
-
5.5  
Data output hold time -  
slave transmitter  
7
1
-
-
Data output hold time -  
master transmitter  
1. Based on characterization results, not tested in production.  
2
Figure 30. I S slave timing diagram (Philips protocol)  
tc(CK)  
CPOL = 0  
CPOL = 1  
WS input  
th(WS)  
tw(CKH)  
tw(CKL)  
tv(SD_ST)  
th(SD_ST)  
tsu(WS)  
LSB transmit(2)  
tsu(SD_SR)  
MSB transmit  
MSB receive  
Bitn transmit  
th(SD_SR)  
SDtransmit  
SDreceive  
LSB receive(2)  
Bitn receive  
LSB receive  
MSv39721V1  
1. Measurement points are done at CMOS levels: 0.3 VDDIO1 and 0.7 VDDIO1  
.
2. LSB transmit/receive of the previously transmitted byte. No LSB transmit/receive is sent before the first  
byte.  
90/117  
DS12992 Rev 2  
 
STM32G031x4/x6/x8  
Electrical characteristics  
2
Figure 31. I S master timing diagram (Philips protocol)  
90%  
10%  
tf(CK)  
tr(CK)  
tc(CK)  
CPOL = 0  
CPOL = 1  
WS output  
SDtransmit  
tw(CKH)  
tv(WS)  
th(WS)  
tw(CKL)  
tv(SD_MT)  
th(SD_MT)  
LSB transmit(2)  
tsu(SD_MR)  
MSB transmit  
MSB receive  
Bitn transmit  
th(SD_MR)  
LSB transmit  
SDreceive  
LSB receive(2)  
Bitn receive  
LSB receive  
MSv39720V1  
1. Based on characterization results, not tested in production.  
2. LSB transmit/receive of the previously transmitted byte. No LSB transmit/receive is sent before the first  
byte.  
USART characteristics  
Unless otherwise specified, the parameters given in Table 70 for USART are derived from  
tests performed under the ambient temperature, f  
frequency and supply voltage  
PCLKx  
conditions summarized in Table 21: General operating conditions. The additional general  
conditions are:  
OSPEEDRy[1:0] set to 10 (output speed)  
capacitive load C = 30 pF  
measurement points at CMOS levels: 0.5 x V  
DD  
Refer to Section 5.3.14: I/O port characteristics for more details on the input/output alternate  
function characteristics (NSS, CK, TX, and RX for USART).  
Table 70. USART characteristics  
Symbol  
Parameter  
Conditions  
Master mode  
Slave mode  
Min  
Typ  
Max  
Unit  
-
-
-
-
8
fCK  
USART clock frequency  
MHz  
21  
DS12992 Rev 2  
91/117  
92  
 
 
Electrical characteristics  
STM32G031x4/x6/x8  
Table 70. USART characteristics  
Symbol  
Parameter  
Conditions  
Slave mode  
Min  
Typ  
Max  
Unit  
tsu(NSS)  
th(NSS)  
tw(CKH)  
tw(CKL)  
NSS setup time  
NSS hold time  
CK high time  
CK low time  
tker + 2  
2
-
-
-
-
Slave mode  
1 / fCK / 2  
- 1  
1 / fCK / 2  
+ 1  
Master mode  
1 / fCK / 2  
Master mode  
Slave mode  
Master mode  
Slave mode  
Master mode  
Slave mode  
Master mode  
Slave mode  
t
ker + 2  
-
-
-
-
tsu(RX)  
th(RX)  
tv(TX)  
th(TX)  
Data input setup time  
Data input hold time  
Data output valid time  
Data output hold time  
3
2
1
-
ns  
-
-
-
-
1
10  
-
2
19  
-
-
0
7
-
-
92/117  
DS12992 Rev 2  
STM32G031x4/x6/x8  
Package information  
6
Package information  
In order to meet environmental requirements, ST offers these devices in different grades of  
ECOPACK packages, depending on their level of environmental compliance. ECOPACK  
specifications, grade definitions and product status are available at: www.st.com.  
ECOPACK is an ST trademark.  
6.1  
LQFP48 package information  
LQFP48 is a 48-pin, 7 x 7 mm low-profile quad flat package.  
Figure 32. LQFP48 package outline  
SEATING  
PLANE  
C
0.25 mm  
GAUGE PLANE  
ccc  
C
D
L
L1  
D1  
D3  
36  
25  
37  
24  
b
48  
13  
PIN 1  
IDENTIFICATION  
1
12  
e
5B_ME_V2  
1. Drawing is not to scale.  
Table 71. LQFP48 mechanical data  
millimeters  
inches(1)  
Typ  
Symbol  
Min  
Typ  
Max  
Min  
Max  
A
-
-
-
1.600  
0.150  
-
-
-
0.0630  
0.0059  
A1  
0.050  
0.0020  
DS12992 Rev 2  
93/117  
112  
 
 
 
 
Package information  
STM32G031x4/x6/x8  
Table 71. LQFP48 mechanical data (continued)  
millimeters  
Typ  
inches(1)  
Symbol  
Min  
Max  
Min  
Typ  
Max  
A2  
b
1.350  
0.170  
0.090  
8.800  
6.800  
-
1.400  
0.220  
-
1.450  
0.270  
0.200  
9.200  
7.200  
-
0.0531  
0.0551  
0.0087  
-
0.0571  
0.0106  
0.0079  
0.3622  
0.2835  
-
0.0067  
c
0.0035  
D
9.000  
7.000  
5.500  
9.000  
7.000  
5.500  
0.500  
0.600  
1.000  
3.5°  
0.3465  
0.3543  
0.2756  
0.2165  
0.3543  
0.2756  
0.2165  
0.0197  
0.0236  
0.0394  
3.5°  
D1  
D3  
E
0.2677  
-
8.800  
6.800  
-
9.200  
7.200  
-
0.3465  
0.3622  
0.2835  
-
E1  
E3  
e
0.2677  
-
-
-
-
-
L
0.450  
-
0.750  
-
0.0177  
0.0295  
-
L1  
k
-
0°  
-
0°  
7°  
7°  
ccc  
-
-
0.080  
-
0.0031  
1. Values in inches are converted from mm and rounded to 4 decimal digits.  
Figure 33. Recommended footprint for LQFP48 package  
0.50  
1.20  
0.30  
36  
25  
37  
24  
0.20  
7.30  
9.70 5.80  
7.30  
48  
13  
12  
1
1.20  
5.80  
9.70  
ai14911d  
1. Dimensions are expressed in millimeters.  
94/117  
DS12992 Rev 2  
 
STM32G031x4/x6/x8  
Package information  
Device marking  
The following figure gives an example of topside marking orientation versus pin 1 identifier  
location.  
The printed markings may differ depending on the supply chain.  
Other optional marking or inset/upset marks, which identify the parts throughout supply  
chain operations, are not indicated below.  
Figure 34. LQFP48 package marking example  
Product identification (1)  
STM32G031  
C6T6  
Date code  
Y WW  
Revision code  
Pin 1 identifier  
R
MSv47943V2  
1. Parts marked as ES or E or accompanied by an Engineering Sample notification letter are not yet qualified  
and therefore not approved for use in production. ST is not responsible for any consequences resulting  
from such use. In no event will ST be liable for the customer using any of these engineering samples in  
production. ST's Quality department must be contacted prior to any decision to use these engineering  
samples to run a qualification activity.  
DS12992 Rev 2  
95/117  
112  
 
Package information  
STM32G031x4/x6/x8  
6.2  
UFQFPN48 package information  
UFQFPN48 is a 48-lead, 7x7 mm, 0.5 mm pitch, ultra-thin fine-pitch quad flat package  
Figure 35. UFQFPN48 package outline  
Pin 1 identifier  
laser marking area  
D
A
E
Y
E
Seating  
plane  
T
ddd  
A1  
b
e
Detail Y  
D
Exposed pad  
area  
D2  
1
L
48  
C 0.500x45°  
pin1 corner  
R 0.125 typ.  
Detail Z  
E2  
1
48  
Z
A0B9_ME_V3  
1. Drawing is not to scale.  
2. All leads/pads should also be soldered to the PCB to improve the lead/pad solder joint life.  
3. There is an exposed die pad on the underside of the UFQFPN package. It is recommended to connect and  
solder this back-side pad to PCB ground.  
Table 72. UFQFPN48 package mechanical data  
millimeters  
Typ  
inches(1)  
Symbol  
Min  
Max  
Min  
Typ  
Max  
A
A1  
D
0.500  
0.000  
6.900  
6.900  
5.500  
5.500  
0.550  
0.020  
7.000  
7.000  
5.600  
5.600  
0.600  
0.050  
7.100  
7.100  
5.700  
5.700  
0.0197  
0.0000  
0.2717  
0.2717  
0.2165  
0.2165  
0.0217  
0.0008  
0.2756  
0.2756  
0.2205  
0.2205  
0.0236  
0.0020  
0.2795  
0.2795  
0.2244  
0.2244  
E
D2  
E2  
96/117  
DS12992 Rev 2  
 
 
 
STM32G031x4/x6/x8  
Package information  
Table 72. UFQFPN48 package mechanical data (continued)  
millimeters  
Typ  
inches(1)  
Symbol  
Min  
Max  
Min  
Typ  
Max  
L
T
0.300  
0.400  
0.152  
0.250  
0.500  
-
0.500  
-
0.0118  
0.0157  
0.0060  
0.0098  
0.0197  
-
0.0197  
-
-
-
b
0.200  
0.300  
-
0.0079  
0.0118  
-
e
-
-
-
-
ddd  
0.080  
0.0031  
1. Values in inches are converted from mm and rounded to 4 decimal digits.  
Figure 36. Recommended footprint for UFQFPN48 package  
7.30  
6.20  
48  
37  
1
36  
5.60  
0.20  
7.30  
5.80  
6.20  
5.60  
0.30  
12  
25  
13  
24  
0.75  
0.50  
0.55  
5.80  
A0B9_FP_V2  
1. Dimensions are expressed in millimeters.  
DS12992 Rev 2  
97/117  
112  
 
Package information  
STM32G031x4/x6/x8  
Device marking  
The following figure gives an example of topside marking orientation versus pin 1 identifier  
location.  
The printed markings may differ depending on the supply chain.  
Other optional marking or inset/upset marks, which identify the parts throughout supply  
chain operations, are not indicated below.  
Figure 37. UFQFPN48 package marking example  
Product identification (1)  
STM32G  
031C8U6  
Date code  
Y WW  
Revision code  
Pin 1 identifier  
R
MSv47945V2  
1. Parts marked as ES or E or accompanied by an Engineering Sample notification letter are not yet qualified  
and therefore not approved for use in production. ST is not responsible for any consequences resulting  
from such use. In no event will ST be liable for the customer using any of these engineering samples in  
production. ST's Quality department must be contacted prior to any decision to use these engineering  
samples to run a qualification activity.  
98/117  
DS12992 Rev 2  
 
STM32G031x4/x6/x8  
Package information  
6.3  
LQFP32 package information  
LQFP32 is a 32-pin, 7 x 7 mm low-profile quad flat package.  
Figure 38. LQFP32 package outline  
SEATING  
PLANE  
C
0.25 mm  
GAUGE PLANE  
ccc  
C
K
D
D1  
D3  
L
L1  
24  
17  
16  
25  
32  
9
PIN 1  
IDENTIFICATION  
1
8
e
5V_ME_V2  
1. Drawing is not to scale.  
Table 73. LQFP32 mechanical data  
millimeters  
inches(1)  
Symbol  
Min  
Typ  
Max  
Min  
Typ  
Max  
A
-
-
-
1.600  
0.150  
1.450  
-
-
-
0.0630  
0.0059  
0.0571  
A1  
A2  
0.050  
1.350  
0.0020  
0.0531  
1.400  
0.0551  
DS12992 Rev 2  
99/117  
112  
 
 
 
Package information  
STM32G031x4/x6/x8  
Table 73. LQFP32 mechanical data (continued)  
millimeters  
Typ  
inches(1)  
Symbol  
Min  
Max  
Min  
Typ  
Max  
b
c
0.300  
0.370  
-
0.450  
0.200  
9.200  
7.200  
-
0.0118  
0.0146  
-
0.0177  
0.0079  
0.3622  
0.2835  
-
0.090  
0.0035  
D
8.800  
9.000  
7.000  
5.600  
9.000  
7.000  
5.600  
0.800  
0.600  
1.000  
3.5°  
0.3465  
0.3543  
0.2756  
0.2205  
0.3543  
0.2756  
0.2205  
0.0315  
0.0236  
0.0394  
3.5°  
D1  
D3  
E
6.800  
0.2677  
-
-
8.800  
9.200  
7.200  
-
0.3465  
0.3622  
0.2835  
-
E1  
E3  
e
6.800  
0.2677  
-
-
-
-
-
-
L
0.450  
0.750  
-
0.0177  
0.0295  
-
L1  
k
-
0°  
-
-
0°  
-
7°  
7°  
ccc  
-
0.100  
-
0.0039  
1. Values in inches are converted from mm and rounded to 4 decimal digits.  
Figure 39. Recommended footprint for LQFP32 package  
0.80  
1.20  
24  
17  
25  
16  
0.50  
0.30  
7.30  
6.10  
9.70  
7.30  
32  
9
8
1
1.20  
6.10  
9.70  
5V_FP_V2  
1. Dimensions are expressed in millimeters.  
100/117  
DS12992 Rev 2  
 
STM32G031x4/x6/x8  
Package information  
Device marking  
The following figure gives an example of topside marking orientation versus pin 1 identifier  
location.  
The printed markings may differ depending on the supply chain.  
Other optional marking or inset/upset marks, which identify the parts throughout supply  
chain operations, are not indicated below.  
Figure 40. LQFP32 package marking example  
Product identification (1)  
STM32G  
031K8T6  
Date code  
Y WW  
Pin 1 identifier  
Revision code  
R
MSv47947V2  
1. Parts marked as ES or E or accompanied by an Engineering Sample notification letter are not yet qualified  
and therefore not approved for use in production. ST is not responsible for any consequences resulting  
from such use. In no event will ST be liable for the customer using any of these engineering samples in  
production. ST's Quality department must be contacted prior to any decision to use these engineering  
samples to run a qualification activity.  
DS12992 Rev 2  
101/117  
112  
 
Package information  
STM32G031x4/x6/x8  
6.4  
UFQFPN32 package information  
UFQFPN32 is a 32-pin, 5x5 mm, 0.5 mm pitch ultra-thin fine-pitch quad flat package.  
Figure 41. UFQFPN32 package outline  
D
A
ddd C  
SEATINGPLANE  
A1  
A3  
e
C
D1  
b
e
b
E2  
E1  
E
1
L
32  
D2  
L
PIN 1 Identifier  
A0B8_ME_V3  
1. Drawing is not to scale.  
2. There is an exposed die pad on the underside of the UFQFPN package. It is recommended to connect and  
solder this backside pad to PCB ground.  
Table 74. UFQFPN32 package mechanical data  
millimeters  
Typ  
inches(1)  
Symbol  
Min  
Max  
Min  
Typ  
Max  
A
A1  
A3  
b
0.500  
-
0.550  
-
0.600  
0.050  
-
0.0197  
-
0.0217  
-
0.0236  
0.0020  
-
-
0.152  
0.230  
5.000  
3.500  
3.500  
5.000  
3.500  
3.500  
0.500  
0.400  
-
-
0.0060  
0.0091  
0.1969  
0.1378  
0.1378  
0.1969  
0.1378  
0.1378  
0.0197  
0.0157  
-
0.180  
4.900  
3.400  
3.400  
4.900  
3.400  
3.400  
-
0.280  
5.100  
3.600  
3.600  
5.100  
3.600  
3.600  
-
0.0071  
0.1929  
0.1339  
0.1339  
0.1929  
0.1339  
0.1339  
-
0.0110  
0.2008  
0.1417  
0.1417  
0.2008  
0.1417  
0.1417  
-
D
D1  
D2  
E
E1  
E2  
e
L
0.300  
-
0.500  
0.080  
0.0118  
-
0.0197  
0.0031  
ddd  
1. Values in inches are converted from mm and rounded to 4 decimal digits.  
102/117  
DS12992 Rev 2  
 
 
 
STM32G031x4/x6/x8  
Package information  
Figure 42. Recommended footprint for UFQFPN32 package  
5.30  
3.80  
0.60  
25  
32  
1
24  
3.45  
3.80  
5.30  
3.45  
0.50  
8
17  
0.30  
16  
9
0.75  
3.80  
A0B8_FP_V2  
1. Dimensions are expressed in millimeters  
Device marking  
The following figure gives an example of topside marking orientation versus pin 1 identifier  
location.  
The printed markings may differ depending on the supply chain.  
Other optional marking or inset/upset marks, which identify the parts throughout supply  
chain operations, are not indicated below.  
Figure 43. UFQFPN32 package marking example  
Product identification (1)  
32G031K8U6  
Date code  
Revision code  
Y
WW R  
Pin 1 identifier  
MSv47949V2  
1. Parts marked as ES or E or accompanied by an Engineering Sample notification letter are not yet qualified  
and therefore not approved for use in production. ST is not responsible for any consequences resulting  
from such use. In no event will ST be liable for the customer using any of these engineering samples in  
production. ST's Quality department must be contacted prior to any decision to use these engineering  
samples to run a qualification activity.  
DS12992 Rev 2  
103/117  
112  
 
 
Package information  
STM32G031x4/x6/x8  
6.5  
UFQFPN28 package information  
UFQFPN is a 28-lead, 4x4 mm, 0.5 mm pitch, ultra-thin fine-pitch quad flat package.  
Figure 44. UFQFPN28 package outline  
Detail Y  
D
E
D
D1  
E1  
Detail Z  
A0B0_ME_V5  
1. Drawing is not to scale.  
(1)  
Table 75. UFQFPN28 package mechanical data  
millimeters  
Typ  
inches  
Symbol  
Min  
Max  
Min  
Typ  
Max  
A
A1  
D
0.500  
-
0.550  
0.000  
4.000  
3.000  
4.000  
3.000  
0.400  
0.350  
0.152  
0.250  
0.500  
0.600  
0.050  
4.100  
3.100  
4.100  
3.100  
0.500  
0.450  
-
0.0197  
-
0.0217  
0.0000  
0.1575  
0.1181  
0.1575  
0.1181  
0.0157  
0.0138  
0.0060  
0.0098  
0.0197  
0.0236  
0.0020  
0.1614  
0.1220  
0.1614  
0.1220  
0.0197  
0.0177  
-
3.900  
2.900  
3.900  
2.900  
0.300  
0.250  
-
0.1535  
0.1142  
0.1535  
0.1142  
0.0118  
0.0098  
-
D1  
E
E1  
L
L1  
T
b
0.200  
-
0.300  
-
0.0079  
-
0.0118  
-
e
1. Values in inches are converted from mm and rounded to 4 decimal digits.  
104/117  
DS12992 Rev 2  
 
 
 
STM32G031x4/x6/x8  
Package information  
Figure 45. Recommended footprint for UFQFPN28 package  
ꢀꢁꢀꢂ  
ꢂꢁꢅꢂ  
ꢀꢁꢃꢂ  
ꢄꢁꢀꢂ  
ꢀꢁꢀꢂ  
ꢀꢁꢃꢂ  
ꢂꢁꢀꢂ  
ꢂꢁꢅꢅ  
ꢂꢁꢅꢂ  
ꢂꢁꢅꢂ  
!ꢂ"ꢂ?&0?6ꢃ  
1. Dimensions are expressed in millimeters.  
Device marking  
The following figure gives an example of topside marking orientation versus pin 1 identifier  
location.  
The printed markings may differ depending on the supply chain.  
Other optional marking or inset/upset marks, which identify the parts throughout supply  
chain operations, are not indicated below.  
Figure 46. UFQFPN28 package marking example  
Product identification (1)  
G031G8  
Revision code  
R
Date code  
Y
WW  
Pin 1 identifier  
MSv47951V2  
1. Parts marked as ES or E or accompanied by an Engineering Sample notification letter are not yet qualified  
and therefore not approved for use in production. ST is not responsible for any consequences resulting  
from such use. In no event will ST be liable for the customer using any of these engineering samples in  
production. ST's Quality department must be contacted prior to any decision to use these engineering  
samples to run a qualification activity.  
DS12992 Rev 2  
105/117  
112  
 
 
Package information  
STM32G031x4/x6/x8  
6.6  
TSSOP20 package information  
TSSOP20 is a 20-lead, 6.5 x 4.4 mm thin small-outline package with 0.65 mm pitch.  
Figure 47. TSSOP20 package outline  
D
20  
11  
10  
c
E1  
E
SEATING  
PLANE  
C
0.25 mm  
GAUGE PLANE  
1
PIN 1  
IDENTIFICATION  
k
aaa  
C
A1  
L
A
A2  
L1  
b
e
YA_ME_V3  
1. Drawing is not to scale.  
Table 76. TSSOP20 package mechanical data  
millimeters  
Typ.  
inches(1)  
Symbol  
Min.  
Max.  
Min.  
Typ.  
Max.  
A
A1  
A2  
b
-
-
1.200  
0.150  
1.050  
0.300  
0.200  
6.600  
6.600  
4.500  
-
-
-
0.0472  
0.0059  
0.0413  
0.0118  
0.0079  
0.2598  
0.2598  
0.1772  
-
0.050  
0.800  
0.190  
0.090  
6.400  
6.200  
4.300  
-
-
0.0020  
0.0315  
0.0075  
0.0035  
0.2520  
0.2441  
0.1693  
-
-
1.000  
-
0.0394  
-
c
-
-
D(2)  
6.500  
6.400  
4.400  
0.650  
0.600  
1.000  
-
0.2559  
0.2520  
0.1732  
0.0256  
0.0236  
0.0394  
-
E
E1(3)  
e
L
0.450  
-
0.750  
-
0.0177  
-
0.0295  
-
L1  
k
0°  
8°  
0°  
8°  
aaa  
-
-
0.100  
-
-
0.0039  
1. Values in inches are converted from mm and rounded to four decimal digits.  
2. Dimension “D” does not include mold flash, protrusions or gate burrs. Mold flash, protrusions or gate burrs  
shall not exceed 0.15mm per side.  
3. Dimension “E1” does not include interlead flash or protrusions. Interlead flash or protrusions shall not  
exceed 0.25mm per side.  
106/117  
DS12992 Rev 2  
 
 
 
STM32G031x4/x6/x8  
Package information  
Figure 48. TSSOP20 package footprint  
0.25  
6.25  
20  
11  
1.35  
0.25  
7.10 4.40  
1.35  
1
10  
0.40  
0.65  
YA_FP_V1  
1. Dimensions are expressed in millimeters.  
Device marking  
The following figure gives an example of topside marking orientation versus pin 1 identifier  
location.  
The printed markings may differ depending on the supply chain.  
Other optional marking or inset/upset marks that identify the parts throughout supply chain  
operations, are not indicated below.  
Figure 49. TSSOP20 package marking example  
Product  
identification(1)  
32G031F8P6  
Pin 1  
indentifier  
Revision code  
Date code  
Y WW R  
MSv47955V2  
1. Parts marked as ES or E or accompanied by an Engineering Sample notification letter are not yet qualified  
and therefore not approved for use in production. ST is not responsible for any consequences resulting  
from such use. In no event will ST be liable for the customer using any of these engineering samples in  
production. ST's Quality department must be contacted prior to any decision to use these engineering  
DS12992 Rev 2  
107/117  
112  
 
 
Package information  
STM32G031x4/x6/x8  
samples to run a qualification activity.  
6.7  
WLCSP18 package information  
WLCSP18 is a 18-ball, 1.86 x 2.14 mm wafer-level chip-scale package with 0.4 mm pitch.  
Figure 50. WLCSP18 package outline  
bbb Z  
F
A1  
A1 BALL LOCATION  
e1  
e
G
A
B
C
D
E
DETAIL A  
E
e2  
e
7
6 5 4 3 2 1  
A
D
aaa  
A2  
(4x)  
BOTTOM VIEW  
TOP VIEW  
SIDE VIEW  
A3  
BUMP  
FRONT VIEW  
ccc  
Z
Z
b (36x)  
ccc Z X Y  
ccc  
Z
SEATING PLANE  
DETAIL A  
ROTATED 90  
B06E_WLCSP18_DIE466_ME_V1  
1. Drawing is not to scale.  
2. Dimension is measured at the maximum ball diameter parallel to primary datum Z.  
3. Primary datum Z and seating plane are defined by the spherical crowns of the ball.  
4. Ball position designation per JESD 95-1, SPP-010.  
Table 77. WLCSP18 package mechanical data  
millimeters  
Typ.  
inches(1)  
Symbol  
Min.  
Max.  
Min.  
Typ.  
Max.  
A(2)  
A1  
-
-
-
0.59  
-
-
-
-
0.023  
-
0.18  
0.007  
108/117  
DS12992 Rev 2  
 
 
 
STM32G031x4/x6/x8  
Package information  
Table 77. WLCSP18 package mechanical data (continued)  
millimeters  
Typ.  
inches(1)  
Symbol  
Min.  
Max.  
Min.  
Typ.  
Max.  
A2  
A3(3)  
b(4)  
D
-
0.38  
0.025  
0.25  
1.86  
2.14  
0.40  
1.20  
1.39  
0.345  
0.390  
-
-
-
-
0.015  
0.001  
0.010  
0.073  
0.084  
0.016  
0.047  
0.055  
0.014  
0.015  
-
-
-
-
-
0.22  
0.28  
1.88  
2.16  
-
0.009  
0.011  
0.074  
0.085  
-
1.84  
0.072  
E
2.12  
0.083  
e
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
e1  
-
-
e2  
-
-
F(5)  
G(5)  
aaa  
bbb  
ccc  
ddd  
eee  
-
-
-
-
0.10  
0.10  
0.10  
0.05  
0.05  
0.004  
0.004  
0.004  
0.002  
0.002  
-
-
-
-
-
-
-
-
1. Values in inches are converted from mm and rounded to four decimal digits.  
2. The maximum total package height is calculated by the RSS method (root sum square) using nominal and  
tolerance values of A1 and A2.  
3. Back side coating. Nominal dimension is rounded to three decimal places, which results from the process  
capability.  
4. Dimension is measured at the maximum ball diameter parallel to primary datum Z.  
5. Calculated dimensions are rounded to the three decimal places.  
Figure 51. WLCSP18 recommended PCB ball footprint  
Dpad  
Dsm  
B06E_WLCSP18_DIE466_FP_V1  
DS12992 Rev 2  
109/117  
112  
 
Package information  
STM32G031x4/x6/x8  
Table 78. WLCSP18 recommended PCB design rules  
Recommended values  
Dimension  
Pitch  
0.4 mm  
Dpad  
0,225 mm  
Dsm  
0.290 mm typ. (depends on solder mask registration tolerance)  
Stencil opening  
Stencil thickness  
0.250 mm  
0.100 mm  
Device marking  
The following figure gives an example of topside marking orientation versus ball A1 identifier  
location.  
The printed markings may differ depending on the supply chain.  
Other optional marking or inset/upset marks that identify the parts throughout supply chain  
operations, are not indicated below.  
Figure 52. WLCSP18 package marking example  
Ball A1  
indentifier  
Product  
G318  
identification(1)  
Revision code  
Y WW R  
Date code  
MSv63115V1  
1. Parts marked as ES or E or accompanied by an Engineering Sample notification letter are not yet qualified  
and therefore not approved for use in production. ST is not responsible for any consequences resulting  
from such use. In no event will ST be liable for the customer using any of these engineering samples in  
production. ST's Quality department must be contacted prior to any decision to use these engineering  
samples to run a qualification activity.  
6.8  
SO8N package information  
SO8N is an 8-lead 4.9 x 6 mm plastic small-outline package with 150 mils body width.  
110/117  
DS12992 Rev 2  
 
 
 
STM32G031x4/x6/x8  
Package information  
Figure 53. SO8N package outline  
h x 45˚  
A2  
A
c
ccc  
b
e
0.25 mm  
GAUGE PLANE  
D
k
8
E1  
E
L
1
A1  
L1  
SO-A_V2  
1. Drawing is not to scale.  
Table 79. SO8N package mechanical data  
millimeters  
inches(1)  
Symbol  
Min.  
Typ.  
Max.  
Min.  
Typ.  
Max.  
A
A1  
A2  
b
-
-
1.750  
0.250  
-
-
-
0.0689  
0.0098  
-
0.100  
1.250  
0.280  
0.170  
4.800  
5.800  
3.800  
-
-
0.0039  
0.0492  
0.0110  
0.0067  
0.1890  
0.2283  
0.1496  
-
-
-
-
-
0.480  
0.230  
5.000  
6.200  
4.000  
-
-
0.0189  
0.0091  
0.1969  
0.2441  
0.1575  
-
c
-
-
D
4.900  
0.1929  
E
6.000  
0.2362  
E1  
e
3.900  
0.1535  
1.270  
0.0500  
h
0.250  
0°  
-
0.500  
8°  
0.0098  
0°  
-
0.0197  
8°  
k
-
-
L
0.400  
-
-
1.040  
-
1.270  
-
0.0157  
-
-
0.0500  
-
L1  
ccc  
0.0409  
-
-
0.100  
-
0.0039  
1. Values in inches are converted from mm and rounded to four decimal digits.  
DS12992 Rev 2  
111/117  
112  
 
 
Package information  
STM32G031x4/x6/x8  
Figure 54. SO8N package recommended footprint  
0.6 (x8)  
1.27  
O7_FP_V1  
1. Dimensions are expressed in millimeters.  
Device marking  
The following figure gives an example of topside marking orientation versus pin 1 identifier  
location.  
The printed markings may differ depending on the supply chain.  
Other optional marking or inset/upset marks that identify the parts throughout supply chain  
operations, are not indicated below.  
Figure 55. SO8N package marking example  
Product  
identification(1)  
32G031J6  
R Y WW  
Pin 1  
Date code  
indentifier  
Revision code  
MSv63113V2  
1. Parts marked as ES or E or accompanied by an Engineering Sample notification letter are not yet qualified  
and therefore not approved for use in production. ST is not responsible for any consequences resulting  
from such use. In no event will ST be liable for the customer using any of these engineering samples in  
production. ST's Quality department must be contacted prior to any decision to use these engineering  
samples to run a qualification activity.  
112/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
6.9  
Thermal characteristics  
The operating junction temperature T must never exceed the maximum given in  
J
Table 21: General operating conditions  
The maximum junction temperature in °C that the device can reach if respecting the  
operating conditions, is:  
T (max) = T (max) + P (max) x Θ  
JA  
J
A
D
where:  
T (max) is the maximum operating ambient temperature in °C,  
A
Θ
is the package junction-to-ambient thermal resistance, in °C/W,  
JA  
P = P  
+ P  
,
I/O  
D
INT  
INT  
P
P
P
is power dissipation contribution from product of I and V  
DD DD  
is power dissipation contribution from output ports where:  
I/O  
I/O  
= Σ (V × I ) + Σ ((V  
– V ) × I ),  
OH OH  
OL  
OL  
DDIO1  
taking into account the actual V / I and V / I of the I/Os at low and high  
OL OL  
OH OH  
level in the application.  
Table 80. Package thermal characteristics  
Value  
Symbol  
Parameter  
Package  
Unit  
Junction-  
to-ambient  
Junction-  
to-board  
Junction-  
to-case  
LQFP48 7 × 7 mm  
UFQFPN48 7 × 7 mm  
LQFP32 7 × 7 mm  
84  
31  
76  
18  
76  
28  
62  
57  
86  
42  
4
84  
42  
7
Thermal resistance  
UFQFPN32 5 × 5 mm  
UFQFPN28 4 × 4 mm  
TSSOP20 6.4 × 4.4 mm  
SO8N 4.9 × 6 mm  
47  
°C/W  
Θ
89  
7
88  
19  
30  
134  
6.9.1  
6.9.2  
Reference document  
JESD51-2 Integrated Circuits Thermal Test Method Environment Conditions - Natural  
Convection (still air). Available from www.jedec.org.  
Selecting the product temperature range  
The temperature range is specified in the ordering information scheme shown in Section 7:  
Ordering information.  
Each temperature range suffix corresponds to a specific guaranteed ambient temperature at  
maximum dissipation and to a specific maximum junction temperature.  
DS12992 Rev 2  
113/117  
114  
 
 
 
 
 
STM32G031x4/x6/x8  
As applications do not commonly use microcontrollers at their maximum power  
consumption, it is useful to calculate the exact power consumption and junction temperature  
to determine which temperature range best suits the application.  
The following example shows how to calculate the temperature range needed for a given  
application.  
Example:  
Assuming the following worst application conditions:  
ambient temperature T = 50 °C (measured according to JESD51-2)  
A
I
= 50 mA; V = 3.6 V  
DD  
DD  
20 I/Os simultaneously used as output at low level with I = 8 mA (V = 0.4 V), and  
OL  
OL  
8 I/Os simultaneously used as output at low level with I = 20 mA (V = 1.3 V),  
OL  
OL  
the power consumption from power supply P  
is:  
INT  
P
= 50 mA × 3.6 V= 118 mW,  
INT  
the power loss through I/Os P is  
IO  
P
= 20 × 8 mA × 0.4 V + 8 × 20 mA × 1.3 V = 272 mW,  
IO  
and the total power P to dissipate is:  
D
P
180 mW + 272 mW = 452 mW  
D =  
For product in LQFP48 with Θ = 75°C/W, the junction temperature stabilizes at:  
JA  
T = 50°C + (75°C/W × 452 mW) = 50 °C + 33.9 °C = 83.9°C  
J
As a conclusion, product version with suffix 6 (maximum allowed T = 105° C) is sufficient  
J
for this application.  
If the same application was used in a hot environment with maximum T greater than 71°C,  
A
the junction temperature would exceed 105°C and the product version allowing higher  
maximum T would have to be ordered.  
J
114/117  
DS12992 Rev 2  
STM32G031x4/x6/x8  
Ordering information  
7
Ordering information  
Example  
STM32  
G
031  
K
8
T
6
xyy  
Device family  
®
STM32 = Arm based 32-bit microcontroller  
Product type  
G = general-purpose  
Device subfamily  
031 = STM32G031  
Pin count  
J = 8  
Y = 18  
F = 20  
G = 28  
K = 32  
C = 48  
Flash memory size  
4 = 16 Kbytes  
6 = 32 Kbytes  
8 = 64 Kbytes  
Package type  
T = LQFP  
U = UFQFPN  
Y = WLCSP  
P = TSSOP  
M = SO˽N  
Temperature range  
6 = -40 to 85°C (105°C junction)  
7 = -40 to 105°C (125°C junction)  
3 = -40 to 125°C (130°C junction)  
Options  
˽TR = tape and reel packing  
˽˽˽ = tray packing  
other = 3-character ID incl. custom Flash code and packing information  
For a list of available options (memory, package, and so on) or for further information on any  
aspect of this device, please contact your nearest ST sales office.  
DS12992 Rev 2  
115/117  
115  
 
 
Revision history  
STM32G031x4/x6/x8  
8
Revision history  
Table 81. Document revision history  
Date  
Revision  
Changes  
26-Jun-2019  
1
Initial release  
Cover page updated;  
Section 2: Description updated;  
Figure 1: Block diagram updated;  
Table 12: Pin assignment and description updated;  
Table 18: Voltage characteristics updated;  
22-Apr-2020  
2
Table 19: Current characteristics: Note 2 removed;  
Table 21: General operating conditions and Section 7:  
Ordering information: Added Ta range -40 to 105°C;  
Table 57: ADC characteristics: major update;  
Corrected figures with package marking examples.  
116/117  
DS12992 Rev 2  
 
 
STM32G031x4/x6/x8  
IMPORTANT NOTICE – PLEASE READ CAREFULLY  
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and  
improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on  
ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order  
acknowledgement.  
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or  
the design of Purchasers’ products.  
No license, express or implied, to any intellectual property right is granted by ST herein.  
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.  
ST and the ST logo are trademarks of ST. For additional information about ST trademarks, please refer to www.st.com/trademarks. All other  
product or service names are the property of their respective owners.  
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.  
© 2020 STMicroelectronics – All rights reserved  
DS12992 Rev 2  
117/117  
117  
 

相关型号:

STM32G031C4U7TR

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR

STM32G031C4Y3TR

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR

STM32G031C4Y6TR

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR

STM32G031C4Y7TR

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR

STM32G031C6

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR

STM32G031C6M3TR

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR

STM32G031C6M6TR

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR

STM32G031C6M7TR

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR

STM32G031C6P3TR

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR

STM32G031C6P6TR

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR

STM32G031C6P7TR

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR

STM32G031C6T3TR

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

Warning: Undefined variable $rtag in /www/wwwroot/website_ic37/www.icpdf.com/pdf/pdf/index.php on line 217
-
STMICROELECTR