1.. _nucleo_l4r5zi_board:
2
3ST Nucleo L4R5ZI
4################
5
6Overview
7********
8
9The Nucleo L4R5ZI board features an ARM Cortex-M4 based STM32L4R5ZI MCU
10with a wide range of connectivity support and configurations. Here are
11some highlights of the Nucleo L4R5ZI board:
12
13
14- STM32 microcontroller in LQFP144 package
15- Two types of extension resources:
16
17  - Arduino Uno V3 connectivity
18  - ST morpho extension pin headers for full access to all STM32 I/Os
19
20- On-board ST-LINK/V2-1 debugger/programmer with SWD connector
21- Flexible board power supply:
22
23  - USB VBUS or external source(3.3V, 5V, 7 - 12V)
24  - Power management access point
25
26- Three User LEDs: LD1 (Green), LD2 (Blue), LD3 (Red)
27- Two push-buttons: USER and RESET
28
29.. image:: img/nucleo_l4r5zi.jpg
30     :align: center
31     :alt: Nucleo L4R5ZI
32
33More information about the board can be found at the `Nucleo L4R5ZI website`_.
34
35Hardware
36********
37
38The STM32L4R5ZI SoC provides the following hardware IPs:
39
40- Ultra-low-power with FlexPowerControl (down to 130 nA Standby mode
41  and 100 uA/MHz run mode)
42- Core: ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU, adaptive
43  real-time accelerator (ART Accelerator) allowing 0-wait-state
44  execution from Flash memory, frequency up to 120 MHz, MPU, 150
45  DMIPS/1.25 DMIPS/MHz (Dhrystone 2.1), and DSP instructions
46- Clock Sources:
47
48  - 4 to 48 MHz crystal oscillator
49  - 32 kHz crystal oscillator for RTC (LSE)
50  - Internal 16 MHz factory-trimmed RC ( |plusminus| 1%)
51  - Internal low-power 32 kHz RC ( |plusminus| 5%)
52  - Internal multispeed 100 kHz to 48 MHz oscillator, auto-trimmed by
53    LSE (better than |plusminus| 0.25 % accuracy)
54  - Internal 48 MHz with clock recovery
55  - 3 PLLs for system clock, USB, audio, ADC
56
57- RTC with HW calendar, alarms and calibration
58- Up to 24 capacitive sensing channels: support touchkey, linear and
59  rotary touch sensors
60- Advanced graphics features
61
62  - Chrom-ART Accelerator™ (DMA2D) for enhanced graphic content creation
63  - Chrom-GRC™ (GFXMMU) allowing up to 20% of graphic resources optimization
64  - MIPI® DSI Host controller with two DSI lanes running at up to 500
65    Mbits/s each
66  - LCD-TFT controller
67
68- 16x timers
69
70  - 2 x 16-bit advanced motor-control
71  - 2 x 32-bit and 5 x 16-bit general purpose
72  - 2x 16-bit basic
73  - 2x low-power 16-bit timers (available in Stop mode)
74  - 2x watchdogs
75  - SysTick timer
76
77- Up to 136 fast I/Os, most 5 V-tolerant, up to 14 I/Os with
78  independent supply down to 1.08 V
79- Memories
80
81  - 2-Mbyte Flash, 2 banks read-while-write, proprietary code readout protection
82  - 640 Kbytes of SRAM including 64 Kbytes with hardware parity check
83  - External memory interface for static memories supporting SRAM,
84    PSRAM, NOR, NAND and FRAM memories
85  - 2 x OctoSPI memory interface
86
87- 4x digital filters for sigma delta modulator
88- Rich analog peripherals (independent supply)
89
90  - 12-bit ADC 5 Msps, up to 16-bit with hardware oversampling, 200 μA/Msps
91  - 2x 12-bit DAC, low-power sample and hold
92  - 2x operational amplifiers with built-in PGA
93  - 2x ultra-low-power comparators
94
95- 20x communication interfaces
96
97  - USB OTG 2.0 full-speed, LPM and BCD
98  - 2x SAIs (serial audio interface)
99  - 4x I2C FM+(1 Mbit/s), SMBus/PMBus
100  - 6x USARTs (ISO 7816, LIN, IrDA, modem)
101  - 3x SPIs (5x SPIs with the dual OctoSPI)
102  - CAN (2.0B Active) and SDMMC
103
104- 14-channel DMA controller
105- True random number generator
106- CRC calculation unit, 96-bit unique ID
107- 8- to 14-bit camera interface up to 32 MHz (black and white) or 10 MHz (color)
108- Development support: serial wire debug (SWD), JTAG, Embedded Trace
109  Macrocell (ETM)
110
111More information about STM32L4R5ZI can be found here:
112
113- `STM32L4R5ZI on www.st.com`_
114- `STM32L4R5 reference manual`_
115
116Supported Features
117==================
118
119The Zephyr nucleo_l4r5zi board configuration supports the following
120hardware features:
121
122+-----------+------------+-------------------------------------+
123| Interface | Controller | Driver/Component                    |
124+===========+============+=====================================+
125| NVIC      | on-chip    | nested vector interrupt controller  |
126+-----------+------------+-------------------------------------+
127| UART      | on-chip    | serial port-polling;                |
128|           |            | serial port-interrupt               |
129+-----------+------------+-------------------------------------+
130| PINMUX    | on-chip    | pinmux                              |
131+-----------+------------+-------------------------------------+
132| GPIO      | on-chip    | gpio                                |
133+-----------+------------+-------------------------------------+
134| I2C       | on-chip    | i2c                                 |
135+-----------+------------+-------------------------------------+
136| PWM       | on-chip    | pwm                                 |
137+-----------+------------+-------------------------------------+
138| SPI       | on-chip    | spi                                 |
139+-----------+------------+-------------------------------------+
140| USB       | on-chip    | usb                                 |
141+-----------+------------+-------------------------------------+
142| ADC       | on-chip    | adc                                 |
143+-----------+------------+-------------------------------------+
144
145Other hardware features are not yet supported on this Zephyr port.
146
147The default configuration can be found in the defconfig file:
148``boards/arm/nucleo_l4r5zi/nucleo_l4r5zi_defconfig``
149
150
151Connections and IOs
152===================
153
154Nucleo L4R5ZI Board has 8 GPIO controllers. These controllers are
155responsible for pin muxing, input/output, pull-up, etc.
156
157Available pins:
158---------------
159.. image:: img/nucleo144_layout.jpg
160     :align: center
161     :alt: Nucleo L4R5ZI Arduino connectors
162
163For mode details please refer to `STM32 Nucleo-144 board User Manual`_.
164
165Default Zephyr Peripheral Mapping:
166----------------------------------
167
168.. rst-class:: rst-columns
169
170- UART_1_TX : PA9
171- UART_1_RX : PA10
172- UART_2_TX : PA2
173- UART_2_RX : PA3
174- UART_3_TX : PB10
175- UART_3_RX : PB11
176- I2C_1_SCL : PB6
177- I2C_1_SDA : PB7
178- SPI_1_NSS : PD14
179- SPI_1_SCK : PA5
180- SPI_1_MISO : PA6
181- SPI_1_MOSI : PA7
182- SPI_2_NSS : PB12
183- SPI_2_SCK : PB13
184- SPI_2_MISO : PB14
185- SPI_2_MOSI : PB15
186- SPI_3_NSS : PB12
187- SPI_3_SCK : PC10
188- SPI_3_MISO : PC11
189- SPI_3_MOSI : PC12
190- PWM_2_CH1 : PA0
191- USER_PB : PC13
192- LD1 : PC7
193- LD2 : PB7
194- LD3 : PB14
195- USB DM : PA11
196- USB DP : PA12
197- ADC1 : PC0
198
199System Clock
200------------
201
202Nucleo L4R5ZI System Clock could be driven by internal or external
203oscillator, as well as main PLL clock. By default, the System clock is
204driven by the PLL clock at 80MHz, driven by a 16MHz high speed
205internal oscillator. The clock can be boosted to 120MHz if boost mode
206is selected.
207
208Serial Port
209-----------
210
211Nucleo L4R5ZI board has 5 U(S)ARTs. The Zephyr console output is
212assigned to UART2.  Default settings are 115200 8N1.
213
214Network interface
215-----------------
216
217Ethernet over USB is configured as the default network interface (EEM)
218
219Programming and Debugging
220*************************
221
222Connect the Nucleo L4R5ZI to your host computer using the USB port.
223Then build and flash an application. Here is an example for the
224:ref:`hello_world` application.
225
226Run a serial host program to connect with your Nucleo board:
227
228.. code-block:: console
229
230   $ minicom -D /dev/ttyACM0
231
232Then build and flash the application.
233
234.. zephyr-app-commands::
235   :zephyr-app: samples/hello_world
236   :board: nucleo_l4r5zi
237   :goals: build flash
238
239You should see the following message on the console:
240
241.. code-block:: console
242
243   Hello World! arm
244
245.. _Nucleo L4R5ZI website:
246   https://www.st.com/en/evaluation-tools/nucleo-l4r5zi.html
247
248.. _STM32 Nucleo-144 board User Manual:
249   https://www.st.com/resource/en/user_manual/dm00368330.pdf
250
251.. _STM32L4R5ZI on www.st.com:
252   https://www.st.com/en/microcontrollers/stm32l4r5zi.html
253
254.. _STM32L4R5 reference manual:
255   https://www.st.com/resource/en/reference_manual/DM00310109.pdf
256
257.. _STM32 ST-LINK utility:
258   https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link004.html
259