STMicroelectronics STM32L476 User Manual

UM1879
User manual
Discovery kit with STM32L476VG MCU
Introduction
The STM32L476 Discovery kit (32L476GDISCOVERY) helps the user to discover the STM32L4 ultra-low-power features and to develop and share applications.
It is based on the STM32L476VGT6 microcontroller with three I2Cs, three SPIs, six USARTs, CAN, SWPMI, two SAIs, 12-bit ADCs, 12-bit DAC, LCD driver, internal 128 of SRAM and 1 controller, FMC, JTAG debugging support.
The 32L476GDISCOVERY includes an ST-LINK/V2-1 embedded debugging tool interface, LCD (24 segments, 4 commons), LEDs, push-button, joystick, USB OTG FS, audio DAC, MEMS (microphone, 3-axis gyroscope, 6-axis compass), Quad-SPI Flash memory, embedded ammeter measuring STM32 consumption in low-power mode.
External boards can be connected through the extension and probing connectors.
Mbyte of Flash memory, Quad-SPI, touch sensing, USB OTG FS, LCD
Kbytes

Figure 1. STM32L476 Discovery board

Picture is not contractual.
June 2018 UM1879 Rev 4 1/41
www.st.com
1
Contents UM1879
Contents
1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Product marking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Development toolchains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5 Demonstration software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
6 Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7 Delivery recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
8 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
9 Bootloader limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
10 Hardware layout and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
10.1 Embedded ST-LINK/V2-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
10.1.1 Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
10.1.2 ST-LINK/V2-1 firmware upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
10.1.3 Using ST-LINK/V2-1 to program/debug the STM32L476VGT6
on board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
10.1.4 Using ST-LINK/V2-1 to program/debug an external STM32 application
board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
10.2 Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
10.3 Clock source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
10.4 Reset source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
10.5 User interface: LCD, joystick, LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10.6 Boot0 configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10.7 Quad-SPI NOR Flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10.8 USB OTG FS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10.9 USART configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
10.10 Audio DAC and MEMS microphone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2/41 UM1879 Rev 4
UM1879 Contents
10.11 9-axis motion sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
10.12 I
2
C extension connector CN2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
10.13 MCU current ammeter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
10.14 Extension connector P1 and P2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
10.15 Solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
11 Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Appendix A Power consumption measurements . . . . . . . . . . . . . . . . . . . . . . . . 35
Appendix B Mechanical drawing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Appendix C Compliance statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
C.1 FCC Compliance Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
C.1.1 Part 15.19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
C.1.2 Part 15.105 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
C.1.3 Part 15.21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
C.2 IC Compliance Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
C.2.1 Compliance Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
C.2.2 Déclaration de conformité . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
UM1879 Rev 4 3/41
3
List of tables UM1879
List of tables
Table 1. Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Table 2. ON/OFF conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Table 3. Jumper states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Table 4. Debug connector CN4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 5. Reset related jumper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 6. Connector CN2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 7. Extension connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 8. Solder bridges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 9. Typical power consumption of the STM32L476 Discovery board. . . . . . . . . . . . . . . . . . . . 36
Table 10. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4/41 UM1879 Rev 4
UM1879 List of figures
List of figures
Figure 1. STM32L476 Discovery board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Figure 2. Hardware block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 3. STM32L476 Discovery board top layout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 4. STM32L476 Discovery board bottom layout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 5. Updating the list of drivers in device manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 6. CN1, CN3 (ON), CN4 connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 7. CN1, CN3 (OFF), CN4 connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 8. Board jumper location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 9. Connector CN2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 10. STM32L476 Discovery board design top sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figure 11. ST-LINK/V2-1 with support of SWD only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 12. STM32L476VGT6 MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 13. IDD measurement / MFX (Multi Function eXpander) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 14. Joystick ACP, LEDs and push-button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 15. LCD display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 16. OTG USB FS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 17. Audio DAC and microphone MEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 18. Quad-SPI Flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 19. Gyroscope, accelerometer, magnetometer MEMS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 20. Power consumption tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 21. STM32L476 Discovery board mechanical drawing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
UM1879 Rev 4 5/41
5
Features UM1879

1 Features

STM32L476VGT6 microcontroller featuring 1 Mbyte of Flash memory and 128 Kbytes of RAM in LQFP100 package
On-board ST-LINK/V2-1 supporting USB reenumeration capability
Three different interfaces supported on USB:
Virtual Com Port
Mass storage
Debug port
Arm
®
Mbed enabled
LCD 24 segments, 4 commons in DIP 28 package
Seven LEDs:
LD1 (red/green) for ST-LINK/V2-1 USB communication
LD2 (red) for 3.3 V power on
LD3 overcurrent (red)
LD4 (red), LD5 (green) two user LEDs
LD6 (green), LD7 (red) USB OTG FS LEDs
Push-button (reset)
Four-direction joystick with selection
USB OTG FS with Micro-AB connector
SAI Audio DAC, stereo with output jack
Digital microphone MEMS
Accelerometer and magnetometer MEMS
Gyroscope MEMS
128-Mbit Quad-SPI Flash memory
STM32 current ammeter with 4 ranges and auto calibration
2
I
C extension connector for external board
Four power supply options:
–ST-LINK/V2-1
USB FS connector
External 5V
CR2032 battery (not provided)
Extension connectors
Comprehensive free software including a variety of examples, part of STM32Cube™
package
™(a)
(see http: //mbed.org)
a. Arm and Mbed are registered trademarks or trademarks of Arm Limited (or its subsidiaries) in the US and/or
elsewhere.
6/41 UM1879 Rev 4
UM1879 Product marking

2 Product marking

Evaluation tools marked as “ES” or “E” are not yet qualified and are therefore not ready to be used as reference design or in production. Any consequences arising from such usage will not be at STMicroelectronics’ charge. In no event will STMicroelectronics be liable for any customer usage of these engineering sample tools as reference designs or in production.
‘E’ or ‘ES’ marking examples of location:
on the targeted STM32 that is soldered on the board (for illustration of STM32 marking, refer to the section Package information in the STM32 datasheet at www.st.com).
next to the evaluation tool ordering part number, that is stuck or silkscreen printed on the board
This board features a specific STM32 device version, which allows the operation of any bundled commercial stack/library available. This STM32 device shows a "U" marking option at the end of the standard part number and is not available for sales.
In order to use the same commercial stack in his application, a developer may need to purchase a part number specific to this stack/library. The price of those part numbers includes the stack/library royalties.

3 System requirements

Windows® OS (7, 8 and 10), Linux® 64-bit or macOS
USB Type-A to Micro-B cable

4 Development toolchains

Keil® MDK-ARM
IAR™ EWARM
GCC-based IDEs including free SW4STM32 from AC6
Arm
®
Mbed™ online (see http://mbed.org)
(b)
(b)
®(a)
a. macOS® is a trademark of Apple Inc., registered in the U.S. and other countries.
b. On Windows only
UM1879 Rev 4 7/41
40
Demonstration software UM1879

5 Demonstration software

The demonstration software, included in the STM32Cube MCU Package corresponding to the on-board MCU, is preloaded in the STM32 Flash memory for easy demonstration of the device peripherals in standalone mode. The latest versions of the demonstration source code and associated documentation can be downloaded from the discovery web page.
www.st.com/stm32l4-

6 Ordering information

To order the 32L476GDISCOVERY Discovery kit, refer to Tab le 1.
Order code Target STM32
32L476GDISCOVERY STM32L476VGT6

Table 1. Ordering information

7 Delivery recommendations

Some verifications are needed before using the board for the first time to make sure that nothing has been damaged during the shipment and that no components are unplugged or lost. When the board is extracted from its plastic bag, check that no component remains in the bag. In particularly, make sure that the following jumpers on top side of the board are plugged: CN3, JP3, JP5, and JP6.
The battery CR2032 is not provided.

8 Conventions

Table 2 provides conventions used in the present document.
Convention Definition
Jumper JPx ON Jumper fitted
Jumper JPx OFF Jumper not fitted
Solder bridge SBx ON SBx connections closed by solder

Table 2. ON/OFF conventions

Solder bridge SBx OFF SBx connections left opened
8/41 UM1879 Rev 4
UM1879 Bootloader limitations

9 Bootloader limitations

Boot from system Flash memory results in executing bootloader code stored in the system Flash memory protected against writing and erasing. This allows in-system programming (ISP), that is, flashing the STM32 user Flash memory. It also allows writing data into RAM. The data come in via one of communication interfaces such as USART, SPI, I or CAN.
Bootloader version can be identified by reading the Bootloader ID at the address 0x1FFF6FFE.
The STM32L476VGT6 part soldered on the 32L476GDISCOVERY main board is marked with a date code corresponding to its date of manufacturing. STM32L476VGT6 parts with the date code prior or equal to week 22 of 2015 are fitted with bootloader V the limitations to be worked around, as described hereunder. Parts with the date code starting from week 23 of 2015 contain bootloader V exist.
To locate the visual date code information on the STM32L476VGT6 package, refer to its datasheet (DS10198) available at www.st.com, section Package Information. Date code related portion of the package marking takes Y year and WW is the week. For example, a part manufactured in week 23 of 2015 bares the date code 5
23.
9.2 in which the limitations no longer
WW format, where Y is the last digit of the
2
C bus, USB
9.0 affected by
Bootloader ID of the bootloader V 9.0 is 0x90.
The following limitations exist in the bootloader V 9.0:
1. RAM data get corrupted when written via USART/SPI/I2C/USB interface
Description:
Data write operation into RAM space via USART, SPI, I2C bus or USB results in wrong or no data written.
Workaround:
To correct the issue of wrong write into RAM, download the STSW-STM32158 bootloader V V9.0 SRAM patch" to the MCU, following the information in readme.txt file available in the package.
2. User Flash memory data get corrupted when written via CAN interface
Description:
Data write operation into user Flash memory space via CAN interface results in wrong or no data written.
Workaround:
To correct the issue of wrong write into Flash memory, download the STSW-STM32158 bootloader V CAN patch" to the MCU, following the information in readme.txt file available in the package.
9.0 patch package from the www.st.com website and load "Bootloader
0.9 patch package from the www.st.com website and load "Bootloader V9.0
UM1879 Rev 4 9/41
40
Hardware layout and configuration UM1879
A to Mini-B
USB
Embedded
ST_LINK/V2-1
(3V CR2032 Battery)
CR1
SWDHeader P1
Header P2
STM32L476VGT6
power
JP6
IO
IO
reset
9-axis motion
sensors
digital
microphone
MEMS
SAI Audio DAC
stereo
LCD segment (4x24)
128Mb QuadSPI flash
USB OTG FS with Micro-A-B connector
IDD current measurement
Reset pushbutton
Joystick with 4-direction control and selector
User LEDs
LD5 (green)
LD4 (red)
IO

10 Hardware layout and configuration

The STM32L476 Discovery board is designed around the STM32L476VGT6 (100-pin LQFP package). The hardware block diagram (see the STM32L476VGT6 and the peripherals (9-axis motion sensors, digital microphone MEMS, LCD segment, 128
Mbytes of Quad-SPI Flash memory, SAI Audio DAC stereo with
3.5mm output jack, USB OTG FS, IDD current measurement, LEDs, push-button, joystick)
and the
Figure 3 will help to locate these features on the STM32L476 Discovery board.

Figure 2. Hardware block diagram

Figure 2) illustrates the connection between
10/41 UM1879 Rev 4
UM1879 Hardware layout and configuration
069
&1DXGLR RXWSXWMDFN
&186%86(5
&15)((3520
&1QRWILWWHG
-3-3QRWILWWHG
-3EDWWHU\RULQWHUQDO 9UHJXODWRUVHOHFWLRQ
3H[WHQVLRQ FRQQHFWRU
3H[WHQVLRQ FRQQHFWRU
-3567
/'/'8VHU/('V
&167/,1.WR',6&2 ERDUGRU6:'
&16:'
-3,GG212))
8670/9*7
80(06PLFURSKRQH
&186%67/,1.
/'&20
-35;7;
8/&'VHJPHQW
80);
%5HVHWSXVKEXWWRQ
8$XGLR'$&
/'/'86%/('V
84XDG63,)ODVK PHPRU\
%MR\VWLFN
/'3:5
/'2&
88 D[LVPRWLRQVHQVRUV
67/,1.9

Figure 3. STM32L476 Discovery board top layout

UM1879 Rev 4 11/41
40
Hardware layout and configuration UM1879
069
&5EDWWHU\FRQQHFWRU
6%6% N+]&/.
6%6% 27*)6
6%7B6:2
6%67/,1.3:5
6%6%6%6% GHIDXOW
6%6%6%6% UHVHUYHG
6%670B567
6% UHVHUYHG
6%6% 0+]&/.
6%6% UHVHUYHG
6%%5(6(7
6%6% 0);86$575;7;
6%(;75)(3
6% 95(*LQSXW
6%6% 86$575;7;
6%7B6:2
6% 95(*LQKLELW

Figure 4. STM32L476 Discovery board bottom layout

12/41 UM1879 Rev 4
UM1879 Hardware layout and configuration

10.1 Embedded ST-LINK/V2-1

The ST-LINK/V2-1 programming and debugging tool is integrated on the STM32L476 Discovery board. Compared to ST-LINK/V2 the changes are listed below. The new features supported on ST-LINK/V2-1 are:
USB software re-enumeration
Virtual Com Port interface on USB
Mass storage interface on USB
USB power management request for more than 100mA power on USB
These features are no more supported on ST-LINK/V2-1:
SWIM interface
Application voltage lower than 3 V
For all general information concerning debugging and programming features common between V2 and V2-1 refer to ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32 User manual (UM1075). There are two different ways to use the embedded ST-LINK/V2-1 depending on the jumper states:
Program/debug the STM32L476VGT6 on board (Section 10.1.3)
Program/debug an STM32 in an external application board using a cable connected to
SWD connector CN4 (Section 10.1.4)
.

Table 3. Jumper states

Jumper state Description
Both CN3 jumpers ON ST-LINK/V2-1 functions enabled for on-board programming (default)
Both CN3 jumpers OFF

10.1.1 Drivers

The ST-LINK/V2-1 requires a dedicated USB driver, which can be found on the www.st.com website.
In case the STM32L476 Discovery board is connected to the PC before the driver is installed, some interfaces may be declared as “Unknown” in the PC device manager. In this case the user must install the driver files, and update the driver of the connected device from the device manager.
ST-LINK/V2-1 functions enabled for external board through external CN4 connector (SWD supported)
UM1879 Rev 4 13/41
40
Loading...
+ 28 hidden pages