Document
STM32F031x4 STM32F031x6
ARM®-based 32-bit MCU with up to 32 Kbyte Flash, timers, ADC and communication interfaces, 2.0 - 3.6 V
Datasheet - production data
Features
Core: ARM® 32-bit Cortex®-M0 CPU, frequency up to 48 MHz
Memories – 16 to 32 Kbytes of Flash memory – 4 Kbytes of SRAM with HW parity
CRC calculation unit
Reset and power management – Digital and I/Os supply: 2.0 to 3.6 V – Analog supply: VDDA = from VDD to 3.6 V – Power-on/Power-down reset (POR/PDR) – Programmable voltage detector (PVD) – Low power modes: Sleep, Stop and Standby – VBAT supply for RTC and backup registers
Clock management – 4 to 32 MHz crystal oscillator – 32 kHz oscillator for RTC with calibration – Internal 8 MHz RC with x6 PLL option – Internal 40 kHz RC oscillator
Up to 39 fast I/Os – All mappable on external interrupt vectors – Up to 25 I/Os with 5 V tolerant capability
5-channel DMA controller
1 × 12-bit, 1.0 µs ADC (up to 10 channels) – Conversion range: 0 to 3.6V – Separate analog supply from 2.4 up to 3.6 V
Up to 9 timers – 1 x 16-bit 7-channel advanced-control timer for 6 channels PWM output, with deadtime generation and emergency stop – 1 x 32-bit and 1 x 16-bit timer, with up to 4 IC/OC, usable for IR control decoding – 1 x 16-bit timer, with 2 IC/OC, 1 OCN, deadtime generation and emergency stop
LQFP32 7x7 mm UFQFPN32 5x5 mm WLCSP25 TSSOP20 LQFP48 7x7 mm UFQFPN28 4x4 mm (2.1x2.1 mm)
– 1 x 16-bit timer, with IC/OC and OCN, deadtime generation, emergency stop and modulator gate for IR control
– 1 x 16-bit timer with 1 IC/OC
– Independent and system watchdog timers
– SysTick timer: 24-bit downcounter
Calendar RTC with alarm and periodic wakeup from Stop/Standby
Communication interfaces – 1 x I2C interface; supporting Fast Mode Plus (1 Mbit/s) with 20 mA current sink, SMBus/PMBus, and wakeup from Stop mode
– 1 x USART supporting master synchronous SPI and modem control; one with ISO7816 interface, LIN, IrDA capability auto baud rate detection and wakeup feature
– 1 x SPI (18 Mbit/s) with 4 to 16 programmable bit frames, with I2S interface multiplexed
Serial wire debug (SWD)
96-bit unique ID
Extended temperature range: -40 to +105°C All packages ECOPACK®2
Table 1. Device summary
Reference
Part number
STM32F031x4
STM32F031C4, STM32F031F4, STM32F031G4, STM32F031K4
STM32F031C6, STM32F031E6, STM32F031x6 STM32F031F6, STM32F031G6,
STM32F031K6
August 2015
This is information on a product in full production.
DocID025743 Rev 3
1/113
www.st.com
Contents
Contents
STM32F031x4 STM32F031x6
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1 ARM®-Cortex®-M0 core with embedded Flash and SRAM . . . . . . . . . . . 12
3.2 Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 Boot modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.4 Cyclic redundancy check calculation unit (CRC) . . . . . . . . . . . . . . . . . . . 13
3.5 Power management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.1 Power supply schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.2 Power supply supervisors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.3 Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.4 Low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.6 Clocks and startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.7 General-purpose inputs/outputs (GPIOs) . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.8 Direct memory access controller (DMA) . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.9 Interrupts and events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.9.1 Nested vectored interrupt controller (NVIC) . . . . . . . . . . . . . . . . . . . . . . 16
3.9.2 Extended interrupt/event controller (EXTI) . . . . . . . . . . . . . . . . . . . . . . 16
3.10 Analog to digital converter (ADC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.10.1 Temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.11
3.10.2 Internal voltage reference (VREFINT) . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.10.3 VBAT battery voltage monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Timers and watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.11.1 Advanced-control timer (TIM1) ..