![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
this is information on a product in full production. april 2016 docid027063 rev 4 1/118 stm32l031x4 stm32l031x6 access line ultra-low- power 32-bit mcu arm ? -based cortex ? -m0+, up to 32kb flash, 8k b sram, 1kb eeprom, adc datasheet - production data features ? ultra-low-power platform ? 1.65 v to 3.6 v power supply ? -40 to 125 c temperature range ? 0.23 a standby mode (2 wakeup pins) ? 0.35 a stop mode (16 wakeup lines) ? 0.6 a stop mode + rtc + 8 kb ram retention ? down to 76 a/mhz in run mode ? 5 s wakeup time (from flash memory) ?41a 12-bit adc conversion at 10 ksps ? core: arm ? 32-bit cortex ? -m0+ ? from 32 khz up to 32 mhz max. ? 0.95 dmips/mhz ? reset and supply management ? ultra-safe, low-power bor (brownout reset) with 5 selectable thresholds ? ultralow power por/pdr ? programmable voltage detector (pvd) ? clock sources ? 1 to 25 mhz crystal oscillator ? 32 khz oscillator for rtc with calibration ? high speed internal 16 mhz factory-trimmed rc (+/- 1%) ? internal low-power 37 khz rc ? internal multispeed low-power 65 khz to 4.2 mhz rc ? pll for cpu clock ? pre-programmed bootloader ? usart, spi supported ? development support ? serial wire debug supported ? up to 38 fast i/os (31 i/os 5v tolerant) ? memories ? up to 32 kb flash with ecc ? 8 kb ram ? 1 kb of data eeprom with ecc ? 20-byte backup register ? sector protection against r/w operation ? ? rich analog peripherals ? 12-bit adc 1.14 msps up to 10 channels (down to 1.65 v) ? 2x ultra-low-power comparators (window mode and wake up capability, down to 1.65 v) ? 7-channel dma controller, supporting adc, spi, i2c, usart, timers ? 5x peripherals communication interface ? 1x usart (iso 7816, irda), 1x uart (low power) ? up to 2 spi interfaces, up to 16 mbits/s ? 1x i2c (smbus/pmbus) ? 8x timers: 1x 16-bit with up to 4 channels, 2x 16-bit with up to 2 channels, 1x 16-bit ultra-low-power timer, 1x systick, 1x rtc and 2x watchdogs (independent/window) ? crc calculation unit, 96-bit unique id ? all packages are ecopack ? 2 table 1. device summary reference part number stm32l031x4 stm32l031g4, stm32l031k4, stm32l031c4, STM32L031E4, stm32l031f4 stm32l031x6 stm32l031g6, stm32l031k6, stm32l031c6, stm32l031e6, stm32l031f6 ufqfpn28 4x4 mm ufqfpn32 5x5 mm lqfp32/48 7x7 mm wlcsp25 2.097x2.493 mm tssop20 169 mils www.st.com
contents stm32l031x4/6 2/118 docid027063 rev 4 contents 1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1 device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 2.2 ultra-low-power device continuum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3 functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.1 low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2 interconnect matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.3 arm? cortex?-m0+ core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.4 reset and supply management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.4.1 power supply schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.4.2 power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.4.3 voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.4.4 boot modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.5 clock management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.6 low-power real-time clock and backup registers . . . . . . . . . . . . . . . . . . . 25 3.7 general-purpose inputs/outputs (gpios) . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.8 memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.9 direct memory access (dma) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.10 analog-to-digital converter (adc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.11 temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.11.1 internal voltage reference (v refint ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.12 ultra-low-power comparators and reference voltage . . . . . . . . . . . . . . . . 28 3.13 system configuration controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.14 timers and watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.14.1 general-purpose timers (tim2, tim21 an d tim22) . . . . . . . . . . . . . . . . 29 3.14.2 low-power timer (lptim) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.14.3 systick timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.14.4 independent watchdog (iwdg) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.14.5 window watchdog (wwdg) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.15 communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 docid027063 rev 4 3/118 stm32l031x4/6 contents 4 3.15.1 i2c bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.15.2 universal synchronous/asynchronous receiver transmitter (usart) . . 31 3.15.3 low-power universal asynchronous receiver transmitter (lpuart) . . . 32 3.15.4 serial peripheral interface (spi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.16 cyclic redundancy check (crc) calculation unit . . . . . . . . . . . . . . . . . . . 32 3.17 serial wire debug port (sw-dp) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4 pin descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5 memory mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 6 electrical characteristi cs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 6.1 parameter conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 6.1.1 minimum and maximum values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 6.1.2 typical values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 6.1.3 typical curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 6.1.4 loading capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 6.1.5 pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 6.1.6 power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 6.1.7 current consumption measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 6.2 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 6.3 operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 6.3.1 general operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 6.3.2 embedded reset and power control bloc k characteristics . . . . . . . . . . . 52 6.3.3 embedded internal reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . 54 6.3.4 supply current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 6.3.5 wakeup time from low-power mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.3.6 external clock source characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 6.3.7 internal clock source charac teristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 6.3.8 pll characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 6.3.9 memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 6.3.10 emc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 6.3.11 electrical sensitivity characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 6.3.12 i/o current injection characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 6.3.13 i/o port characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 6.3.14 nrst pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.3.15 12-bit adc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 contents stm32l031x4/6 4/118 docid027063 rev 4 6.3.16 temperature sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 6.3.17 comparators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 6.3.18 timer characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 6.3.19 communications interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 7 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 7.1 lqfp48 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 7.2 lqfp32 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 7.3 ufqfpn32 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 7.4 ufqfpn28 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 7.5 wlcsp25 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 7.6 tssop20 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 7.7 thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 7.7.1 reference document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 8 part numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 9 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 docid027063 rev 4 5/118 stm32l031x4/6 list of tables 6 list of tables table 1. device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. ultra-low-power stm32l031x4/x6 device features and peripheral counts. . . . . . . . . . . . . 11 table 3. functionalities depending on the operating power supply range . . . . . . . . . . . . . . . . . . . . 17 table 4. cpu frequency range depending on dynamic voltag e scaling . . . . . . . . . . . . . . . . . . . . . . 17 table 5. functionalities depending on the working mode (from run/active down to standby) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 6. stm32l0xx peripherals interconnect matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 7. temperature sensor calibration values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 table 8. internal voltage reference measured values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 table 9. timer feature comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 table 10. comparison of i2c analog and digital filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 table 11. stm32l031x4/6 i 2 c implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 table 12. usart implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 table 13. spi implementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 table 14. legend/abbreviations used in the pinout table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 table 15. pin definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 table 16. alternate functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 table 17. voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 table 18. current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 table 19. thermal characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 table 20. general operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 table 21. embedded reset and power control block characterist ics. . . . . . . . . . . . . . . . . . . . . . . . . . 52 table 22. embedded internal reference voltage calibration valu es . . . . . . . . . . . . . . . . . . . . . . . . . . 54 table 23. embedded internal reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4 table 24. current consumption in run mo de, code with data processing running from flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 25. current consumption in run mode vs code type, code with data processing running from flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 26. current consumption in run mode, code wit h data processing running from ram . . . . . . 58 table 27. current consumption in run mode vs code type, code with data processing running from ram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 table 28. current consumption in sleep mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 table 29. current consumption in low-power run mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 table 30. current consumption in low-power sleep mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 table 31. typical and maximum current consumptions in st op mode . . . . . . . . . . . . . . . . . . . . . . . . 62 table 32. typical and maximum current consumptions in standby mode . . . . . . . . . . . . . . . . . . . . . 63 table 33. average current consumption during wakeup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 table 34. peripheral current consumption in run or sleep mo de . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 table 35. peripheral current consumption in stop and stan dby mode . . . . . . . . . . . . . . . . . . . . . . . 65 table 36. low-power mode wakeup timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 table 37. high-speed external user clock characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 table 38. low-speed external user clock characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 table 39. hse oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 table 40. lse oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 table 41. 16 mhz hsi16 oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 table 42. lsi oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 table 43. msi oscillator ch aracteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 table 44. pll characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 list of tables stm32l031x4/6 6/118 docid027063 rev 4 table 45. ram and hardware registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 table 46. flash memory and dat a eeprom characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 table 47. flash memory and data eeprom endurance and retention . . . . . . . . . . . . . . . . . . . . . . . 75 table 48. ems characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 table 49. emi characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 table 50. esd absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 table 51. electrical sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 table 52. i/o current injection susceptibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 table 53. i/o static characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 table 54. output voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 table 55. i/o ac characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 table 56. nrst pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 table 57. adc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 table 58. r ain max for f adc = 16 mhz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 table 59. adc accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 table 60. temperature sensor calibration values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 7 table 61. temperature sensor characteristic s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 table 62. comparator 1 characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 table 63. comparator 2 characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 table 64. timx characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 table 65. i2c analog filter characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 table 66. usart/lpuart characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1 table 67. spi characteristics in voltage range 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 table 68. spi characteristics in voltage range 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 table 69. spi characteristics in voltage range 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 table 70. lqfp48 - 48-pin low-profile quad flat package, 7 x 7 mm, package mechanical data . . . . 97 table 71. lqfp32, 7 x 7 mm, 32-pin low-profile quad flat package mechanical data . . . . . . . . . . . 100 table 72. ufqfpn32, 5 x 5 mm, 32-pin package mechanical data. . . . . . . . . . . . . . . . . . . . . . . . . 102 table 73. ufqpn28, 4 x 4 mm, 28-pin package mechanical da ta. . . . . . . . . . . . . . . . . . . . . . . . . . 104 table 74. wlcsp25 - 2.097 x 2.493 mm, 0.400 mm pitc h wafer level chip scale mechanical data 106 table 75. wlcsp25 recommended pcb design rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 table 76. tssop20 ? 20-lead thin shrink sm all outline, 6.5 x 4.4 mm, 0.65 mm pitch, package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 table 77. thermal characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 table 78. stm32l031x4/6 ordering information scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 table 79. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 docid027063 rev 4 7/118 stm32l031x4/6 list of figures 8 list of figures figure 1. stm32l031x4/6 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 figure 2. clock tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 figure 3. stm32l031x4/6 lqfp48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 figure 4. stm32l031x4/6 lqfp32 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 figure 5. stm32l031x4/6 ufqfpn32 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 figure 6. stm32l031x4/6 ufqfpn28 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 figure 7. stm32l031gxuxs ufqfpn28 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 figure 8. stm32l031x4/6 tssop20 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 figure 9. stm32l031x4/6 wlcsp25 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 figure 10. memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 figure 11. pin loading conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 figure 12. pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 figure 13. power supply scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 figure 14. current consumption measurement scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 figure 15. idd vs vdd, at ta= 25/55/ 85/105 c, run mode, code running from flash memory, range 2, hse = 16 mhz, 1ws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 figure 16. idd vs vdd, at ta= 25/55/ 85/105 c, run mode, code running from flash memory, range 2, hsi16, 1ws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 figure 17. idd vs vdd, at ta= 25/55/ 85 /105/125 c, low-power run mode, code running from ram, range 3, msi (range 0) at 64 khz, 0 ws . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 figure 18. idd vs vdd, at ta= 25/55/ 85/105/125 c, stop mode with rtc enabled and running on lse low drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 figure 19. idd vs vdd, at ta= 25/55/85 /105/125 c, stop mode with rtc disabled, all clocks off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 figure 20. high-speed external clock source ac timing diagra m . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 figure 21. low-speed external clock source ac timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 figure 22. hse oscillator circuit diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 figure 23. typical application with a 32.768 khz crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 figure 24. hsi16 minimum and maximum value versus temperat ure . . . . . . . . . . . . . . . . . . . . . . . . . 71 figure 25. vih/vil versus vdd (cmos i/os) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 0 figure 26. vih/vil versus vdd (ttl i/os) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 figure 27. i/o ac characteristics definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 figure 28. recommended nrst pin protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 figure 29. adc accuracy characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 figure 30. typical connection diagram using the adc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 figure 31. spi timing diagram - slave mode and cpha = 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 figure 32. spi timing diagram - slave mode and cpha = 1 (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 figure 33. spi timing diagram - master mode (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 figure 34. lqfp48, 7 x 7 mm, 48-pin low-profile quad flat package outline . . . . . . . . . . . . . . . . . . . . 96 figure 35. lqfp48 recommended footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 figure 36. example of lqfp48 marking (package top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 figure 37. lqfp32, 7 x 7 mm, 32-pin low-profile quad flat package outline . . . . . . . . . . . . . . . . . . . . 99 figure 38. lqfp32 recommended footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 0 figure 39. example of lqfp32 marking (package top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 figure 40. ufqfpn32, 5 x 5 mm, 32-pin package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 figure 41. ufqfpn32 recommended footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 figure 42. example of ufqfpn32 marking (package top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 figure 43. ufqpn28, 4 x 4 mm, 28-pin package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 list of figures stm32l031x4/6 8/118 docid027063 rev 4 figure 44. ufqfpn28 recommended footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 figure 45. example of ufqfpn28 marking (package top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 figure 46. wlcsp25 - 2.097 x 2.493 mm, 0.400 mm pitch wafer level chip scale package outline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 figure 47. wlcsp25 - 2.097 x 2.493 mm, 0.400 mm pitch wafer level chip scale recommended footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 figure 48. example of wlcsp25 marking (package top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 figure 49. tssop20 ? 20-lead thin shrink sm all outline, 6.5 x 4.4 mm, 0.65 mm pitch, package outline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 figure 50. tssop20 ? 20-lead thin shrink sm all outline, 6.5 x 4.4 mm, 0.65 mm pitch, package footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 figure 51. example of tssop20 marking (package top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 figure 52. thermal resistance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 docid027063 rev 4 9/118 stm32l031x4/6 introduction 33 1 introduction the ultra-low-power stm32l031x4/6 family includes devices in 5 different package types from 20 to 48 pins. the description below gives an overview of the complete range of peripherals proposed in this family. these features make the ultra-low-power st m32l031x4/6 microcontrollers suitable for a wide range of applications: ? gas/water meters and industrial sensors ? healthcare and fitness equipment ? remote control and user interface ? pc peripherals, gaming, gps equipment ? alarm system, wired and wireless sensors, video intercom this stm32l031x4/6 datasheet should be read in conjunction with the stm32l0x1 reference manual (rm0377). for information on the arm ? cortex ? -m0+ core please refer to the cortex ? -m0+ technical reference manual, available from the www.arm.com website. figure 1 shows the general block diagram of the device family. description stm32l031x4/6 10/118 docid027063 rev 4 2 description the access line ultra-low-power stm32l031x4/6 family incorporates the high-performance arm ? cortex ? -m0+ 32-bit risc core operating at a 32 mhz frequency, high-speed embedded memories (up to 32 kbytes of flash program memory, 1 kbytes of data eeprom and 8 kbytes of ram) plus an extensiv e range of enh anced i/os an d peripherals. the stm32l031x4/6 devices provide high power efficiency for a wide range of performance. it is achieved with a large choice of internal and external clock sources, an internal voltage adaptation and several low-power modes. the stm32l031x4/6 devices offer several analog features, one 12-bit adc with hardware oversampling, two ultra-low-power comparators, several timers, one low-power timer (lptim), three general-purpose 16-bit timers, one rtc and one systick which can be used as timebases. they also feature two watchdogs, one watchdog with independent clock and window capability and one window watchdog based on bus clock. moreover, the stm32l031x4/6 devices embed standard and advanced communication interfaces: one i2c, one spi, one usart, and a low-power uart (lpuart). the stm32l031x4/6 also include a real-time clock and a set of backup registers that remain powered in standby mode. the ultra-low-power stm32l031x4/6 devices operate from a 1.8 to 3.6 v power supply (down to 1.65 v at power down) with bor and from a 1.65 to 3.6 v power supply without bor option. they are available in the -40 to +125 c temperature range. a comprehensive set of power-saving modes allows the design of low-power applications. stm32l031x4/6 description docid027063 rev 4 11/118 2.1 device overview table 2. ultra-low-power stm32l031x4/ x6 device features and peripheral counts peripheral stm32 l031f4 stm32 l031e4 stm32 l031g4 stm32 l031k4 stm32 l031c4 stm32 l031f6 stm32 l031e6 stm32 l031g6 stm32 l031k6 stm32 l031c6 flash (kbytes) 16 32 data eeprom (kbytes) 1 ram (kbytes) 8 timers general- purpose 3 lptimer 1 rtc/systick/iwdg/ wwdg 1/1/1/1 communicati on interfaces spi 2(1) (1) i 2 c 1 usart 1 lpuart 1 gpios 15 20 21(23) (3) 27 (2) 38 15 20 21(23) (3) 27 (2) 38 clocks: hse (4) /lse/hsi/msi/lsi 1/1/1/1/1 12-bit synchronized adc number of channels 1 10 comparators 2 max. cpu frequency 32 mhz operating voltage 1.8 v to 3.6 v (down to 1.65 v at power-down) with bor option 1.65 v to 3.6 v without bor option description stm32l031x4/6 12/118 docid027063 rev 4 operating temperatures ambient temperature: ?40 to +125 c junction temperature: ?40 to +130 c packages tssop 20 wlcsp 25 ufqfpn 28 lqfp32, ufqfpn 32 lqfp48 tssop 20 wlcsp 25 ufqfpn 28 lqfp32, ufqfpn 32 lqfp48 1. 1 spi interface is a usart operating in spi master mode. 2. lqfp32 has two gpios, less than ufqfpn32 (27). 3. 23 gpios are available only on stm32l031gxuxs part number. 4. hse external quartz connexi on available only on lqfp48. table 2. ultra-low-power stm32l031x4/x6 devi ce features and peripheral counts (continued) peripheral stm32 l031f4 stm32 l031e4 stm32 l031g4 stm32 l031k4 stm32 l031c4 stm32 l031f6 stm32 l031e6 stm32 l031g6 stm32 l031k6 stm32 l031c6 docid027063 rev 4 13/118 stm32l031x4/6 description 33 figure 1. stm32l031x4/6 block diagram & |