STM32F042x4 STM32F042x6 ARM -based 32-bit MCU, up to 32 KB Flash, crystal-less USB FS 2.0, CAN, 9 timers, ADC and comm. interfaces, 2.0 - 3.6 V Datasheet - production data Features Core: ARM 32-bit Cortex -M0 CPU, frequency up to 48 MHz UFQFPN48 7x7 mm LQFP48 7x7 mm WLCSP36 TSSOP20 LQFP32 7x7 mm UFQFPN32 5x5 mm 2.6x2.7 mm 6.5x4.4 mm Memories UFQFPN28 4x4 mm 16 to 32 Kbytes of Flash memory Nine timers 6 Kbytes of SRAM with HW parity One 16-bit advanced-control timer for six CRC calculation unit channel PWM output One 32-bit and four 16-bit timers, with up to Reset and power management four IC/OC, OCN, usable for IR control Digital and I/Os supply: V = 2 V to 3.6 V DD decoding Analog supply: V = from V to 3.6 V DDA DD Independent and system watchdog timers Selected I/Os: V = 1.65 V to 3.6 V DDIO2 SysTick timer Power-on/Power down reset (POR/PDR) Communication interfaces Programmable voltage detector (PVD) 2 One I C interface supporting Fast Mode Low power modes: Sleep, Stop, Standby Plus (1 Mbit/s) with 20 mA current sink, V supply for RTC and backup registers BAT SMBus/PMBus and wakeup Clock management Two USARTs supporting master 4 to 32 MHz crystal oscillator synchronous SPI and modem control, one 32 kHz oscillator for RTC with calibration with ISO7816 interface, LIN, IrDA, auto baud rate detection and wakeup feature Internal 8 MHz RC with x6 PLL option Two SPIs (18 Mbit/s) with 4 to 16 Internal 40 kHz RC oscillator 2 programmable bit frames, one with I S Internal 48 MHz oscillator with automatic interface multiplexed trimming based on ext. synchronization CAN interface Up to 38 fast I/Os USB 2.0 full-speed interface, able to run All mappable on external interrupt vectors from internal 48 MHz oscillator and with Up to 24 I/Os with 5 V tolerant capability BCD and LPM support and 8 with independent supply V DDIO2 HDMI CEC, wakeup on header reception 5-channel DMA controller Serial wire debug (SWD) One 12-bit, 1.0 s ADC (up to 10 channels) 96-bit unique ID Conversion range: 0 to 3.6 V All packages ECOPACK 2 Separate analog supply: 2.4 V to 3.6 V Table 1. Device summary Up to 14 capacitive sensing channels for touchkey, linear and rotary touch sensors Reference Part number STM32F042F4, STM32F042G4, Calendar RTC with alarm and periodic wakeup STM32F042x4 STM32F042K4, STM32F042T4, STM32F042C4 from Stop/Standby STM32F042F6, STM32F042G6, STM32F042x6 STM32F042K6, STM32F042T6, STM32F042C6 January 2017 DocID025832 Rev 5 1/117 This is information on a product in full production. www.st.comContents STM32F042x4 STM32F042x6 Contents 1 Introduction 9 2 Description 10 3 Functional overview 13 3.1 ARM -Cortex -M0 core 13 3.2 Memories . 13 3.3 Boot modes . 13 3.4 Cyclic redundancy check calculation unit (CRC) . 14 3.5 Power management . 14 3.5.1 Power supply schemes . 14 3.5.2 Power supply supervisors . 14 3.5.3 Voltage regulator 15 3.5.4 Low-power modes . 15 3.6 Clocks and startup 16 3.7 General-purpose inputs/outputs (GPIOs) . 17 3.8 Direct memory access controller (DMA) 18 3.9 Interrupts and events 18 3.9.1 Nested vectored interrupt controller (NVIC) 18 3.9.2 Extended interrupt/event controller (EXTI) 18 3.10 Analog-to-digital converter (ADC) 18 3.10.1 Temperature sensor 19 3.10.2 Internal voltage reference (V ) . 19 REFINT 3.10.3 V battery voltage monitoring . 20 BAT 3.11 Touch sensing controller (TSC) 20 3.12 Timers and watchdogs . 21 3.12.1 Advanced-control timer (TIM1) . 21 3.12.2 General-purpose timers (TIM2, 3, 14, 16, 17) 22 3.12.3 Independent watchdog (IWDG) . 23 3.12.4 System window watchdog (WWDG) . 23 3.12.5 SysTick timer . 23 3.13 Real-time clock (RTC) and backup registers 23 2 3.14 Inter-integrated circuit interface (I C) 24 2/117 DocID025832 Rev 5