up to 1MB Flash, 128 KB SRAM, USB OTG FS, LCD, ext. SMPS
Datasheet - production data
Features
• Ultra-low-power with FlexPowerControl
– 1.71 V to 3.6 V power supply
– -40 °C to 85/105/125 °C temperature range
– 300 nA in V
32x32-bit backup registers
– 30 nA Shutdown mode (5 wakeup pins)
– 120 nA Standby mode (5 wakeup pins)
– 420 nA Standby mode with RTC
– 1.1 µA Stop 2 mode, 1.4 µA with RTC
– 100 µA/MHz run mode (LDO Mode)
–39 A/MHz run mode (@3.3 V SMPS
Mode)
– Batch acquisition mode (BAM)
– 4 µs wakeup from Stop mode
– Brown out reset (BOR)
– Interconnect matrix
• Core: Arm
®
Adaptive real-time accelerator (ART
Accelerator™) allowing 0-wait-state execution
from Flash memory, frequency up to 80 MHz,
MPU, 100DMIPS and DSP instructions
This datasheet provides the ordering information and mechanical device characteristics of
the STM32L476xx microcontrollers.
This document should be read in conjunction with the STM32L4x6 reference manual
(RM0351). The reference manual is available from the STMicroelectronics website
www.st.com.
For information on the Arm
Reference Manual, available from the www.arm.com website.
®(a)
Cortex®-M4 core, please refer to the Cortex®-M4 Technical
a. Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.
DS10198 Rev 813/270
60
Page 14
DescriptionSTM32L476xx
2 Description
The STM32L476xx devices are the ultra-low-power microcontrollers based on the high-
performance Arm
The Cortex-M4 core features a Floating point unit (FPU) single precision which supports all
®
Arm
single-precision data-processing instructions and data types. It also implements a full
®
Cortex®-M4 32-bit RISC core operating at a frequency of up to 80 MHz.
set of DSP instructions and a memory protection unit (MPU) which enhances application
security.
The STM32L476xx devices embed high-speed memories (Flash memory up to 1 Mbyte, up
to 128
Kbyte of SRAM), a flexible external memory controller (FSMC) for static memories
(for devices with packages of 100 pins and more), a Quad SPI flash memories interface
(available on all packages) and an extensive range of enhanced I/Os and peripherals
connected to two APB buses, two AHB buses and a 32-bit multi-AHB bus matrix.
The STM32L476xx devices embed several protection mechanisms for embedded Flash
memory and SRAM: readout protection, write protection, proprietary code readout
protection and Firewall.
The devices offer up to three fast 12-bit ADCs (5 Msps), two comparators, two operational
amplifiers, two DAC channels, an internal voltage reference buffer, a low-power RTC, two
general-purpose 32-bit timer, two 16-bit PWM timers dedicated to motor control, seven
general-purpose 16-bit timers, and two 16-bit low-power timers. The devices support four
digital filters for external sigma delta modulators (DFSDM).
In addition, up to 24 capacitive sensing channels are available. The devices also embed an
integrated LCD driver 8x40 or 4x44, with internal step-up converter.
They also feature standard and advanced communication interfaces.
The STM32L476xx operates in the -40 to +85 °C (+105 °C junction), -40 to +105 °C
(+125
°C junction) and -40 to +125 °C (+130 °C junction) temperature ranges from a 1.71 to
3.6
V VDD power supply when using internal LDO regulator and a 1.05 to 1.32V V
power supply when using external SMPS supply. A comprehensive set of power-saving
modes allows the design of low-power applications.
Some independent power supplies are supported: analog independent supply input for
ADC, DAC, OPAMPs and comparators, 3.3
V dedicated supply input for USB and up to 14
I/Os can be supplied independently down to 1.08V. A VBAT input allows to backup the RTC
and backup registers. Dedicated V
power supplies can be used to bypass the internal
DD12
LDO regulator when connected to an external SMPS.
The STM32L476xx family offers six packages from 64-pin to 144-pin packages.
14/270DS10198 Rev 8
DD12
Page 15
STM32L476xxDescription
Table 2. STM32L476xx family device features and peripheral counts
Peripheral
Flash memory
STM32
L476Zx
512K
B
1MB
STM32
L476Qx
512K
B
1MB
STM32
L476Vx
256KB512K
B
1MB
512K
SRAM128KB
External memory
controller for static
YesYesYes
(1)
memories
Quad SPIYes
Advanced
control
General
purpose
2 (16-bit)
5 (16-bit)
2 (32-bit)
Basic2 (16-bit)
Timers
Low -power2 (16-bit)
SysTick
timer
1
Watchdog
timers
(indepen-
2
dent,
window)
SPI3
2
C3
I
Comm.
interfaces
USART
UART
LPUART
SAI2
3
2
1
CAN1
USB OTG
FS
Yes
SDMMCYes
SWPMIYes
STM32
L476Mx
1MB
B
STM32
L476Jx
512K
B
1MB
256KB512K
NoNoNo
STM32
L476Rx
B
1MB
Digital filters for sigmadelta modulators
Yes (4 filters)
Number of channels8
RTCYes
Tamper pins3222
LCD
COM x SEG
Yes
8x40 or
4x44
Yes
8x40 or
4x44
Yes
8x40 or 4x44
Yes
8x30 or
4x32
Yes
8x28 or
4x32
Yes
8x28 or 4x32
DS10198 Rev 815/270
60
Page 16
DescriptionSTM32L476xx
Table 2. STM32L476xx family device features and peripheral counts (continued)
Peripheral
STM32
L476Zx
STM32
L476Qx
STM32
L476Vx
STM32
L476Mx
STM32
L476Jx
STM32
L476Rx
Random generatorYes
(2)
GPIOs
Wakeup pins
Nb of I/Os down to
114
5
14
109
5
14
82
65
5
0
4
6
57
51
4
6
4
0
1.08 V
Capacitive sensing
Number of channels
12-bit ADCs
Number of channels
242421121212
24
3
3
19
16
3
16
3
16
3
3
16
12-bit DAC channels2
Internal voltage
reference buffer
YesNo
Analog comparator2
Operational amplifiers2
Max. CPU frequency80 MHz
Operating voltage (V
Operating voltage
(V
)
DD12
Operating temperature
Packages
1. For the LQFP100 package, only FMC Bank1 is available. Bank1 can only support a multiplexed NOR/PSRAM memory
using the NE1 Chip Select.
2. In case external SMPS package type is used, 2 GPIO's are replaced by VDD12 pins to connect the SMPS power supplies
hence reducing the number of available GPIO's by 2.
)1.71 to 3.6 V
DD
1.05 to 1.32 V
Ambient operating temperature: -40 to 85 °C / -40 to 105 °C / -40 to 125 °C
Junction temperature: -40 to 105 °C / -40 to 125 °C / -40 to 130 °C
LQFP144
UFBGA144
UFBGA
132
LQFP100WLCSP81 WLCSP72LQFP64
16/270DS10198 Rev 8
Page 17
STM32L476xxDescription
MS31263V8
USB
OTG
Flash
up to
1 MB
Flexible static memory controller (FSMC):
SRAM, PSRAM, NOR Flash,
NAND Flash
GPIO PORT A
AHB/APB2
EXT IT. WKUP
114 AF
PA[15:0]
TIM1 / PWM
3 compl. channels (TIM1_CH[1:3]N),
4 channels (TIM1_CH[1:4]),
ETR, BKIN, BKIN2 as AF
USART1
RX, TX, CK,CTS,
RTS as AF
SPI1
MOSI, MISO,
SCK, NSS as AF
APB260MHz
APB130MHz
MOSI, MISO, SCK, NSS as AF
DAC1_OUT1
ITF
WWDG
RTC_TS
OSC32_IN
OSC32_OUT
smcard
IrDA
16b
SDIO / MMC
D[7:0]
CMD, CK as AF
VBAT = 1.55 to 3.6 V
SCL, SDA, SMBA as AF
JTAG & SW
ARM Cortex-M4
80 MHz
FPU
NVIC
ETM
MPU
DMA2
ART
ACCEL/
CACHE
CLK, NE[4:1], NL, NBL[1:0],
A[25:0], D[15:0], NOE, NWE,
NWAIT, NCE3, INT3 as AF
RNG
FIFO
@ VDDA
BOR
Supply
supervision
PVD, PVM
Int
reset
XTAL 32 kHz
MANAGT
RTC
FCLK
Standby
interface
IWDG
@VBAT
@ VDD
@VDD
AWU
Reset & clock
control
PCLKx
Voltage
regulator
3.3 to 1.2 V
VDD
Power management
@ VDD
RTC_TAMPx
Backup register
AHB bus-matrix
TIM15
2 channels,
1 compl. channel, BKIN as AF
TIM6
TIM7
TIM2
TIM3
TIM4
TIM5
USART2
USART3
I2C1/SMBUS
D-BUS
FIFO
APB1 80 MHz (max)
SRAM 96 KB
SRAM 32 KB
I-BUS
S-BUS
DMA1
PB[15:0]
PC[15:0]
PD[15:0]
PE[15:0]
PF[15:0]
PG[15:0]
PH[1:0]
GPIO PORT B
GPIO PORT C
GPIO PORT D
GPIO PORT E
GPIO PORT F
GPIO PORT G
GPIO PORT H
TIM8 / PWM
16b
16b
TIM16
16b
TIM17
16b
3 compl. channels (TIM1_CH[1:3]N),
4 channels (TIM1_CH[1:4]),
ETR, BKIN, BKIN2 as AF
1 channel,
1 compl. channel, BKIN as AF
1 channel,
1 compl. channel, BKIN as AF
DAC1_OUT2
16b
16b
SCL, SDA, SMBA as AF
SCL, SDA, SMBA as AF
MOSI, MISO, SCK, NSS as AF
TX, RX as AF
RX, TX, CTS, RTS as AF
RX, TX, CTS, RTS as AF
RX, TX, CK, CTS, RTS as AF
RX, TX, CK, CTS, RTS as AF
smcard
IrDA
smcard
IrDA
32b
16b
16b
32b
4 channels, ETR as AF
4 channels, ETR as AF
4 channels, ETR as AF
4 channels, ETR as AF
AHB/APB1
OSC_IN
OSC_OUT
HCLKx
XTAL OSC
4- 16MHz
8 analog inputs common
to the 3 ADCs
VREF+
USART2MBps
Temperature sensor
ADC1
ADC2
ADC3
IF
ITF
@ VDDA
8 analog inputs common
to the ADC1 & 2
8 analog inputs for ADC3
SAI1
MCLK_A, SD_A, FS_A, SCK_A, EXTCLK
MCLK_B, SD_B, FS_B, SCK_B as AF
SAI2
MCLK_A, SD_A, FS_A, SCK_A, EXTCLK
MCLK_B, SD_B, FS_B, SCK_B as AF
DFSDM
SDCKIN[7:0], SDDATIN[7:0],
SDCKOUT,SDTRIG as AF
Touch sensing controller
8 Groups of
3 channels max as AF
VOUT, VINM, VINP
LCD 8x40
LPUART1
SWPMI1
LPTIM1
LPTIM2
SEGx, COMx as AF
RX, TX, CTS, RTS as AF
IO
RX, TX, SUSPEND as AF
IN1, IN2, OUT, ETR as AF
IN1, OUT, ETR as AF
RC HSI
RC LSI
PLL 1&2&3
MSI
Quad SPI memory interface
BK1_IO[3:0]
CLK
NCS
@ VDDUSB
COMP1
INP, INM, OUT
COMP2
INP, INM, OUT
@ VDDA
RTC_OUT
FIFO
PHY
AHB1 80 MHz
CRC
I2C2/SMBUS
I2C3/SMBUS
bxCAN1
OpAmp1
SP3
SP2
UART5
UART4
LCD Booster
V
LCD
V
LCD
= 2.5V to 3.6V
APB2 80MHz
AHB2 80 MHz
OpAmp2
@VDDA
Firewall
VREF Buffer
@ VDDA
@ VDD
DP
DM
SCL, SDA, INTN, ID, VBUS, SOF
VDD = 1.71 to 3.6 V
VSS
VDDA, VSSA
VDD, VSS, NRST
VDDIO2, VDDUSB
VOUT, VINM, VINP
TRACECLK
TRACED[3:0]
NJTRST, JTDI,
JTCK/SWCLK
JTDO/SWD, JTDO
VDD12 = 1.05 to 1.32 V
(1)
VDD12
1. Only available when using external SMPS supply mode.
DAC1
Figure 1. STM32L476xx block diagram
Note:AF: alternate function on I/O pins.
60
DS10198 Rev 817/270
Page 18
Functional overviewSTM32L476xx
3 Functional overview
3.1 Arm® Cortex®-M4 core with FPU
The Arm® Cortex®-M4 with FPU processor is the latest generation of Arm® processors for
embedded systems. It was developed to provide a low-cost platform that meets the needs of
MCU implementation, with a reduced pin count and low-power consumption, while
delivering outstanding computational performance and an advanced response to interrupts.
The Arm® Cortex®-M4 with FPU 32-bit RISC processor features exceptional codeefficiency, delivering the high-performance expected from an Arm
usually associated with 8- and 16-bit devices.
The processor supports a set of DSP instructions which allow efficient signal processing and
complex algorithm execution.
Its single precision FPU speeds up software development by using metalanguage
development tools, while avoiding saturation.
With its embedded Arm® core, the STM32L476xx family is compatible with all Arm® tools
and software.
Figure 1 shows the general block diagram of the STM32L476xx family devices.
The ART Accelerator™ is a memory accelerator which is optimized for STM32 industrystandard Arm
the Arm
processor to wait for the Flash memory at higher frequencies.
To release the processor near 100 DMIPS performance at 80MHz, the accelerator
implements an instruction prefetch queue and branch cache, which increases program
execution speed from the 64-bit Flash memory. Based on CoreMark benchmark, the
performance achieved thanks to the ART accelerator is equivalent to 0 wait state program
execution from Flash memory at a CPU frequency up to 80 MHz.
®
®
Cortex®-M4 processors. It balances the inherent performance advantage of
Cortex®-M4 over Flash memory technologies, which normally requires the
3.3 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. This memory area is organized into up to 8 protected areas that can in turn be divided
up into 8 subareas. The protection area sizes are between 32 bytes and the whole 4
gigabytes of addressable memory.
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 (realtime 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.
18/270DS10198 Rev 8
Page 19
STM32L476xxFunctional overview
3.4 Embedded Flash memory
STM32L476xx devices feature up to 1 Mbyte of embedded Flash memory available for
storing programs and data. The Flash memory is divided into two banks allowing readwhile-write operations. This feature allows to perform a read operation from one bank while
an erase or program operation is performed to the other bank. The dual bank boot is also
supported. Each bank contains 256 pages of 2
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-M4 JTAG and serial
wire), boot in RAM and bootloader selection are disabled (JTAG fuse). This
selection is irreversible.
Table 3. Access status versus readout protection level and execution modes
Kbyte.
Area
Main
memory
System
memory
Option
bytes
Backup
registers
SRAM2
1. Erased when RDP change from Level 1 to Level 0.
Protection
level
1YesYesYesNoNoNo
2YesYesYesN/AN/AN/A
1YesNoNoYesNoNo
2YesNoNoN/AN/AN/A
1YesYesYesYesYesYes
2YesNoNoN/AN/AN/A
1YesYesN/A
2YesYesN/AN/AN/AN/A
1YesYesYes
2YesYesYesN/AN/AN/A
User execution
ReadWriteEraseReadWriteErase
(1)
(1)
Debug, boot from RAM or boot
from system memory (loader)
NoNoN/A
NoNoNo
•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 an instruction code, while all other
accesses (DMA, debug and CPU data read, write and erase) are strictly prohibited.
One area per bank can be selected, with 64-bit granularity. An additional option bit
(PCROP_RDP) allows to select if the PCROP area is erased or not when the RDP
protection is changed from Level 1 to Level 0.
(1)
(1)
DS10198 Rev 819/270
60
Page 20
Functional overviewSTM32L476xx
The whole non-volatile memory embeds the error correction code (ECC) feature supporting:
•single error detection and correction
•double error detection.
•The address of the ECC fail can be read in the ECC register
3.5 Embedded SRAM
STM32L476xx devices feature up to 128 Kbyte of embedded SRAM. This SRAM is split into
two blocks:
•96 Kbyte mapped at address 0x2000 0000 (SRAM1)
•32 Kbyte located at address 0x1000 0000 with hardware parity check (SRAM2).
This block is accessed through the ICode/DCode buses for maximum performance.
These 32 Kbyte SRAM can also be retained in Standby mode.
The SRAM2 can be write-protected with 1 Kbyte granularity.
The memory can be accessed in read/write at CPU clock speed with 0 wait states.
3.6 Firewall
The device embeds a Firewall which protects code sensitive and secure data from any
access performed by a code executed outside of the protected areas.
Each illegal access generates a reset which kills immediately the detected intrusion.
The Firewall main features are the following:
•Three segments can be protected and defined thanks to the Firewall registers:
–Code segment (located in Flash or SRAM1 if defined as executable protected
area)
–Non-volatile data segment (located in Flash)
–Volatile data segment (located in SRAM1)
•The start address and the length of each segments are configurable:
–Code segment: up to 1024 Kbyte with granularity of 256 bytes
–Non-volatile data segment: up to 1024 Kbyte with granularity of 256 bytes
–Volatile data segment: up to 96 Kbyte with a granularity of 64 bytes
•Specific mechanism implemented to open the Firewall to get access to the protected
areas (call gate entry sequence)
•Volatile data segment can be shared or not with the non-protected code
•Volatile data segment can be executed or not depending on the Firewall configuration
The Flash readout protection must be set to level 2 in order to reach the expected level of
protection.
20/270DS10198 Rev 8
Page 21
STM32L476xxFunctional overview
3.7 Boot modes
At startup, BOOT0 pin and BOOT1 option bit are used to select one of three boot options:
•Boot from user Flash
•Boot from system memory
•Boot from embedded SRAM
The boot loader is located in system memory. It is used to reprogram the Flash memory by
using USART, I2C, SPI, CAN or USB OTG FS in Device mode through DFU (device
firmware upgrade).
3.8 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 linktime and stored at a given memory location.
3.9 Power supply management
3.9.1 Power supply schemes
•VDD = 1.71 to 3.6 V: external power supply for I/Os (V
the system analog such as reset, power management and internal clocks. It is provided
externally through VDD pins.
•V
•V
•V
•V
•V
•V
Note:When the functions supplied by V
should preferably be shorted to V
= 1.05 to 1.32 V: external power supply bypassing internal regulator when
DD12
connected to an external SMPS. It is provided externally through VDD12 pins and only
available on packages with the external SMPS supply option. VDD12 does not require
any external decoupling capacitance and cannot support any external load.
= 1.62 V (ADCs/COMPs) / 1.8 (DAC/OPAMPs) to 3.6 V: external analog power
DDA
supply for ADCs, DAC, OPAMPs, Comparators and Voltage reference buffer. The V
voltage level is independent from the V
= 3.0 to 3.6 V: external independent power supply for USB transceivers. The
DDUSB
V
voltage level is independent from the VDD voltage.
DDUSB
= 1.08 to 3.6 V: external power supply for 14 I/Os (PG[15:2]). The V
DDIO2
voltage level is independent from the V
= 2.5 to 3.6 V: the LCD controller can be powered either externally through VLCD
LCD
pin, or internally from an internal voltage generated by the embedded step-up
converter.
= 1.55 to 3.6 V: power supply for RTC, external clock 32 kHz oscillator and
BAT
backup registers (through power switch) when V
, V
DDA
.
DD
DD
DD
DDUSB
voltage.
voltage.
or V
DDIO2
), the internal regulator and
DDIO1
is not present.
DD
are not used, these supplies
DDIO2
DDA
DS10198 Rev 821/270
60
Page 22
Functional overviewSTM32L476xx
MSv45700V1
Low voltage detector
V
DDA
V
DDA
domain
V
SS
V
DD
V
BAT
3 x A/D converters
2 x comparators
2 x D/A converters
2 x operational amplifiers
Voltage reference buffer
Note:If these supplies are tied to ground, the I/Os supplied by these power supplies are not 5 V
tolerant (refer to
Tabl e 20: Voltage characteristics).
Note:V
DDIOx
V
DDIO2
is the I/Os general purpose digital functions supply. V
, with V
DDIO1
= VDD. V
supply voltage level is independent from V
DDIO2
Figure 2. Power supply overview
represents V
DDIOx
DDIO1
DDIO1
or
.
During power-up and power-down phases, the following power sequence requirements
must be respected:
•When VDD is below 1 V, other power supplies (V
•When V
During the power-down phase, VDD can temporarily become lower than other supplies only
if the energy provided to the MCU remains below 1
capacitors to be discharged with different time constants during the power-down transient
phase.
remain below V
, V
+ 300 mV.
DD
is above 1 V, all power supplies are independent.
DD
DDA
mJ; this allows external decoupling
DDUSB
, V
DDIO2
, V
LCD
) must
22/270DS10198 Rev 8
Page 23
STM32L476xxFunctional overview
MSv47490V1
0.3
1
V
BOR0
3.6
Operating modePower-onPower-downtime
V
V
DDX
(1)
V
DD
Invalid supply areaV
DDX
< V
DD
+ 300 mV
V
DDX
independent from V
DD
Figure 3. Power-up/down sequence
1. V
refers to any power supply among V
DDX
3.9.2 Power supply supervisor
The device has an integrated ultra-low-power brown-out reset (BOR) active in all modes
except Shutdown and ensuring proper operation after power-on and during power down.
The device remains in reset mode when the monitored supply voltage V
specified threshold, without the need for an external reset circuit.
The lowest BOR level is 1.71V at power on, and other higher thresholds can be selected
through option bytes.The device features an embedded programmable voltage detector
(PVD) that monitors the V
interrupt can be generated when V
higher than the VPVD threshold. 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.
In addition, the device embeds a Peripheral Voltage Monitor which compares the
independent supply voltages V
that the peripheral is in its functional supply range.
power supply and compares it to the VPVD threshold. An
DD
DDA
, V
DDA
drops below the VPVD threshold and/or when VDD is
DD
, V
DDUSB
DDUSB
, V
, V
, V
LCD
.
is below a
DD
DDIO2
with a fixed threshold in order to ensure
DDIO2
DS10198 Rev 823/270
60
Page 24
Functional overviewSTM32L476xx
3.9.3 Voltage regulator
Two embedded linear voltage regulators supply most of the digital circuitries: the main
regulator (MR) and the low-power regulator (LPR).
•The MR is used in the Run and Sleep modes and in the Stop 0 mode.
•The LPR is used in Low-Power Run, Low-Power Sleep, Stop 1 and Stop 2 modes. It is
also used to supply the 32 Kbyte SRAM2 in Standby with SRAM2 retention.
•Both regulators are in power-down in Standby and Shutdown modes: the regulator
output is in high impedance, and the kernel circuitry is powered down thus inducing
zero consumption.
The ultralow-power STM32L476xx supports dynamic voltage scaling to optimize its power
consumption in run mode. The voltage from the Main Regulator that supplies the logic
(V
There are two power consumption ranges:
•Range 1 with the CPU running at up to 80 MHz.
•Range 2 with a maximum CPU frequency of 26 MHz. All peripheral clocks are also
) can be adjusted according to the system’s maximum operating frequency.
CORE
limited to 26 MHz.
The V
can be supplied by the low-power regulator, the main regulator being switched
CORE
off. The system is then in Low-power run mode.
•Low-power run mode with the CPU running at up to 2 MHz. Peripherals with
independent clock can be clocked by HSI16.
When the MR is in use, the STM32L476xx with the external SMPS option allows to force an
external V
When V
DD12
supply on the VDD12 supply pins.
CORE
is forced by an external source and is higher than the output of the internal
LDO, the current is taken from this external supply and the overall power efficiency is
significantly improved if using an external step down DC/DC converter.
3.9.4 Low-power modes
The ultra-low-power STM32L476xx supports seven low-power modes to achieve the best
compromise between low-power consumption, short startup time, available peripherals and
available wakeup sources.
24/270DS10198 Rev 8
Page 25
STM32L476xxFunctional overview
Table 4. STM32L476xx modes overview
DS10198 Rev 825/270
Mode
Regulator
(1)
CPUFlash SRAMClocksDMA & Peripherals
MR
range 1
SMPS
range 2
High
Run
YesON
MR
range2
SMPS
range 2
Low
LPRunLPRYesON
MR range
1
SMPS
range 2
High
Sleep
NoON
MR
range2
SMPS
range 2
Low
LPSleepLPRNoON
(4)
(4)
(4)
(4)
ONAny
ON
ON
ON
(7)
(7)
except
except
Any
PLL
Any
Any
PLL
(2)
Wakeup sourceConsumption
112µA/MHz
All
40µA/MHz
N/A
100 µA/MHz
All except OTG_FS, RNG
39µA/MHz
All except OTG_FS, RNGN/A136 µA/MHz
37 µA/MHz
All
13 µA/MHz
Any interrupt or
event
35 µA/MHz
All except OTG_FS, RNG
15 µA/MHz
All except OTG_FS, RNG
Any interrupt or
event
40 µA/MHz6 cycles
(3)
(5)
(6)
to Range 1: 4 µs
to Range 2: 64 µs
(5)
(6)
Wakeup time
N/A
6 cycles
6 cycles
Page 26
26/270DS10198 Rev 8
Table 4. STM32L476xx modes overview (continued)
Functional overviewSTM32L476xx
Mode
Stop 0
Regulator
(1)
Range 1
Range 2
CPUFlash SRAMClocksDMA & Peripherals
(8)
NoOffON
(8)
Stop 1LPRNoOffON
LSE
LSI
LSE
LSI
(2)
BOR, PVD, PVM
RTC, LCD, IWDG
COMPx (x=1,2)
DAC1
OPAMPx (x=1,2)
USARTx (x=1...5)
LPUART1
I2Cx (x=1...3)
(9)
(9)
(10)
LPTIMx (x=1,2)
***
All other peripherals are
frozen.
BOR, PVD, PVM
RTC, LCD, IWDG
COMPx (x=1,2)
DAC1
OPAMPx (x=1,2)
USARTx (x=1...5)
LPUART1
I2Cx (x=1...3)
(9)
(9)
(10)
LPTIMx (x=1,2)
***
All other peripherals are
frozen.
Wakeup sourceConsumption
Reset pin, all I/Os
BOR, PVD, PVM
RTC, LCD, IWDG
COMPx (x=1..2)
USARTx (x=1...5)
LPUART1
I2Cx (x=1...3)
(9)
(9)
108 µA
(10)
LPTIMx (x=1,2)
OTG_FS
SWPMI1
(11)
(12)
Reset pin, all I/Os
BOR, PVD, PVM
RTC, LCD, IWDG
COMPx (x=1..2)
(9)
USARTx (x=1...5)
LPUART1
I2Cx (x=1...3)
(9)
(10)
6.6 µA w/o RTC
6.9 µA w RTC
LPTIMx (x=1,2)
OTG_FS
SWPMI1
(11)
(12)
(3)
0.7 µs in SRAM
4.5 µs in Flash
Wakeup time
4 µs in SRAM
6 µs in Flash
Page 27
Table 4. STM32L476xx modes overview (continued)
STM32L476xxFunctional overview
DS10198 Rev 827/270
Mode
Regulator
(1)
CPUFlash SRAMClocksDMA & Peripherals
Stop 2LPRNoOffON
LPR
Standby
OFF
ShutdownOFF
Powered
Off
Powered
Off
Off
Off
Powered
Powered
SRAM2
ON
Off
Off
LSE
LSI
LSE
LSI
LSE
(2)
BOR, PVD, PVM
RTC, LCD, IWDG
COMPx (x=1..2)
(10)
I2C3
LPUART1
(9)
LPTIM1
***
All other peripherals are
frozen.
BOR, RTC, IWDG
***
All other peripherals are
powered off.
***
I/O configuration can be
floating, pull-up or pull-down
RTC
***
All other peripherals are
powered off.
***
I/O configuration can be
floating, pull-up or pull-
down
(14)
Wakeup sourceConsumption
Reset pin, all I/Os
BOR, PVD, PVM
RTC, LCD, IWDG
COMPx (x=1..2)
(10)
I2C3
LPUART1
(9)
1.1 µA w/o RTC
1.4 µA w/RTC
LPTIM1
0.35 µA w/o RTC
0.65 µA w/ RTC
Reset pin
5 I/Os (WKUPx)
BOR, RTC, IWDG
(13)
0.12 µA w/o RTC
0.42 µA w/ RTC
Reset pin
5 I/Os (WKUPx)
RTC
0.03 µA w/o RTC
(13)
0.33 µA w/ RTC
(3)
Wakeup time
5 µs in SRAM
7 µs in Flash
14 µs
256 µs
1. LPR means Main regulator is OFF and Low-power regulator is ON.
2. All peripherals can be active or clock gated to save power consumption.
3. Typical current at V
LPRun/LPSleep.
4. The Flash memory can be put in power-down and its clock can be gated off when executing from SRAM.
5. Theoretical value based on V
6. Theoretical value based on V
7. The SRAM1 and SRAM2 clocks can be gated on or off independently.
= 1.8 V, 25°C. Consumptions values provided running from SRAM, Flash memory Off, 80 MHz in Range 1, 26 MHz in Range 2, 2 MHz in
DD
= 3.3 V, DC/DC Efficiency of 85%, V
DD
= 3.3 V, DC/DC Efficiency of 85%, V
DD
CORE
CORE
= 1.10 V
= 1.05 V
Page 28
28/270DS10198 Rev 8
8. SMPS mode can be used in STOP0 Mode, but no significant power gain can be expected.
9. U(S)ART and LPUART reception is functional in Stop mode, and generates a wakeup interrupt on Start, address match or received frame event.
10. I2C address detection is functional in Stop mode, and generates a wakeup interrupt in case of address match.
11. OTG_FS wakeup by resume from suspend and attach detection protocol event.
12. SWPMI1 wakeup by resume from suspend.
13. The I/Os with wakeup from Standby/Shutdown capability are: PA0, PC13, PE6, PA2, PC5.
14. I/Os can be configured with internal pull-up, pull-down or floating in Shutdown mode but the configuration is lost when exiting the Shutdown mode.
Functional overviewSTM32L476xx
Page 29
STM32L476xxFunctional overview
By default, the microcontroller is in Run mode after a system or a 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 lowpower run mode.
•Stop 0, Stop 1 and Stop 2 modes
Stop mode achieves the lowest power consumption while retaining the content of
SRAM and registers. All clocks in the V
domain are stopped, the PLL, the MSI
CORE
RC, the HSI16 RC and the HSE crystal oscillators are disabled. The LSE or LSI is still
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
to detect their wakeup condition.
Three Stop modes are available: Stop 0, Stop 1 and Stop 2 modes. In Stop 2 mode,
most of the V
domain is put in a lower leakage mode.
CORE
Stop 1 offers the largest number of active peripherals and wakeup sources, a smaller
wakeup time but a higher consumption than Stop 2. In Stop 0 mode, the main regulator
remains ON, allowing a very fast wakeup time but with much higher consumption.
The system clock when exiting from Stop 0, Stop 1 or Stop 2 modes can be either MSI
up to 48 MHz or HSI16, depending on software configuration.
•Standby mode
The Standby mode is used to achieve the lowest power consumption with BOR. The
internal regulator is switched off so that the V
domain is powered off. The PLL, the
CORE
MSI RC, the HSI16 RC and the HSE crystal oscillators are also switched off.
The RTC can remain active (Standby mode with RTC, Standby mode without RTC).
The brown-out reset (BOR) always remains active in Standby mode.
The state of each I/O during standby mode can be selected by software: I/O with
internal pull-up, internal pull-down or floating.
After entering Standby mode, SRAM1 and register contents are lost except for registers
in the Backup domain and Standby circuitry. Optionally, SRAM2 can be retained in
Standby mode, supplied by the low-power Regulator (Standby with SRAM2 retention
mode).
The device exits Standby mode when an external reset (NRST pin), an IWDG reset,
WKUP pin event (configurable rising or falling edge), or an RTC event occurs (alarm,
periodic wakeup, timestamp, tamper) or a failure is detected on LSE (CSS on LSE).
The system clock after wakeup is MSI up to 8 MHz.
DS10198 Rev 829/270
60
Page 30
Functional overviewSTM32L476xx
•Shutdown mode
The Shutdown mode allows to achieve the lowest power consumption. The internal
regulator is switched off so that the V
domain is powered off. The PLL, the HSI16,
CORE
the MSI, the LSI and the HSE oscillators are also switched off.
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 the switch to Backup domain is not supported.
SRAM1, SRAM2 and register contents are lost except for registers in the Backup
domain.
The device exits Shutdown mode when an external reset (NRST pin), a WKUP pin
event (configurable rising or falling edge), or an RTC event occurs (alarm, periodic
wakeup, timestamp, tamper).
The system clock after wakeup is MSI at 4 MHz.
30/270DS10198 Rev 8
Page 31
STM32L476xxFunctional overview
Table 5. Functionalities depending on the working mode
(1)
Stop 0/1Stop 2Standby Shutdown
PeripheralRunSleep
Low-
power
run
Low-
power
sleep
VBAT
-
-
Wakeup capability
Wakeup capability
-
Wakeup capability
-
Wakeup capability
CPUY-Y----------
Flash memory (up to
1 MB)
SRAM1 (up to
96 KB)
SRAM2 (32 KB)YY
FSMCOOOO-
Quad SPIOOOO-
Backup RegistersYYYYY
Brown-out reset
(BOR)
(2)
O
YY
(2)
O
(3)
(3)
(2)
O
YY
YY
(2)
O
(3)
(3)
---------
Y-Y------
Y-Y-O
YYYYY
(4)
----
--------
--------
-Y-Y-Y-Y
YYYYY- --
Programmable
Voltage Detector
OOOOOOOO- ----
(PVD)
Peripheral Voltage
Monitor (PVMx;
OOOOO
OOO- ----
x=1,2,3,4)
DMAOOOO-
High Speed Internal
(HSI16)
High Speed External
(HSE)
OOOO
OOOO-
--------
(5)
(5)
-
------
--------
Low Speed Internal
(LSI)
Low Speed External
(LSE)
Multi-Speed Internal
(MSI)
Clock Security
System (CSS)
Clock Security
System on LSE
OOOOO
OOOOO
OOOO-
OOOO-
OOOOO
-O-O----
-O-O-O-O
--------
--------
OOOOO- --
RTC / Auto wakeupOOOOOOOOOOOOO
Number of RTC
Tamper pins
33333
O3O3O3O3
DS10198 Rev 831/270
60
Page 32
Functional overviewSTM32L476xx
Table 5. Functionalities depending on the working mode
(1)
(continued)
Stop 0/1Stop 2Standby Shutdown
PeripheralRunSleep
Low-
power
run
Low-
power
sleep
VBAT
-
-
Wakeup capability
Wakeup capability
-
Wakeup capability
-
Wakeup capability
LCDOOOOOOOO- ----
USB OTG FSO
USARTx
(x=1,2,3,4,5)
Low-power UART
(LPUART)
(8)
OOOOO
OOOOO
I2Cx (x=1,2)OOOOO
I2C3OOOOO
SPIx (x=1,2,3)OOOO-
CANOOOO-
SDMMC1OOOO-
(8)
O
---O- ------
(6)O(6)
(6)O(6)O(6)O(6)
(7)O(7)
(7)O(7)O(7)O(7)
-------
-----
-------
-----
--------
--------
--------
SWPMI1OOOO-
SAIx (x=1,2)OOOO-
DFSDM1 OOOO-
ADCx (x=1,2,3)OOOO-
DAC1OOOOO
VREFBUFOOOOO
OPAMPx (x=1,2)OOOOO
COMPx (x=1,2)OOOOO
Temperature sensorOOOO-
Timers (TIMx)OOOO-
Low-power timer 1
(LPTIM1)
Low-power timer 2
(LPTIM2)
Independent
watchdog (IWDG)
Window watchdog
(WWDG)
OOOOOOOO- ----
OOOOO
OOOOO
OOOO-
O- ------
--------
--------
--------
--------
--------
--------
OOO- ----
--------
--------
O- ------
OOOOO- --
--------
SysTick timerOOOO---------
Touch sensing
controller (TSC)
OOOO---------
32/270DS10198 Rev 8
Page 33
STM32L476xxFunctional overview
Table 5. Functionalities depending on the working mode
(1)
(continued)
Stop 0/1Stop 2Standby Shutdown
PeripheralRunSleep
Random number
generator (RNG)
(8)
O
Low-
power
run
(8)
O
Low-
power
sleep
-
-
Wakeup capability
Wakeup capability
-
-
Wakeup capability
VBAT
Wakeup capability
-----------
CRC calculation unitOOOO---------
5
GPIOsOOOOO
1. Legend: Y = Yes (Enable). O = Optional (Disable by default. Can be enabled by software). - = Not available.
2. The Flash can be configured in power-down mode. By default, it is not in power-down mode.
3. The SRAM clock can be gated on or off.
4. SRAM2 content is preserved when the bit RRS is set in PWR_CR3 register.
5. Some peripherals with wakeup from Stop capability can request HSI16 to be enabled. In this case, HSI16 is woken up by
the peripheral, and only feeds the peripheral which requested it. HSI16 is automatically put off when the peripheral does not
need it anymore.
6. UART and LPUART reception is functional in Stop mode, and generates a wakeup interrupt on Start, address match or
received frame event.
7. I2C address detection is functional in Stop mode, and generates a wakeup interrupt in case of address match.
8. Voltage scaling Range 1 only.
9. I/Os can be configured with internal pull-up, pull-down or floating in Standby mode.
10. The I/Os with wakeup from Standby/Shutdown capability are: PA0, PC13, PE6, PA2, PC5.
11. I/Os can be configured with internal pull-up, pull-down or floating in Shutdown mode but the configuration is lost when
exiting the Shutdown mode.
OOO
(9)
pins
(10)
(11)
5
pins
(10)
-
3.9.5 Reset mode
In order to improve the consumption under reset, the I/Os state under and after reset is
“analog state” (the I/O schmitt trigger is disable). In addition, the internal reset pull-up is
deactivated when the reset source is internal.
3.9.6 VBAT operation
The VBAT pin allows to power the device VBAT domain from an external battery, an external
supercapacitor, or from V
present. The VBAT pin supplies the RTC with LSE and the backup registers. Three antitamper detection pins are available in VBAT mode.
VBAT operation is automatically activated when VDD is not present.
An internal VBAT battery charging circuit is embedded and can be activated when VDD is
present.
Note:When the microcontroller is supplied from VBAT, external interrupts and RTC alarm/events
do not exit it from VBAT operation.
when no external battery and an external supercapacitor are
DD
DS10198 Rev 833/270
60
Page 34
Functional overviewSTM32L476xx
3.10 Interconnect matrix
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, low-power run
and sleep, Stop 0, Stop 1 and Stop 2 modes.
The clock controller (see Figure 4) 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: four different clock sources can be used to drive the master
clock SYSCLK:
–4-48 MHz high-speed external crystal or ceramic resonator (HSE), that can supply
a 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, that can
supply a PLL
–Multispeed internal RC oscillator (MSI), trimmable by software, able to generate
12 frequencies from 100 kHz to 48 MHz. When a 32.768 kHz clock source is
available in the system (LSE), the MSI frequency can be automatically trimmed by
hardware to reach better than ±0.25% accuracy. In this mode the MSI can feed the
USB device, saving the need of an external high-speed crystal (HSE). The MSI
can supply a PLL.
–System PLL which can be fed by HSE, HSI16 or MSI, with a maximum frequency
at 80 MHz.
•Auxiliary clock source: two ultralow-power clock sources that can be used to drive
the LCD controller and the real-time clock:
–32.768 kHz low-speed external crystal (LSE), supporting four drive capability
modes. The LSE can also be configured in bypass mode for an external clock.
–32 kHz low-speed internal RC (LSI), also used to drive the independent watchdog.
The LSI clock accuracy is ±5% accuracy.
•Peripheral clock sources: Several peripherals (USB, SDMMC, RNG, SAI, USARTs,
I2Cs, LPTimers, ADC, SWPMI) have their own independent clock whatever the system
clock. Three PLLs, each having three independent outputs allowing the highest
flexibility, can generate independent clocks for the ADC, the USB/SDMMC/RNG and
the two SAIs.
•Startup clock: after reset, the microcontroller restarts by default with an internal 4 MHz
clock (MSI). The prescaler ratio and clock source can be changed by the application
program as soon as the code execution starts.
•Clock security system (CSS): this feature can be enabled by software. If a HSE clock
failure occurs, the master clock is automatically switched to HSI16 and a software
36/270DS10198 Rev 8
Page 37
STM32L476xxFunctional overview
interrupt is generated if enabled. LSE failure can also be detected and generated an
interrupt.
•Clock-out capability:
–MCO: microcontroller clock output: it outputs one of the internal clocks for
external use by the application. Low frequency clocks (LSI, LSE) are available
down to Stop 1 low power state.
–LSCO: low speed clock output: it outputs LSI or LSE in all low-power modes
down to Standby mode. LSE can also be output on LSCO in Shutdown mode.
LSCO is not available in VBAT mode.
Several prescalers allow to configure the AHB frequency, the high speed APB (APB2) and
the low speed APB (APB1) domains. The maximum frequency of the AHB and the APB
domains is 80 MHz.
DS10198 Rev 837/270
60
Page 38
Functional overviewSTM32L476xx
PLLCLK
MS32440V3
SYSCLK
MCO
LSCO
SAI2_EXTCLK
48 MHz clock to USB, RNG, SDMMC
to ADC
to IWDG
to RTC and LCD
to PWR
HCLK
to AHB bus, core, memory and DMA
FCLK Cortex free running clock
to Cortex system timer
to APB1 peripherals
to APB2 peripherals
PCLK1
PCLK2
to SAI1
to SAI2
LSE
HSI16
SYSCLK
to USARTx
x=2..5
to LPUART1
to I2Cx
x=1,2,3
to LPTIMx
x=1,2
SAI1_EXTCLK
to SWPMI
to TIMx
x=2..7
OSC32_OUT
OSC32_IN
MSI
HSI16
HSE
HSI16
LSI
LSE
HSE
SYSCLK
HSE
MSI
HSI16
MSI
SYSCLK
LSE OSC
32.768 kHz
/32
AHB
PRESC
/ 1,2,..512
/ 8
APB1
PRESC
/ 1,2,4,8,16
x1 or x2
HSI16
SYSCLK
LSI
LSE
HSI16
HSI16
APB2
PRESC
/ 1,2,4,8,16
to TIMx
x=1,8,15,16,17
x1 or x2
to
USART1
LSE
HSI16
SYSCLK
/ M
MSI RC
100 kHz – 48 MHz
HSI RC
16 MHz
HSE OSC
4-48 MHz
Clock
detector
OSC_OUT
OSC_IN
/ 1→16
LSI RC 32 kHz
Clock
source
control
PLLSAI3CLK
PLL48M1CLK
PLLCLK
PLLSAI1CLK
PLL48M2CLK
PLLADC1CLK
PLLSAI2CLK
PLLADC2CLK
MSI
PLLSAI1
VCO
F
VCO
/ P
/ R
/ Q
PLLSAI2
VCO
F
VCO
/ P
/ R
/ Q
PLL
VCO
F
VCO
/ P
/ R
/ Q
Figure 4. Clock tree
38/270DS10198 Rev 8
Page 39
STM32L476xxFunctional overview
3.12 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. Most of the
GPIO pins are shared with digital or analog alternate functions. Fast I/O toggling can be
achieved thanks to their mapping on the AHB2 bus.
The I/Os alternate function configuration can be locked if needed following a specific
sequence in order to avoid spurious writing to the I/Os registers.
3.13 Direct memory access controller (DMA)
The device embeds 2 DMAs. Refer to Tab le 7: DMA implementation for the features
implementation.
Direct memory access (DMA) is used in order to provide high-speed data transfer between
peripherals and memory as well as memory to memory. Data can be quickly moved by DMA
without any CPU actions. This keeps CPU resources free for other operations.
The two DMA controllers have 14 channels in total, each dedicated to managing memory
access requests from one or more peripherals. Each has an arbiter for handling the priority
between DMA requests.
•Each channel is connected to dedicated hardware DMA requests, software trigger is
also supported on each channel. This configuration is done by software.
•Priorities between requests from channels of one DMA are software programmable (4
levels consisting of very high, high, medium, low) or hardware in case of equality
(request 1 has priority over request 2, etc.)
•Independent source and destination transfer size (byte, half word, word), emulating
packing and unpacking. Source/destination addresses must be aligned on the data
size.
•Support for circular buffer management
•3 event flags (DMA Half Transfer, DMA Transfer complete and DMA Transfer Error)
logically ORed together in a single interrupt request for each channel
•Memory-to-memory transfer
•Peripheral-to-memory and memory-to-peripheral, and peripheral-to-peripheral
transfers
•Access to Flash, SRAM, APB and AHB peripherals as source and destination
•Programmable number of data to be transferred: up to 65536.
The devices embed a nested vectored interrupt controller able to manage 16 priority levels,
and handle up to 81 maskable interrupt channels plus the 16 interrupt lines of the Cortex
M4.
•Interrupt entry vector table address passed directly to the core
•Allows early processing of interrupts
•Processing of late arriving higher priority interrupts
•Support for tail chaining
•Processor state automatically saved on interrupt entry, and restored on interrupt exit,
with no instruction overhead
The NVIC hardware block provides flexible interrupt management features with minimal
interrupt latency.
3.14.2 Extended interrupt/event controller (EXTI)
The extended interrupt/event controller consists of 40 edge detector lines used to generate
interrupt/event requests and wake-up the system from Stop mode. Each external line can be
independently configured to select the trigger event (rising edge, falling edge, both) and can
be masked independently. A pending register maintains the status of the interrupt requests.
The internal lines are connected to peripherals with wakeup from Stop mode capability. The
EXTI can detect an external line with a pulse width shorter than the internal clock period. Up
to 114 GPIOs can be connected to the 16 external interrupt lines.
®
-
40/270DS10198 Rev 8
Page 41
STM32L476xxFunctional overview
3.15 Analog to digital converter (ADC)
The device embeds 3 successive approximation analog-to-digital converters with the
following features:
•12-bit native resolution, with built-in calibration
•5.33 Msps maximum conversion rate with full resolution
–Down to 18.75 ns sampling time
–Increased conversion rate for lower resolution (up to 8.88 Msps for 6-bit
resolution)
•Up to 24 external channels, some of them shared between ADC1 and ADC2, or ADC1,
ADC2 and ADC3.
•5 internal channels: internal reference voltage, temperature sensor, VBAT/3,
DAC1_OUT1 and DAC1_OUT2.
•One external reference pin is available on some package, allowing the input voltage
range to be independent from the power supply
•Single-ended and differential mode inputs
•Low-power design
–Capable of low-current operation at low conversion rate (consumption decreases
linearly with speed)
–Dual clock domain architecture: ADC speed independent from CPU frequency
•Highly versatile digital interface
–Single-shot or continuous/discontinuous sequencer-based scan mode: 2 groups
of analog signals conversions can be programmed to differentiate background and
high-priority real-time conversions
–Handles two ADC converters for dual mode operation (simultaneous or
interleaved sampling modes)
–Each ADC support multiple trigger inputs for synchronization with on-chip timers
and external signals
–Results stored into 3 data register or in RAM with DMA controller support
–Data pre-processing: left/right alignment and per channel offset compensation
–Built-in oversampling unit for enhanced SNR
–Channel-wise programmable sampling time
–Three analog watchdog for automatic voltage monitoring, generating interrupts
and trigger for selected timers
–Hardware assistant to prepare the context of the injected channels to allow fast
context switching
3.15.1 Temperature sensor
The temperature sensor (TS) generates a voltage VTS that varies linearly with temperature.
The temperature sensor is internally connected to the ADC1_IN17 and ADC3_IN17 input
channels which is used 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 varies
from chip to chip due to process variation, the uncalibrated internal temperature sensor is
suitable for applications that detect temperature changes only.
DS10198 Rev 841/270
60
Page 42
Functional overviewSTM32L476xx
To improve the accuracy of the temperature sensor measurement, each device is
individually factory-calibrated by ST. The temperature sensor factory calibration data are
stored by ST in the system memory area, accessible in read-only mode.
Calibration value nameDescriptionMemory address
TS_CAL1
TS_CAL2
Table 8. Temperature sensor calibration values
TS ADC raw data acquired at a
temperature of 30 °C (± 5 °C),
V
= V
DDA
TS ADC raw data acquired at a
temperature of 110 °C (± 5 °C),
V
= V
DDA
= 3.0 V (± 10 mV)
REF+
= 3.0 V (± 10 mV)
REF+
0x1FFF 75A8 - 0x1FFF 75A9
0x1FFF 75CA - 0x1FFF 75CB
3.15.2 Internal voltage reference (V
The internal voltage reference (VREFINT) provides a stable (bandgap) voltage output for
the ADC and Comparators. VREFINT is internally connected to the ADC1_IN0 input
channel. The precise voltage of VREFINT is individually measured for each part by ST
during production test and stored in the system memory area. It is accessible in read-only
mode.
3.15.3 V
This embedded hardware feature allows the application to measure the V
using the internal ADC channel ADC1_IN18 or ADC3_IN18. As the V
higher than V
connected to a bridge divider by 3. As a consequence, the converted digital value is one
third the V
Calibration value nameDescriptionMemory address
battery voltage monitoring
BAT
BAT
Table 9. Internal voltage reference calibration values
Raw data acquired at a
VREFINT
, and thus outside the ADC input range, the VBAT pin is internally
DDA
temperature of 30 °C (± 5 °C),
V
DDA
voltage.
REFINT
= V
REF+
)
= 3.0 V (± 10 mV)
0x1FFF 75AA - 0x1FFF 75AB
battery voltage
BAT
voltage may be
BAT
3.16 Digital to analog converter (DAC)
Two 12-bit buffered DAC channels can be used to convert digital signals into analog voltage
signal outputs. The chosen design structure is composed of integrated resistor strings and
an amplifier in inverting configuration.
42/270DS10198 Rev 8
Page 43
STM32L476xxFunctional overview
MSv40197V1
VREFBUF
Low frequency
cut-off capacitor
DAC, ADC
Bandgap+
V
DDA
-
100 nF
VREF+
This digital interface supports the following features:
•Up to two DAC output channels
•8-bit or 12-bit output mode
•Buffer offset calibration (factory and user trimming)
•Left or right data alignment in 12-bit mode
•Synchronized update capability
•Noise-wave generation
•Triangular-wave generation
•Dual DAC channel independent or simultaneous conversions
•DMA capability for each channel
•External triggers for conversion
•Sample and hold low-power mode, with internal or external capacitor
The DAC channels are triggered through the timer update outputs that are also connected
to different DMA channels.
3.17 Voltage reference buffer (VREFBUF)
The STM32L476xx devices embed an voltage reference buffer which can be used as
voltage reference for ADCs, DAC and also as voltage reference for external components
through the VREF+ pin.
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 off.
The VREF+ pin is double-bonded with VDDA on some packages. In these packages the
internal voltage reference buffer is not available.
Figure 5. Voltage reference buffer
DS10198 Rev 843/270
60
Page 44
Functional overviewSTM32L476xx
3.18 Comparators (COMP)
The STM32L476xx devices embed two rail-to-rail comparators with programmable
reference voltage (internal or external), hysteresis and speed (low speed for low-power) and
with selectable output polarity.
The reference voltage can be one of the following:
•External I/O
•DAC output channels
•Internal reference voltage or submultiple (1/4, 1/2, 3/4).
All comparators can wake up from Stop mode, generate interrupts and breaks for the timers
and can be also combined into a window comparator.
3.19 Operational amplifier (OPAMP)
The STM32L476xx embeds two operational amplifiers with external or internal follower
routing and PGA capability.
The operational amplifier features:
•Low input bias current
•Low offset voltage
•Low-power mode
•Rail-to-rail input
3.20 Touch sensing controller (TSC)
The touch sensing controller provides a simple solution for adding capacitive sensing
functionality to any application. Capacitive sensing technology is able to detect finger
presence near an electrode which is protected from direct touch by a dielectric (glass,
plastic, ...). The capacitive variation introduced by the finger (or any conductive object) is
measured using a proven implementation based on a surface charge transfer acquisition
principle.
The touch sensing controller is fully supported by the STMTouch touch sensing firmware
library which is free to use and allows touch sensing functionality to be implemented reliably
in the end application.
44/270DS10198 Rev 8
Page 45
STM32L476xxFunctional overview
The main features of the touch sensing controller are the following:
•Proven and robust surface charge transfer acquisition principle
•Supports up to 24 capacitive sensing channels
•Up to 3 capacitive sensing channels can be acquired in parallel offering a very good
response time
•Spread spectrum feature to improve system robustness in noisy environments
•Full hardware management of the charge transfer acquisition sequence
•Programmable charge transfer frequency
•Programmable sampling capacitor I/O pin
•Programmable channel I/O pin
•Programmable max count value to avoid long acquisition when a channel is faulty
•Dedicated end of acquisition and max count error flags with interrupt capability
•One sampling capacitor for up to 3 capacitive sensing channels to reduce the system
components
•Compatible with proximity, touchkey, linear and rotary touch sensor implementation
•Designed to operate with STMTouch touch sensing firmware library
Note:The number of capacitive sensing channels is dependent on the size of the packages and
subject to I/O availability.
3.21 Liquid crystal display controller (LCD)
The LCD drives up to 8 common terminals and 44 segment terminals to drive up to 320
pixels.
•Internal step-up converter to guarantee functionality and contrast control irrespective of
V
. This converter can be deactivated, in which case the VLCD pin is used to provide
DD
the voltage to the LCD
•Supports static, 1/2, 1/3, 1/4 and 1/8 duty
•Supports static, 1/2, 1/3 and 1/4 bias
•Phase inversion to reduce power consumption and EMI
•Integrated voltage output buffers for higher LCD driving capability
•Up to 8 pixels can be programmed to blink
•Unneeded segments and common pins can be used as general I/O pins
•LCD RAM can be updated at any time owing to a double-buffer
•The LCD controller can operate in Stop mode
3.22 Digital filter for Sigma-Delta Modulators (DFSDM)
The device embeds one DFSDM with 4 digital filters modules and 8 external input serial
channels (transceivers) or alternately 8 internal parallel inputs support.
The DFSDM peripheral is dedicated to interface the external modulators to
microcontroller and then to perform digital filtering of the received data streams (which
represent analog value on modulators inputs). DFSDM can also interface PDM (Pulse
Density Modulation) microphones and perform PDM to PCM conversion and filtering in
DS10198 Rev 845/270
60
Page 46
Functional overviewSTM32L476xx
hardware. DFSDM features optional parallel data stream inputs from microcontrollers
memory (through DMA/CPU transfers into DFSDM).
DFSDM transceivers support several serial interface formats (to support various
modulators). DFSDM digital filter modules perform digital processing according user
selected filter parameters with up to 24-bit final ADC resolution.
The DFSDM peripheral supports:
•8 multiplexed input digital serial channels:
–configurable SPI interface to connect various SD modulator(s)
–configurable Manchester coded 1 wire interface support
–PDM (Pulse Density Modulation) microphone input support
–maximum input clock frequency up to 20 MHz (10 MHz for Manchester coding)
–clock output for SD modulator(s): 0..20 MHz
•alternative inputs from 8 internal digital parallel channels (up to 16 bit input resolution):
–internal sources: device memory data streams (DMA)
•4 digital filter modules with adjustable digital signal processing:
–Sinc
x
filter: filter order/type (1..5), oversampling ratio (up to 1..1024)
–integrator: oversampling ratio (1..256)
•up to 24-bit output data resolution, signed output data format
•automatic data offset correction (offset stored in register by user)
•continuous or single conversion
•start-of-conversion triggered by:
–software trigger
–internal timers
–external events
–start-of-conversion synchronously with first digital filter module (DFSDM1_FLT0)
•analog watchdog feature:
–low value and high value data threshold registers
–dedicated configurable Sincx digital filter (order = 1..3, oversampling ratio = 1..32)
–input from final output data or from selected input digital serial channels
–continuous monitoring independently from standard conversion
•short circuit detector to detect saturated analog input values (bottom and top range):
–up to 8-bit counter to detect 1..256 consecutive 0’s or 1’s on serial data stream
–monitoring continuously each input serial channel
•break signal generation on analog watchdog event or on short circuit detector event
•extremes detector:
–storage of minimum and maximum values of final conversion data
–refreshed by software
•DMA capability to read the final conversion data
•interrupts: end of conversion, overrun, analog watchdog, short circuit, input serial
channel clock absence
•“regular” or “injected” conversions:
–“regular” conversions can be requested at any time or even in continuous mode
46/270DS10198 Rev 8
Page 47
STM32L476xxFunctional overview
without having any impact on the timing of “injected” conversions
–“injected” conversions for precise timing and with high conversion priority
DFSDM featuresDFSDM1
Number of channels8
Number of filters4
Input from internal ADC-
Supported trigger sources10
Pulses skipper-
ID registers support-
Table 10. DFSDM1 implementation
3.23 Random number generator (RNG)
All devices embed an RNG that delivers 32-bit random numbers generated by an integrated
analog circuit.
3.24 Timers and watchdogs
The STM32L476xx includes two advanced control timers, up to nine general-purpose
timers, two basic timers, two low-power timers, two watchdog timers and a SysTick timer.
The table below compares the features of the advanced control, general purpose and basic
timers.
Timer typeTimer
Advanced
control
General-
purpose
General-
purpose
General-
purpose
TIM1, TIM816-bit
TIM2, TIM532-bit
TIM3, TIM416-bit
TIM1516-bitUp
Table 11. Timer feature comparison
Counter
resolution
Counter
type
Up, down,
Up/down
Up, down,
Up/down
Up, down,
Up/down
Prescaler
factor
Any integer
between 1
and 65536
Any integer
between 1
and 65536
Any integer
between 1
and 65536
Any integer
between 1
and 65536
DMA
request
generation
Yes43
Yes4No
Yes4No
Yes21
Capture/
compare
channels
Complementary
outputs
DS10198 Rev 847/270
60
Page 48
Functional overviewSTM32L476xx
Table 11. Timer feature comparison (continued)
Timer typeTimer
General-
purpose
BasicTIM6, TIM716-bitUp
TIM16, TIM1716-bitUp
Counter
resolution
Counter
type
Prescaler
factor
Any integer
between 1
and 65536
Any integer
between 1
and 65536
3.24.1 Advanced-control timer (TIM1, TIM8)
The advanced-control timer can each be seen as a three-phase PWM multiplexed on 6
channels. They have complementary PWM outputs with programmable inserted deadtimes. They can also be seen as complete general-purpose timers. The 4 independent
channels can be used for:
•Input capture
•Output compare
•PWM generation (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 to turn off any power switches driven by these outputs.
DMA
request
generation
Yes11
Yes0No
Capture/
compare
channels
Complementary
outputs
Many features are shared with those of the general-purpose TIMx timers (described in
Section 3.24.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.
There are up to seven synchronizable general-purpose timers embedded in the
STM32L476xx (see
generate PWM outputs, or act as a simple time base.
•TIM2, TIM3, TIM4 and TIM5
They are full-featured general-purpose timers:
–TIM2 and TIM5 have a 32-bit auto-reload up/downcounter and 32-bit prescaler
–TIM3 and TIM4 have 16-bit auto-reload up/downcounter and 16-bit prescaler.
These timers feature 4 independent channels for input capture/output compare, PWM
or one-pulse mode output. They can work together, or with the other general-purpose
timers via the Timer Link feature for synchronization or event chaining.
The counters can be frozen in debug mode.
All have independent DMA request generation and support quadrature encoders.
•TIM15, 16 and 17
They are general-purpose timers with mid-range features:
They have 16-bit auto-reload upcounters and 16-bit prescalers.
–TIM15 has 2 channels and 1 complementary channel
–TIM16 and TIM17 have 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 work together via the Timer Link feature for synchronization or event
chaining. The timers have independent DMA request generation.
The counters can be frozen in debug mode.
Tabl e 11 for differences). Each general-purpose timer can be used to
3.24.3 Basic timers (TIM6 and TIM7)
The basic timers are mainly used for DAC trigger generation. They can also be used as
generic 16-bit timebases.
3.24.4 Low-power timer (LPTIM1 and LPTIM2)
The devices embed two low-power timers. These timers have an independent clock and are
running in Stop mode if they are clocked by LSE, LSI or an external clock. They are able to
wakeup the system from Stop mode.
LPTIM1 is active in Stop 0, Stop 1 and Stop 2 modes.
LPTIM2 is active in Stop 0 and Stop 1 mode.
DS10198 Rev 849/270
60
Page 50
Functional overviewSTM32L476xx
This low-power timer supports the following features:
•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 clock sources: LSE, LSI, HSI16 or APB clock
–External clock source over LPTIM input (working even with no internal clock
source running, used by pulse counter application).
•Programmable digital glitch filter
•Encoder mode (LPTIM1 only)
3.24.5 Infrared interface (IRTIM)
The STM32L476xx includes one infrared interface (IRTIM). It can be used with an infrared
LED to perform remote control functions. It uses TIM16 and TIM17 output channels to
generate output signal waveforms on IR_OUT pin.
3.24.6 Independent watchdog (IWDG)
The independent watchdog is based on a 12-bit downcounter and 8-bit prescaler. It is
clocked from an independent 32
from 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. The counter can be frozen in debug mode.
kHz internal RC (LSI) and as it operates independently
3.24.7 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 from
the main clock. It has an early warning interrupt capability and the counter can be frozen in
debug mode.
3.24.8 SysTick timer
This timer is dedicated to real-time operating systems, but could also be used as a standard
down counter. It features:
•A 24-bit down counter
•Autoreload capability
•Maskable system interrupt generation when the counter reaches 0.
•Programmable clock source
50/270DS10198 Rev 8
Page 51
STM32L476xxFunctional overview
3.25 Real-time clock (RTC) and backup registers
The RTC is an independent BCD timer/counter. It supports the following features:
•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.
•Two programmable alarms.
•On-the-fly correction from 1 to 32767 RTC clock pulses. This can be used to
synchronize it with a master clock.
•Reference clock detection: a more precise second source clock (50 or 60 Hz) can be
used to enhance the calendar precision.
•Digital calibration circuit with 0.95 ppm resolution, to compensate for quartz crystal
inaccuracy.
•Three anti-tamper detection pins with programmable filter.
•Timestamp feature which can be used to save the calendar content. This function can
be triggered by an event on the timestamp pin, or by a tamper event, or by a switch to
VBAT mode.
•17-bit auto-reload wakeup timer (WUT) for periodic events with programmable
resolution and period.
The RTC and the 32 backup registers are supplied through a switch that takes power either
from the V
supply when present or from the VBAT pin.
DD
The backup registers are 32-bit registers used to store 128 bytes of user application data
when V
power is not present. They are not reset by a system or power reset, or when the
DD
device wakes up from Standby or Shutdown mode.
The RTC clock sources can be:
•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.
The RTC is functional in VBAT mode and in all low-power modes when it is clocked by the
LSE. When clocked by the LSI, the RTC is not functional in VBAT mode, but is functional in
all low-power modes except Shutdown mode.
All RTC events (Alarm, WakeUp Timer, Timestamp or Tamper) can generate an interrupt
and wakeup the device from the low-power modes.
DS10198 Rev 851/270
60
Page 52
Functional overviewSTM32L476xx
3.26 Inter-integrated circuit interface (I2C)
The device embeds three I2C. Refer to Table 12: I2C implementation for the features
implementation.
The I2C bus interface handles communications between the microcontroller and the serial
2
I
C bus. It controls all I2C bus-specific sequencing, protocol, arbitration and timing.
The I2C peripheral supports:
•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 20 mA output drive I/Os
–7-bit and 10-bit addressing mode, multiple 7-bit slave addresses
–Programmable setup and hold times
–Optional clock stretching
•System Management Bus (SMBus) specification rev 2.0 compatibility:
–Hardware PEC (Packet Error Checking) generation and verification with ACK
control
–Address resolution protocol (ARP) support
–SMBus alert
•Power System Management Protocol (PMBus
•Independent clock: a choice of independent clock sources allowing the I2C
communication speed to be independent from the PCLK reprogramming. Refer to
Figure 4: Clock tree.
•Wakeup from Stop mode on address match
•Programmable analog and digital noise filters
•1-byte buffer with DMA capability
I2C features
Table 12. I2C implementation
(1)
TM
) specification rev 1.1 compatibility
I2C1I2C2I2C3
Standard-mode (up to 100 kbit/s)XXX
Fast-mode (up to 400 kbit/s)XXX
Fast-mode Plus with 20mA output drive I/Os (up to 1 Mbit/s)XXX
Programmable analog and digital noise filtersXXX
SMBus/PMBus hardware supportXXX
Independent clockXXX
Wakeup from Stop 0 / Stop 1 mode on address matchXXX
The STM32L476xx devices have three embedded universal synchronous receiver
transmitters (USART1, USART2 and USART3) and two universal asynchronous receiver
transmitters (UART4, UART5).
These interfaces provide asynchronous communication, IrDA SIR ENDEC support,
multiprocessor communication mode, single-wire half-duplex communication mode and
have LIN Master/Slave capability. They provide hardware management of the CTS and RTS
signals, and RS485 Driver Enable. They are able to communicate at speeds of up to
10Mbit/s.
USART1, USART2 and USART3 also provide Smart Card mode (ISO 7816 compliant) and
SPI-like communication capability.
All USART have a clock domain independent from the CPU clock, allowing the USARTx
(x=1,2,3,4,5) to wake up the MCU from Stop mode using baudrates up to 204
wake up events from Stop mode are programmable and can be:
•Start bit detection
•Any received data frame
•A specific programmed data frame
Kbaud. The
All USART interfaces can be served by the DMA controller.
The device embeds one Low-Power UART. The LPUART 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 from the CPU clock, and can wakeup the
system from Stop mode using baudrates up to 220
mode 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.
LPUART interface can be served by the DMA controller.
Kbaud. The wake up events from Stop
54/270DS10198 Rev 8
Page 55
STM32L476xxFunctional overview
3.29 Serial peripheral interface (SPI)
Three SPI interfaces allow communication up to 40 Mbits/s in master and up to 24 Mbits/s
slave modes, in half-duplex, full-duplex and simplex modes. The 3-bit prescaler gives 8
master mode frequencies and the frame size is configurable from 4 bits to 16 bits. The SPI
interfaces support NSS pulse mode, TI mode and Hardware CRC calculation.
All SPI interfaces can be served by the DMA controller.
3.30 Serial audio interfaces (SAI)
The device embeds 2 SAI. Refer to Tab le 14: SAI implementation for the features
implementation. The SAI bus interface handles communications between the
microcontroller and the serial audio protocol.
The SAI peripheral supports:
•Two independent audio sub-blocks which can be transmitters or receivers with their
respective FIFO.
•8-word integrated FIFOs for each audio sub-block.
•Synchronous or asynchronous mode between the audio sub-blocks.
•Master or slave configuration independent for both audio sub-blocks.
•Clock generator for each audio block to target independent audio frequency sampling
when both audio sub-blocks are configured in master mode.
•Error flags with associated interrupts if enabled respectively.
–Overrun and underrun detection.
–Anticipated frame synchronization signal detection in slave mode.
–Late frame synchronization signal detection in slave mode.
–Codec not ready for the AC’97 mode in reception.
•Interruption sources when enabled:
–Errors.
–FIFO requests.
•DMA interface with 2 dedicated channels to handle access to the dedicated integrated
FIFO of each SAI audio sub-block.
DS10198 Rev 855/270
60
Page 56
Functional overviewSTM32L476xx
SAI features
I2S, LSB or MSB-justified, PCM/DSP, TDM, AC’97XX
Mute modeXX
Stereo/Mono audio frame capability.XX
16 slots XX
Data size configurable: 8-, 10-, 16-, 20-, 24-, 32-bitXX
FIFO Size X (8 Word)X (8 Word)
SPDIFXX
1. X: supported
Table 14. SAI implementation
(1)
SAI1SAI2
3.31 Single wire protocol master interface (SWPMI)
The Single wire protocol master interface (SWPMI) is the master interface corresponding to
the Contactless Frontend (CLF) defined in the ETSI TS 102 613 technical specification. The
main features are:
•full-duplex communication mode
•automatic SWP bus state management (active, suspend, resume)
•configurable bitrate up to 2 Mbit/s
•automatic SOF, EOF and CRC handling
SWPMI can be served by the DMA controller.
3.32 Controller area network (CAN)
The CAN is compliant with specifications 2.0A and B (active) with a bit rate up to 1 Mbit/s. It
can receive and transmit standard frames with 11-bit identifiers as well as extended frames
with 29-bit identifiers. It has three transmit mailboxes, two receive FIFOs with 3 stages and
14 scalable filter banks.
56/270DS10198 Rev 8
Page 57
STM32L476xxFunctional overview
The CAN peripheral supports:
•Supports CAN protocol version 2.0 A, B Active
•Bit rates up to 1 Mbit/s
•Transmission
–Three transmit mailboxes
–Configurable transmit priority
•Reception
–Two receive FIFOs with three stages
–14 Scalable filter banks
–Identifier list feature
–Configurable FIFO overrun
•Time-triggered communication option
–Disable automatic retransmission mode
–16-bit free running timer
–Time Stamp sent in last two data bytes
•Management
–Maskable interrupts
–Software-efficient mailbox mapping at a unique address space
3.33 Secure digital input/output and MultiMediaCards Interface
(SDMMC)
The card host interface (SDMMC) provides an interface between the APB peripheral bus
and MultiMediaCards (MMCs), SD memory cards and SDIO cards.
The SDMMC features include the following:
•Full compliance with MultiMediaCard System Specification Version 4.2. Card support
for three different databus modes: 1-bit (default), 4-bit and 8-bit
•Full compatibility with previous versions of MultiMediaCards (forward compatibility)
•Full compliance with SD Memory Card Specifications Version 2.0
•Full compliance with SD I/O Card Specification Version 2.0: card support for two
different databus modes: 1-bit (default) and 4-bit
•Data transfer up to 48 MHz for the 8 bit mode
•Data write and read with DMA capability
3.34 Universal serial bus on-the-go full-speed (OTG_FS)
The devices embed an USB OTG full-speed device/host/OTG peripheral with integrated
transceivers. The USB OTG FS peripheral is compliant with the USB 2.0 specification and
with the OTG 2.0 specification. It has software-configurable endpoint setting and supports
suspend/resume. The USB OTG controller requires a dedicated 48 MHz clock that can be
provided by the internal multispeed oscillator (MSI) automatically trimmed by 32.768 kHz
external oscillator (LSE).This allows to use the USB device without external high speed
crystal (HSE).
DS10198 Rev 857/270
60
Page 58
Functional overviewSTM32L476xx
The major features are:
•Combined Rx and Tx FIFO size of 1.25 KB with dynamic FIFO sizing
•Supports the session request protocol (SRP) and host negotiation protocol (HNP)
•1 bidirectional control endpoint + 5 IN endpoints + 5 OUT endpoints
•12 host channels with periodic OUT support
•HNP/SNP/IP inside (no need for any external resistor)
•USB 2.0 LPM (Link Power Management) support
•Battery Charging Specification Revision 1.2 support
•Internal FS OTG PHY support
For OTG/Host modes, a power switch is needed in case bus-powered devices are
connected.
3.35 Flexible static memory controller (FSMC)
The Flexible static memory controller (FSMC) includes two memory controllers:
•The NOR/PSRAM memory controller
•The NAND/memory controller
This memory controller is also named Flexible memory controller (FMC).
The main features of the FMC controller are the following:
•Interface with static-memory mapped devices including:
–Static random access memory (SRAM)
–NOR Flash memory/OneNAND Flash memory
–PSRAM (4 memory banks)
–NAND Flash memory with ECC hardware to check up to 8 Kbyte of data
•8-,16- bit data bus width
•Independent Chip Select control for each memory bank
•Independent configuration for each memory bank
•Write FIFO
•The Maximum FMC_CLK frequency for synchronous accesses is HCLK/2.
LCD parallel interface
The FMC can be configured to interface seamlessly with most graphic LCD controllers. It
supports the Intel 8080 and Motorola 6800 modes, and is flexible enough to adapt to
specific LCD interfaces. This LCD parallel interface capability makes it easy to build cost
effective graphic applications using LCD modules with embedded controllers or high
performance solutions using external controllers with dedicated acceleration.
58/270DS10198 Rev 8
Page 59
STM32L476xxFunctional overview
3.36 Quad SPI memory interface (QUADSPI)
The Quad SPI is a specialized communication interface targeting single, dual or quad SPI
flash memories. It can operate in any of the three following modes:
•Indirect mode: all the operations are performed using the QUADSPI registers
•Status polling mode: the external flash status register is periodically read and an
interrupt can be generated in case of flag setting
•Memory-mapped mode: the external Flash is memory mapped and is seen by the
system as if it were an internal memory
The Quad SPI interface supports:
•Three functional modes: indirect, status-polling, and memory-mapped
•SDR and DDR support
•Fully programmable opcode for both indirect and memory mapped mode
•Fully programmable frame format for both indirect and memory mapped mode
•Each of the 5 following phases can be configured independently (enable, length,
single/dual/quad communication)
–Instruction phase
–Address phase
–Alternate bytes phase
–Dummy cycles phase
–Data phase
•Integrated FIFO for reception and transmission
•8, 16, and 32-bit data accesses are allowed
•DMA channel for indirect mode operations
•Programmable masking for external flash flag management
•Timeout management
•Interrupt generation on FIFO threshold, timeout, status match, operation complete, and
access error
DS10198 Rev 859/270
60
Page 60
Functional overviewSTM32L476xx
3.37 Development support
3.37.1 Serial wire JTAG debug port (SWJ-DP)
The Arm® SWJ-DP interface is embedded, and is a combined JTAG and serial wire debug
port that enables either a serial wire debug or a JTAG probe to be connected to the target.
Debug is performed using 2 pins only instead of 5 required by the JTAG (JTAG pins could
be re-use as GPIO with alternate function): the JTAG TMS and TCK pins are shared with
SWDIO and SWCLK, respectively, and a specific sequence on the TMS pin is used to
switch between JTAG-DP and SW-DP.
3.37.2 Embedded Trace Macrocell™
The Arm® Embedded Trace Macrocell™ provides a greater visibility of the instruction and
data flow inside the CPU core by streaming compressed data at a very high rate from the
STM32L476xx through a small number of ETM pins to an external hardware trace port
analyzer (TPA) device. Real-time instruction and data flow activity be recorded and then
formatted for display on the host computer that runs the debugger software. TPA hardware
is commercially available from common development tool vendors.
The Embedded Trace Macrocell™ operates with third party debugger software tools.
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 (e.g. to drive an LED).
2. After a Backup domain power-up, PC13, PC14 and PC15 operate as GPIOs. Their function then depends on the content of the RTC registers which are not
reset by the system reset. For details on how to manage these GPIOs, refer to the Backup domain and RTC register descriptions in the RM0351 reference
manual.
3. OPAMPx_VINM pins are not available as additional functions on pins PA1 and PA7 on UFBGA packages. On UFBGA packages, use the OPAMPx_VINM
dedicated pins.
4. After reset, these pins are configured as JTAG/SW debug alternate functions, and the internal pull-up on PA15, PA13, PB4 pins and the internal pull-down
on PA14 pin are activated.