STMicroelectronics 32L4R9IDISCOVERY User Manual

Introduction
UM2271
User manual
Discovery kit with STM32L4R9AI MCU
The 32L4R9IDISCOVERY kit is a complete demonstration and development platform for the STMicroelectronics Arm Leveraging the innovative ultra-low power oriented features, 640 graphics performance (Chrom-ART Accelerator™) and DSI controller offered by the STM32L4R9AI, the 32L4R9IDISCOVERY kit enables users to easily prototype applications with state-of-the-art energy efficiency, as well as providing stunning audio and graphics rendering with direct support for an AMOLED DSI round display. For even more user­friendliness, the on-board ST-LINK/V2-1 debugger provides out-of-the-box programming and debugging capabilities.
The STM32L4R9AI microcontroller features four I2Cs, five USARTs, one ULP UART, three SPIs, two SAIs, one SDIO, one USB 2.0 full-speed OTG, two CANs, one FMC parallel synchronous interface, one 12-bit ADC, one 12-bit DAC, two ULP analog comparators, two op amps, one 2 data-lane DSI display, one digital filter for sigma delta modulator and SWP interface, two Octo-SPI interfaces, 8- to 14-bit camera interface, one touch sensing controller interface, JTAG and SWD debugging support.
This Discovery board offers everything required for users to get started quickly and develop applications easily.The hardware features on the board help to evaluate the following peripherals: USB OTG FS, microSD™ card, 8-bit camera interface, 16-Mbit PSRAM, PMOD and STMod+ connectors, IDD measurement, full-duplex I2S with an audio codec and stereo headset jack including an analog microphone, DFSDM with a pair of MEMS digital microphones on board, 512-Mbit Octo-SPI Flash memory device, I2C extension connector,
1.2" AMOLED display using a one data-lane DSI interface with a capacitive touch panel. The Arduino™ compatible connectors expand the functionality with a wide choice of specialized shields. The integrated ST-LINK/V2-1 provides an embedded in-circuit debugger and programmer for the STM32 MCU.

Figure 1. 32L4R9IDISCOVERY top view Figure 2. 32L4R9IDISCOVERY bottom view

Cortex®-M4 core-based STM32L4R9AI microcontroller.
Kbytes of embedded RAM,
Pictures are not contractual
October 2017 DocID030906 Rev 2 1/78
www.st.com
1
Contents UM2271
Contents
1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Product marking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4 Development toolchains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5 Demonstration software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
6 Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7 Technology partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
8 Bootloader limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
9 AMOLED display limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
10 Hardware layout and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
10.1 32L4R9IDISCOVERY layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
10.2 32L4R9IDISCOVERY mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . 15
10.3 Embedded ST_LINK/V2-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
10.3.1 Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
10.3.2 ST-LINK/V2-1 firmware upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
10.4 Low-power consumption status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
10.5 TAG and SWD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
10.6 Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10.6.1 Power supply sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10.6.2 MCU power supply options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
10.6.3 Supplying 32L4R9IDISCOVERY through ST-LINK/V2-1 USB . . . . . . . . 21
10.6.4 Measurement of MCU current consumption . . . . . . . . . . . . . . . . . . . . . 22
10.6.5 Program or debug when power supply not from ST-LINK/V2-1 . . . . . . . 23
10.7 Clock sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
10.8 Reset Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2/78 DocID030906 Rev 2
UM2271 Contents
10.9 Boot configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
10.10 Audio codec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
10.11 DFSDM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
10.12 PSRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
10.13 USB OTG FS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
10.13.1 32L4R9IDISCOVERY as USB device . . . . . . . . . . . . . . . . . . . . . . . . . . 25
10.13.2 32L4R9IDISCOVERY as USB host . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
10.14 Octo-SPI Flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
10.15 Virtual COM port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
10.16 Buttons and LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
11 Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
11.1 Arduino connectors CN10, CN11, CN16 and CN17 . . . . . . . . . . . . . . . . . 28
11.2 DSI display, backlight and touch panel connector CN4 . . . . . . . . . . . . . . 30
11.2.1 DSI AMOLED display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
11.2.2 Backlight and OLED power supplies generation . . . . . . . . . . . . . . . . . . 32
11.2.3 Touch panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
11.3 USB OTG FS connector CN9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
11.4 ST-LINK/V2-1 USB Micro-B connector CN13 . . . . . . . . . . . . . . . . . . . . . 33
11.5 microSD card connector CN6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
11.6 STMod+ connector CN1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
11.7 PMOD connector CN3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
11.8 Camera module connector CN2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
11.9 TAG connector CN8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
11.10 SWD header CN5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
11.11 EXT_I2C connector CN7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
11.12 Stereo headset and headphone jack CN12 . . . . . . . . . . . . . . . . . . . . . . . 41
Appendix A GPIO assignment and sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Appendix B Solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Appendix C STMod+ GPIO sharing and multiplexing . . . . . . . . . . . . . . . . . . . . . 52
Appendix D Schematics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
DocID030906 Rev 2 3/78
4
Contents UM2271
Appendix E Fanout board (MB1280) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
E.1 MikroElektronika mikroBUS™ compatible connector
(Fanout CN10 / CN11). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
E.2 ESP-01 Wi-Fi
®
board compatible connector. . . . . . . . . . . . . . . . . . . . . . . 72
E.3 Compatible connectors for the Grove boards . . . . . . . . . . . . . . . . . . . . . . 72
E.3.1 Compatible connector for I2C Grove boards (Fanout CN3) . . . . . . . . . . 72
E.3.2 Compatible connector for UART Grove boards (Fanout CN2) . . . . . . . . 73
Appendix F Federal Communications Commission (FCC) and Industry Canada
(IC) Compliance74
F.1 FCC Compliance Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
F.1.1 Part 15.19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
F.1.2 Part 15.105 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
F.1.3 Part 15.21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
F.2 IC Compliance Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
F.2.1 Compliance Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
F.2.2 Déclaration de conformité. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Appendix G CISPR32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
G.1 Warning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4/78 DocID030906 Rev 2
UM2271 List of tables
List of tables
Table 1. Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Table 2. JP10: VDD_STL setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 3. SW1 switch setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 4. 32L4R9IDISCOVERY power sources configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table 5. JP4: power source selector setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 6. JP5: ARD 5 V input/output voltage selection setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 7. JP7: VDD setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 8. JP1: IDD_MCU measurement setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 9. JP3: VDDA and VDDUSB, settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 10. Boot modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 11. LD1 and LD2 details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Table 12. Buttons and LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Table 13. Arduino compatible connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Table 14. JP3, VDDA and VDDUSB, settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Table 15. DSI display connector CN4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Table 16. USB OTG FS Micro-AB connector CN9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Table 17. USB Micro-B connector CN13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Table 18. microSD connector CN6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Table 19. STMod+ connector CN1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Table 20. Quad SPDT switch configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Table 21. PMOD connector CN3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Table 22. Camera module connector CN2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Table 23. TAG connector CN8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table 24. SWD header CN5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Table 25. EXT_I2C connector CN7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Table 26. I2C1 addresses (on board) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Table 27. Audio jack connector CN12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Table 28. 32L4R9IDISCOVERY GPIO assignment and sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Table 29. MFX_V3 GPIO assignment (LQFP48) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Table 30. 32L4R9IDISCOVERY solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Table 31. STMod+ GPIO sharing and multiplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Table 32. SPDT quad switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Table 33. Description of the mikroBUS connectors (CN11 and CN10) . . . . . . . . . . . . . . . . . . . . . . . 72
Table 34. Description of the ESP-01 Wi-Fi board connector pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Table 35. Description of the I2C Grove board connector pins (CN3) . . . . . . . . . . . . . . . . . . . . . . . . . 73
Table 36. Description of the UART Grove board connector pins (CN2) . . . . . . . . . . . . . . . . . . . . . . . 73
Table 37. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
DocID030906 Rev 2 5/78
5
List of figures UM2271
List of figures
Figure 1. 32L4R9IDISCOVERY top view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Figure 2. 32L4R9IDISCOVERY bottom view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Figure 3. Hardware block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 4. 32L4R9IDISCOVERY top side layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 5. 32L4R9IDISCOVERY bottom side layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 6. 32L4R9IDISCOVERY mechanical drawing (top view, in mm) . . . . . . . . . . . . . . . . . . . . . . 15
Figure 7. 32L4R9IDISCOVERY mechanical drawing (bottom view, in mm) . . . . . . . . . . . . . . . . . . . 16
Figure 8. How to update driver software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 9. JP4 default configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 10. DSI display connector CN4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 11. USB OTG FS Micro-AB connector CN9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 12. USB Micro-B connector CN13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 13. microSD connector CN6 (top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 14. STMod+ connector CN1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Figure 15. PMOD connector CN3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Figure 16. Camera module connector CN2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 17. TAG connector CN8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figure 18. EXT_I2C connector CN7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 19. Stereo headset with microphone jack CN12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 20. 32L4R9IDISCOVERY board interconnections (MB1311C) . . . . . . . . . . . . . . . . . . . . . . . . 55
Figure 21. 32L4R9IDISCOVERY power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Figure 22. 32L4R9IDISCOVERY Arduino Uno V3 connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Figure 23. 32L4R9IDISCOVERY ST-LINK/V2-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Figure 24. 32L4R9IDISCOVERY Octo-SPI Flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Figure 25. 32L4R9IDISCOVERY peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Figure 26. 32L4R9IDISCOVERY USB OTG FS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Figure 27. 32L4R9IDISCOVERY Round DSI display interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Figure 28. 32L4R9IDISCOVERY IDD measurement and Multi Function eXpander . . . . . . . . . . . . . . 63
Figure 29. 32L4R9IDISCOVERY microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Figure 30. 32L4R9IDISCOVERY PSRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Figure 31. 32L4R9IDISCOVERY camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Figure 32. 32L4R9IDISCOVERY STMOD+ interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Figure 33. 32L4R9IDISCOVERY Audio and DFSDM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Figure 34. Round DSI display board (MB1314) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Figure 35. Fanout board (MB1280) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Figure 36. STMod+ Fanout module plugged into CN1 connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6/78 DocID030906 Rev 2
UM2271 Features

1 Features

STM32L4R9AI Arm-based microcontroller with 2-Mbyte Flash memory and 640-Kbyte RAM in UFBGA169 package
1.2" 390x390 pixel AMOLED round display panel with 16 million colors depth, MIPI interface and capacitive touch panel
USB OTG FS
On-board current measurement
SAI audio codec
ST-MEMS digital microphones
16-Mbit asynchronous PSRAM
512-Mbit Octo-SPI Flash
2 user LEDs
1 reset push-button
4-direction joystick with selection button
Board connectors:
– 8-bit camera – USB OTG FS with Micro-AB – Stereo headset jack including analog microphone input – microSD card
Board expansion connectors: – Arduino Uno V3 –STMod+ –PMOD – EXT_I2C
Flexible power-supply options: –ST-LINK USB V
On-board ST-LINK/V2-1 debugger/programmer with USB re-enumeration capability: mass storage, virtual COM port and debug port
Comprehensive free software libraries and examples available with the STM32Cube package
Support of a wide choice of integrated development environments (IDEs), including IAR™, Keil
and GCC-based IDEs
or external sources
BUS
DSI

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
DocID030906 Rev 2 7/78
77
System requirements UM2271
will not be at ST’s charge. In no event will ST 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’ of 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 stack or library. This STM32 device shows a "U" marking option at the end of the standard part number and is not available for sales.

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
(a)
(a)

5 Demonstration software

The demonstration software, included in the STM32Cube 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 www.st.com/stm32l4-discovery web page.

6 Ordering information

To order the 32L4R9IDISCOVERY kit, refer to Table 1.
a. On Windows only
8/78 DocID030906 Rev 2
UM2271 Technology partners
Order code Target STM32
STM32L4R9I-DISCO STM32L4R9AII6

Table 1. Ordering information

7 Technology partners

MACRONIX:
512-Mbit Octo-SPI NOR Flash memory device, part number MX25LM51245GXDI00
GOVISIONOX OPTOELECTRONICS:
1.2 inch 390x390 AMOLED display, part number G1120TB103GF-001
DocID030906 Rev 2 9/78
77
Bootloader limitations UM2271

8 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, I2C bus, USB or CAN.
Bootloader version is identified by reading the bootloader ID at the address 0x1FFF6FFE. Its value is 0x91 for bootloader V9.1 and 0x92 for V9.2.
The STM32L4R9AII6 part soldered on the 32L4R9IDISCOVERY main board is marked with a date code corresponding to its date of manufacturing. STM32L4R9AII6 parts with a date code prior or equal to week 37 of 2017 are fitted with bootloader V9.1 affected by the limitations to be worked around, as described hereunder. Parts with the date code starting from week 38 of 2017 contain bootloader V9.2 in which the limitations no longer exist.
To locate the visual date code information on the STM32L4R9II6 package, refer to its datasheet (DS12023) available at www.st.com, section Package Information. Date code related portion of the package marking takes Y WW format, where Y is the last digit of the year and WW is the week. For example, a part manufactured in week 38 of 2017 bares the date code 7 38.
There is also another mean to identify the need for workaround: before opening the blister of the Discovery Kit, just check the back side of the blister. At the bottom left side, if the reference number is equal or higher than 32L4R9IDISCO/ 02-0, it means the bootloader version is V9.2 and there is no need to apply workaround. Any other inferior number like 01­0 will need the workaround.
Bootloader ID for the bootloader V9.1 is 0x91.
The following limitation exists in the bootloader V9.1:
Some user Flash memory data get corrupted when written via SPI interface
Description:
During bootloader SPI Write Flash operation, some random 64-bits (2 double-words) may be left blank at 0xFF
Workarounds:
WA1: add a delay between sending Write command and its ACK request. Its duration should be the duration of the 256-Byte Flash write time.
WA2: read back after each write operation (256 bytes or at end of user code flashing) and in case of error start write again.
WA3: Using bootloader, load a patch code in RAM to write in Flash memory through same Write Memory write protocol as bootloader (code provided by ST). The patch code is available for download from www.st.com website with a readme.txt file containing usage instructions.
10/78 DocID030906 Rev 2
UM2271 AMOLED display limitation

9 AMOLED display limitation

Warning: Permanent image sticking may occur if AMOLED displays
same image for an extended period of time.

10 Hardware layout and configuration

32L4R9IDISCOVERY board is designed around the STM32L4R9AI (169 ball UFBGA package DSI version). The hardware block diagram between STM32L4R9AI and peripherals (PSRAM, Octo-SPI Flash, DSI color display, USB OTG connector, USART, audio, camera connector, STMod+ and PMOD connectors, IDD measurement, joystick, microSD card, I embedded ST-LINK). board. Mechanical drawing for 32L4R9IDISCOVERY and round DSI display boards is described in
Figure 6.
Figure 4 and Figure 5 help the user to locate these features on the
2
C extension connector, Arduino Uno shields and
Figure 3 illustrates the connection
DocID030906 Rev 2 11/78
77
Hardware layout and configuration UM2271
06Y9
*3,2
)0&
6:'
2FWR63,0B3
6'00&
3:5
86$57
63,
,&
86$57
'6,
'&0,
')6'0
57&+6(
,&
/38$57
6$,
27*
$5'FRQQHFWRU
302'
670RG
5HVHWEXWWRQ
-R\VWLFN
567Q*3,2
670/5$,
6(/
6(/
0ELW
DV\QFKURQRXV
365$0
99
SRZHUVXSSO\
67/,1.9
.+]FU\VWDO
0+]FU\VWDO
0ELW2FWR63,
)ODVKPHPRU\
7$*FRQQHFWRU
6:'FRQQHFWRU
0(0V
PLFURSKRQHV
8VHU/('
(;7B,&
FRQQHFWRU
0);9,''
PHDVXUHPHQW
/&'WRXFKSDQHO
'6,9FRQQHFWRU
8VHU/('
$XGLRFRGHF
DPSOLILHU
6WHUHRMDFNZLWK
PLFURSKRQH
&DPHUD
FRQQHFWRU
PLFUR6'
86%27* FRQQHFWRU

Figure 3. Hardware block diagram

12/78 DocID030906 Rev 2
UM2271 Hardware layout and configuration
06Y9
88
0LFURSKRQHV
8
365$08670/5$,,
&1
&DPHUDFRQQHFWRU
&1
670RGFRQQHFWRU
&1
302'
FRQQHFWRU
-3 3RZHU KHDGHU
-3
9''$B
9''86%
&1
6:'
FRQQHFWRU
-3
$5'B,1287
&1
7$*FRQQHFWRU
&1
(;7B,&FRQQHFWRU
&1
PLFUR6'FDUGFRQQHFWRU
%
-R\VWLFN
&1
86%27*)6
%
5HVHW
&1
'6,9
FRQQHFWRU
0%
'6,
GLVSOD\
ERDUG
SODFH

10.1 32L4R9IDISCOVERY layout

Figure 4. 32L4R9IDISCOVERY top side layout

DocID030906 Rev 2 13/78
77
Hardware layout and configuration UM2271
06Y9
&1&1$UGXLQRFRQQHFWRUV
&1 $XGLR
MDFN
8 $XGLR FRGHF
-3
9''
-3
9
SRZHU
/('
8
2FWR63,
)ODVK
PHPRU\
&1
86%
67/,1.
8
67/,1.
0&8
-3
966B67/.
6:6ZLWFK &1&1$UGXLQRFRQQHFWRUV 80);H[SDQGHU

Figure 5. 32L4R9IDISCOVERY bottom side layout

14/78 DocID030906 Rev 2
UM2271 Hardware layout and configuration

10.2 32L4R9IDISCOVERY mechanical drawing

Figure 6. 32L4R9IDISCOVERY mechanical drawing (top view, in mm)

Legend:
= Indicates the mounting hole between the 32L4R9IDISCOVERY board (at the top of Figure 6) and
the round DSI display board (at the bottom of Figure 6)
DocID030906 Rev 2 15/78
77
Hardware layout and configuration UM2271

Figure 7. 32L4R9IDISCOVERY mechanical drawing (bottom view, in mm)

Plastic spacer height = 13 mm, overall height = 26 mm ± 1 mm

10.3 Embedded ST_LINK/V2-1

The ST-LINK/V2-1 programming and debugging tool is integrated on the 32L4R9IDISCOVERY board. Compared to ST-LINK/V2, the changes are listed below:
new features supported on ST-LINK/V2-1: – USB software re-enumeration – Virtual Com port interface on USB – Mass storage interface on USB – USB power management request for more than 100 mA power on USB
features no more supported on ST-LINK/V2-1: –SWIM interface – Application voltage lower than 3 V
For general information concerning the debugging and programming features that are common to both versions V2 and V2-1, refer to ST-LINK/V2 in-circuit debugger/programmer.
16/78 DocID030906 Rev 2
UM2271 Hardware layout and configuration

10.3.1 Drivers

Before connecting the 32L4R9IDISCOVERY to a Windows (7, 8, 10) PC via USB, a driver for ST-LINK/V2-1 must be installed. It is available on the www.st.com website.
If 32L4R9IDISCOVERY is connected to the PC before the driver is installed, some interfaces of the board 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 as shown on
Note: Prefer using the ‘USB Composite Device’ handle for a full recovery.
Figure 8. How to update driver software
Figure 8: How to update driver software

10.3.2 ST-LINK/V2-1 firmware upgrade

The ST-LINK/V2-1 embeds a firmware upgrade mechanism for in-situ upgrade through the USB port. As the firmware may evolve during the life time of the ST-LINK/V2-1 product (such as new functionality, bug fixes or support for new microcontroller families), it is recommended to visit www.st.com before starting to use the 32L4R9IDISCOVERY and periodically, in order to stay up-to-date with the latest firmware version.

10.4 Low-power consumption status

There is a way to make the board get into very low power consumption status in which the current on +5
1. The connections between ST-LINK/V2-1 and MCU must be disconnected by micro switch SW1 manually (see ARD-5V IN position. Remove JP10. Then, connect an external 5 V power supply on CN16 pin 5 5V and on GND.
2. Peripherals (including display, CTP and PSRAM) are powered off by MOSFET which is controlled by MFX_GPIO8 / MFX_aGPIO2 (put them as input floating), and by setting
V can be below 20 uA. How to get into the low power mode:
Tabl e 3 below). Set JP4 on (7) ARD position, and put JP5 in
DocID030906 Rev 2 17/78
77
Hardware layout and configuration UM2271
21
21
all peripherals related I/Os to inactive level (input pull-down or input is good option according to I/Os).
3. Disconnect JP9 to remove +5 V from LD8 power LED, disconnect JP10 (or put it in 2-3 position), power off OCTOSPI (remove SB23/SB24) and configure related I/Os as input pull down.
4. Peripherals can be setup by FW to reach power down mode. All I/Os must be configured in non-consuming states. Set MFX_V3 to sleep mode, get SD card out of its socket slot. Set the Audio Codec in power down.

10.5 TAG and SWD

One TAG interface footprint CN8 is reserved on 32L4R9IDISCOVERY and is usable to debug and program the on-board MCU.
Note: Micro switch SW1 must be put in Off position. R24 and R31 must be disconnected.
The SWD 6-pin header CN5 added on 32L4R9IDISCOVERY, connected to on board ST­LINK MCU, is usable to debug and program an external MCU.
VDD from the external board is 1.8 V or 3.3 V, thanks to the on board voltage converter.

Table 2. JP10: VDD_STL setting

Jumper Setting Description
Default setting. VDD_STL gets power from 32L4R9IDISCOVERY. ST-LINK is
JP10
then usable to program the on-board MCU.
VDD_STL gets power from external through CN5. ST-LINK is then usable to program an external MCU.
SW1 is accessible on bottom side of 32L4R9IDISCOVERY. By default, SW1 is in On position. To put micro switch in Off position, just push away the switch from ON position as shown in
Tabl e 3.

Table 3. SW1 switch setting

Switch Setting Description
Default setting. SW1 switch is On.
SW1
SW1 is Off.
18/78 DocID030906 Rev 2
UM2271 Hardware layout and configuration
06Y9

10.6 Power supply

10.6.1 Power supply sources

32L4R9IDISCOVERY is designed to be powered by +5 V DC power supply. It is possible to configure the 32L4R9IDISCOVERY to use any of the sources listed in
By default, the JP4 header must have a jumper on (1) STLK and SW1 is placed in ON position. Any JP4 position different from (1) STLK requires SW1 to be placed in OFF position (see
Tabl e 3).
Table 4. 32L4R9IDISCOVERY power sources configuration
Tabl e 4.
JP4 configuration
(function)
(1) STLK (USB_STLINK) CN5 (VBUS) 5 V 500 mA
(3) E5V (ARDUINO) CN16 (VIN) 6 V - 9 V => 5 V
(5) U5V (USB_OTG_FS) CN8 (VBUS) 5 V 500 mA
(7) ARD (ARDUINO) CN16 (ARD-5V)
(9) CHGR (USB_STLINK) CN5 (VBUS) 5 V
1. ARD-5V is a power output pin to Arduino connector CN16 (default) or a power input pin from Arduino
connector CN16, according to JP5 setting. See Table 6 below.
Power source
connector (pin name)
(1)
Voltage Available current
Arduino Uno V3 shield
dependent
5 V
Arduino Uno V3 shield
dependent
Power supply
dependent
Note: 32L4R9IDISCOVERY must be powered by a power-supply unit or by an auxiliary equipment
complying with the standard EN-60950-1: 2006+A11/2009, and must be safety extra low voltage (SELV) with limited power capability.
Figure 9 shows a physical description of the 10-pin header JP4 default configuration.
Figure 9. JP4 default configuration
Detailed description of all JP4 possible configurations are listed below and in Ta b le 5:
STLK: 5 V from the ST-LINK/V2-1 USB connector CN13 with 500 mA current limitation. Power mechanism of supplying the board by STLINK/V2-1 is explained Section 10.6.3.
DocID030906 Rev 2 19/78
77
Hardware layout and configuration UM2271
67/.
(9
89 $5' &+*5
67/.
(9
89 $5' &+*5
67/.
(9
89 $5' &+*5
67/.
(9
89 $5' &+*5
67/.
(9
89 $5' &+*5
A jumper must be placed in location STLK of JP4, connecting pins 1 and 2. The green LED LD8 is lit on to confirm presence of 5 V voltage.
E5V: 5 V from the 6 V to 9 V DC from VIN pin of Arduino compatible connector CN16 (the U15 regulator is converting VIN into a 5 V voltage). The VIN input voltage is limited to 9 V to keep temperature of the regulator U15 within its thermal safe area. A jumper must be placed connecting pins 3 and 4 of JP4. The green LED LD8 is lit on to confirm presence of 5 V voltage. SW1 must be placed in OFF position.
U5V: 5 V from the 5 V DC of USB OTG FS user connector CN9. A jumper must be placed in location USB of JP4, connecting pins 5 and 6.The green LED LD8 is lit on to confirm presence of 5 V voltage. SW1 must be placed in OFF position.
ARD: 5 V from the 5 V of Arduino compatible connector CN16. A jumper must be placed in location ARD of JP4, connecting pins 7 and 8. The green LED LD8 is lit on to confirm presence of 5 V voltage and at t the same time, pins 2 and 3 of JP5 must be connected to get 5 V power from Arduino. SW1 must be placed in OFF position. In case the main board provides 5 V to Arduino compatible connector CN16, which is the default configuration, pins 1 and 2 of JP5 must be connected (see Tabl e 6 ).
CHGR: 5 V from 5 V DC power charger connected to USB STLINK (CN13). In this case, if 32L4R9IDISCOVERY is powered by an external USB charger, then the debug on CN13 is not available. When CHGR input is chosen, it is not recommended to connect a PC on USB STLINK, because the 500 mA limitation is no more effective and this may damage the PC. A jumper must be placed in location CHGR of JP4, connecting pins 9 and 10. The green LED LD8 is lit on to confirm presence of 5 V voltage. SW1 must be placed in OFF position.
Table 5. JP4: power source selector setting
Jumper Setting Description
Default setting. 32L4R9IDISCOVERY is supplied though CN13 Micro-B
ST-LINK/V2-1 connector.
32L4R9IDISCOVERY is supplied though Arduino connector CN16 (VIN).
JP4
32L4R9IDISCOVERY is supplied though USB OTG FS connector CN9.
32L4R9IDISCOVERY powers ARDUINO or is supplied by ARDUINO, according to JP5 setting in Tab l e 6 below.
32L4R9IDISCOVERY is supplied though CN13 Micro-B ST­LINK/V2-1 connector. In that case, the SB36 solder bridge must be soldered.
20/78 DocID030906 Rev 2
UM2271 Hardware layout and configuration
Table 6. JP5: ARD 5 V input/output voltage selection setting
Jumper Setting Description
Default setting. 32L4R9IDISCOVERY supplies 5 V to Arduino connector CN16.
JP5
32L4R9IDISCOVERY is supplied by 5 V from Arduino connector CN16.

10.6.2 MCU power supply options

32L4R9IDISCOVERY offers possibility to supply the MCU under 1.8 V or 3.3 V. The JP7 jumper must be placed on +3V3 to supply the MCU with 3.3 jumper can be placed on +1V8 of JP7 to supply the MCU with 1.8 pins
2 and 3 (see Table 7).
Functions listed below are not compatible with the +1V8 setting of JP7:
OCTOSPI
PSRAM
ARDUINO Uno Revision 3
CAMERA
microSD card
ADC measurements (except if JP3 is set at +3V3, or except if VREF+ configuration is
changed)
USB OTG FS (except if JP3 is set at +3V3)
Table 7. JP7: VDD setting
SW1 must be placed in OFF position.
V, connecting pins 1 and 2. The
V, connecting
Jumper Setting Description
Default setting. VDD is powered from +3V3 regulator.
JP7
VDD is powered from +1V8 regulator.

10.6.3 Supplying 32L4R9IDISCOVERY through ST-LINK/V2-1 USB

To power the board through ST-LINK/V2-1, the USB host (a PC) must be connected with the 32L4R9IDISCOVERY standard Micro-B USB receptacle, via a USB cable. This event starts the USB enumeration procedure. In its initial phase, the current supply capability of the USB host port is limited to 100 32L4R9IDISCOVERY draws power at that time. If the solder bridge SB36 is open (default setting), the U11 ST890 power switch is set to Off position, which isolates the remainder of the board from the power source. In the next phase of the enumeration procedure, the host PC informs the ST-LINK/V2-1 facility of its capability to supply up to 500 answer is positive, the ST-LINK/V2-1 sets the U11 ST890 switch to On position to supply power to the remainder of the board. If the PC USB port is not capable of supplying up to 500
mA, another power source must be used like VIN pin of connector CN16.
mA. It is enough because only ST-LINK/V2-1 part of
mA current. If the
DocID030906 Rev 2 21/78
77
Hardware layout and configuration UM2271
The ST890 power switch protects the host USB port against current demand exceeding 625
mA, in case a short circuit occurs on the board (the red LED fault LD5 lights on).
32L4R9IDISCOVERY can also be supplied by STLINK USB power source with no enumeration, such as a USB charger. In this particular case, the SB36 solder bridge must be closed. ST-LINK/V2-1 turns the ST890 power switch On regardless of enumeration procedure result and passes the power unconditionally to the board. The green LED LD8 lights on whenever the whole board is powered.

10.6.4 Measurement of MCU current consumption

Jumper JP1 allows the consumption of STM32L4R9AI to be measured directly by a built-in MCU current ammeter circuit (MFX_V3, able to measure from 60 removing the jumper and replace it by an external ammeter (see
To measure the MCU consumption in standby or shutdown modes, MFX_V3 needs to run software. To wake up MCU from these modes, it is necessary to press the Reset button B1, or to wait a few seconds.
Jumper Setting Description
JP1
Table 8. JP1: IDD_MCU measurement setting
Default setting. A module on the board is designed to measure from 60 nA to
50 mA by using several MOSFET, and switching automatically depending on the read value.
STM32L4R9AI is powered by VDD. MCU current measurement is not possible
No jumper on JP1: an ammeter can be connected on pins 2 and 3 to measure STM32L4R9AI current (if there is no ammeter, STM32L4R9AI is not powered).
nA to 50 mA) or by
Table 8).
VDDA and VDDUSB power inputs from STM32L4R9AI can be connected to two different power sources, +3V3 or VDD_MCU. These power inputs may be included or not in the IDD current measurement of VDD_MCU, depending on the JP3 jumper configurations described in
Tabl e 9.
Jumper Setting Description
JP3
22/78 DocID030906 Rev 2
Table 9. JP3: VDDA and VDDUSB, settings
Default setting. VDDA and VDDUSB power pins of STM32L4R9AI are supplied
with +3V3. the IDD measurement does not include their current consumption. USB OTG FS is functional even if JP7 is set on +1V8.
VDDA and VDDUSB power pins of STM32L4R9AI are supplied with VDD_MCU. The IDD measurement includes their current consumption.
UM2271 Hardware layout and configuration

10.6.5 Program or debug when power supply not from ST-LINK/V2-1

Before connecting the USB cable from ST-LINK/V2-1 CN13 to the PC, it is mandatory to power the board using the user USB OTG FS connector CN9 or the VIN pin of Arduino connector CN16. Proceeding this way ensures that the enumeration succeeds thanks to the external power source.
The following power-sequence procedure must be respected:
1. Put a jumper in JP4 at location U5V to use power from user USB CN9 or at location E5V to use power from VIN of Arduino connector CN16.
2. Connect the corresponding external power source.
3. Check the green LED LD8 is turned On.
4. Connect the PC to ST-LINK/V2-1 USB connector CN13.
If this order is not respected, the board may be powered by VBUS first from ST-LINK, and the following risks may be encountered:
If more than 500 mA current is needed by the board, PC may be damaged or current is limited by PC. As a consequence the board is not powered correctly.
500 mA is requested at the enumeration, so there is a risk that the request is rejected and enumeration does not succeed if PC cannot provide such current.

10.7 Clock sources

Two clock sources are used by STM32L4R9AI: one on LSE input and another on HSE input.
LSE clock source
The available clock source is X1, 32 kHz crystal for the STM32L4R9AI embedded RTC.
HSE clock source
The second clock source available by default is X2, 16 MHz crystal for the STM32L4R9AI HSE system clock.
Note that another HSE clocking option is available on PCB: MCO output from STLINK MCU to STM32L4R9AI HSE input. Please refer to

10.8 Reset Source

The general reset of 32L4R9IDISCOVERY is active low. The reset sources are listed below:
Reset button B1
Embedded ST-LINK/V2-1, SW1 micro-switch set to On (default setting)
Arduino compatible connector CN16 pin 3
The general reset is connected to following peripheral reset functions:
STM32L4R9AI MCU reset
Octo-SPI Flash reset
MFX_V3 reset
Camera reset
Appendix B: Solder bridges.
DocID030906 Rev 2 23/78
77
Hardware layout and configuration UM2271

10.9 Boot configuration

After reset, STM32L4R9AI boots from one of the three different embedded memory locations, depending on BOOT0 and BOOT1 bits:
Boot from the main Flash memory (MCU internal Flash). This is the default configuration.
Boot from the system memory ISP (in-system programming).
Boot from the SRAM1.
On 32L4R9IDISCOVERY board, the boot configuration of the MCU is controlled by the BOOT0 signal on PH3 pin.
BOOT0 is by default grounded through the R15 pull-down resistor.
It is possible to set BOOT0 high by removing resistor R15 and populating resistor R16 with a 10K resistor.
Please check below Tab l e 10 for other boot modes.

Table 10. Boot modes

nBOOT1
FLASH_OPTR[23]
XX01
XX01
X1X0
0X11
00X0
1X11
10X0
nBOOT0
FLASH_OPTR[27]

10.10 Audio codec

A Cirrus codec CS42L51-CNZ U26 connected to the SAI1 interface of STM32L4R9AI offers possibility to connect a stereo headphone or headset with a mono analog microphone.
BOOT0 pin
PH3
nSWBOOT0
FLASH_OPTR[26]
Boot Memory Space Alias
Main Flash memory is selected as boot area
System memory is selected as boot area
Main Flash memory is selected as boot area
Embedded SRAM1 is selected as boot area
Embedded SRAM1 is selected as boot area
System memory is selected as boot area
System memory is selected as boot area
The I²C-bus addresses of CS42L51-CNZ are 0x95 and 0x94.

10.11 DFSDM

Two ST-MEMS MP34DT01TR digital microphones U1 and U2 are available on 32L4R9IDISCOVERY. The two microphones are located at a distance of 21 other. They are connected to the STM32 DFSDM by the PC2 port, generating the clock, and
24/78 DocID030906 Rev 2
mm from each
Loading...
+ 54 hidden pages