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| RTC | on-chip | rtc | 145+-----------+------------+-------------------------------------+ 146 147Other hardware features are not yet supported on this Zephyr port. 148 149The default configuration can be found in the defconfig file: 150:zephyr_file:`boards/st/nucleo_l4r5zi/nucleo_l4r5zi_defconfig` 151 152 153Connections and IOs 154=================== 155 156Nucleo L4R5ZI Board has 8 GPIO controllers. These controllers are 157responsible for pin muxing, input/output, pull-up, etc. 158 159Available pins: 160--------------- 161.. image:: img/nucleo144_layout.jpg 162 :align: center 163 :alt: Nucleo L4R5ZI Arduino connectors 164 165For more details please refer to `STM32 Nucleo-144 board User Manual`_. 166 167Default Zephyr Peripheral Mapping: 168---------------------------------- 169 170.. rst-class:: rst-columns 171 172- UART_1_TX : PA9 173- UART_1_RX : PA10 174- UART_2_TX : PA2 175- UART_2_RX : PA3 176- UART_3_TX : PB10 177- UART_3_RX : PB11 178- I2C_1_SCL : PB6 179- I2C_1_SDA : PB7 180- SPI_1_NSS : PD14 181- SPI_1_SCK : PA5 182- SPI_1_MISO : PA6 183- SPI_1_MOSI : PA7 184- SPI_2_NSS : PB12 185- SPI_2_SCK : PB13 186- SPI_2_MISO : PB14 187- SPI_2_MOSI : PB15 188- SPI_3_NSS : PB12 189- SPI_3_SCK : PC10 190- SPI_3_MISO : PC11 191- SPI_3_MOSI : PC12 192- PWM_2_CH1 : PA0 193- USER_PB : PC13 194- LD1 : PC7 195- LD2 : PB7 196- LD3 : PB14 197- USB DM : PA11 198- USB DP : PA12 199- ADC1 : PC0 200 201System Clock 202------------ 203 204Nucleo L4R5ZI System Clock could be driven by internal or external 205oscillator, as well as main PLL clock. By default, the System clock is 206driven by the PLL clock at 80MHz, driven by a 16MHz high speed 207internal oscillator. The clock can be boosted to 120MHz if boost mode 208is selected. 209 210Serial Port 211----------- 212 213Nucleo L4R5ZI board has 5 U(S)ARTs. The Zephyr console output is 214assigned to UART2. Default settings are 115200 8N1. 215 216Network interface 217----------------- 218 219Ethernet over USB is configured as the default network interface (EEM) 220 221Programming and Debugging 222************************* 223 224The NUCLEO-L4R5ZI board includes a ST-LINK/V2 embedded debug tool interface. 225 226The board is configured to be flashed using west `STM32CubeProgrammer`_ runner, 227so its installation is required to be able to flash the board. 228 229Alternatively, openocd (provided in Zephyr SDK) or JLink can also be used to 230flash the board using the ``--runner`` (or ``-r``) option: 231 232.. code-block:: console 233 234 $ west flash --runner openocd 235 $ west flash --runner jlink 236 237Connect the Nucleo L4R5ZI to your host computer using the USB port. 238Then build and flash an application. 239 240Here is an example for the :ref:`hello_world` application. 241 242Run a serial host program to connect with your Nucleo board: 243 244.. code-block:: console 245 246 $ minicom -D /dev/ttyACM0 247 248Then build and flash the application. 249 250.. zephyr-app-commands:: 251 :zephyr-app: samples/hello_world 252 :board: nucleo_l4r5zi 253 :goals: build flash 254 255You should see the following message on the console: 256 257.. code-block:: console 258 259 Hello World! arm 260 261.. _Nucleo L4R5ZI website: 262 https://www.st.com/en/evaluation-tools/nucleo-l4r5zi.html 263 264.. _STM32 Nucleo-144 board User Manual: 265 https://www.st.com/resource/en/user_manual/dm00368330.pdf 266 267.. _STM32L4R5ZI on www.st.com: 268 https://www.st.com/en/microcontrollers/stm32l4r5zi.html 269 270.. _STM32L4R5 reference manual: 271 https://www.st.com/resource/en/reference_manual/DM00310109.pdf 272 273.. _STM32 ST-LINK utility: 274 https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link004.html 275 276.. _STM32CubeProgrammer: 277 https://www.st.com/en/development-tools/stm32cubeprog.html 278