1.. _nucleo_l476rg_board: 2 3ST Nucleo L476RG 4################ 5 6Overview 7******** 8 9The Nucleo L476RG board features an ARM Cortex-M4 based STM32L476RG MCU 10with a wide range of connectivity support and configurations. Here are 11some highlights of the Nucleo L476RG board: 12 13 14- STM32 microcontroller in QFP64 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 LEDs: USB communication (LD1), user LED (LD2), power LED (LD3) 27- Two push-buttons: USER and RESET 28 29.. image:: img/nucleo_l476rg.jpg 30 :align: center 31 :alt: Nucleo L476RG 32 33More information about the board can be found at the `Nucleo L476RG website`_. 34 35Hardware 36******** 37 38The STM32L476RG SoC provides the following hardware IPs: 39 40- Ultra-low-power with FlexPowerControl (down to 130 nA Standby mode and 100 uA/MHz run mode) 41- Core: ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU, frequency up to 80 MHz, 100DMIPS/1.25DMIPS/MHz (Dhrystone 2.1) 42- Clock Sources: 43 44 - 4 to 48 MHz crystal oscillator 45 - 32 kHz crystal oscillator for RTC (LSE) 46 - Internal 16 MHz factory-trimmed RC ( |plusminus| 1%) 47 - Internal low-power 32 kHz RC ( |plusminus| 5%) 48 - Internal multispeed 100 kHz to 48 MHz oscillator, auto-trimmed by 49 LSE (better than |plusminus| 0.25 % accuracy) 50 - 3 PLLs for system clock, USB, audio, ADC 51 52- RTC with HW calendar, alarms and calibration 53- LCD 8 x 40 or 4 x 44 with step-up converter 54- Up to 24 capacitive sensing channels: support touchkey, linear and rotary touch sensors 55- 16x timers: 56 57 - 2x 16-bit advanced motor-control 58 - 2x 32-bit and 5x 16-bit general purpose 59 - 2x 16-bit basic 60 - 2x low-power 16-bit timers (available in Stop mode) 61 - 2x watchdogs 62 - SysTick timer 63 64- Up to 114 fast I/Os, most 5 V-tolerant, up to 14 I/Os with independent supply down to 1.08 V 65- Memories 66 67 - Up to 1 MB Flash, 2 banks read-while-write, proprietary code readout protection 68 - Up to 128 KB of SRAM including 32 KB with hardware parity check 69 - External memory interface for static memories supporting SRAM, PSRAM, NOR and NAND memories 70 - Quad SPI memory interface 71 72- 4x digital filters for sigma delta modulator 73- Rich analog peripherals (independent supply) 74 75 - 3x 12-bit ADC 5 MSPS, up to 16-bit with hardware oversampling, 200 uA/MSPS 76 - 2x 12-bit DAC, low-power sample and hold 77 - 2x operational amplifiers with built-in PGA 78 - 2x ultra-low-power comparators 79 80- 18x communication interfaces 81 82 - USB OTG 2.0 full-speed, LPM and BCD 83 - 2x SAIs (serial audio interface) 84 - 3x I2C FM+(1 Mbit/s), SMBus/PMBus 85 - 6x USARTs (ISO 7816, LIN, IrDA, modem) 86 - 3x SPIs (4x SPIs with the Quad SPI) 87 - CAN (2.0B Active) and SDMMC interface 88 - SWPMI single wire protocol master I/F 89 90- 14-channel DMA controller 91- True random number generator 92- CRC calculation unit, 96-bit unique ID 93- Development support: serial wire debug (SWD), JTAG, Embedded Trace Macrocell |trade| 94 95 96More information about STM32L476RG can be found here: 97 98- `STM32L476RG on www.st.com`_ 99- `STM32L476 reference manual`_ 100 101Supported Features 102================== 103 104The Zephyr nucleo_l476rg board configuration supports the following hardware features: 105 106+-----------+------------+-------------------------------------+ 107| Interface | Controller | Driver/Component | 108+===========+============+=====================================+ 109| NVIC | on-chip | nested vector interrupt controller | 110+-----------+------------+-------------------------------------+ 111| UART | on-chip | serial port-polling; | 112| | | serial port-interrupt | 113+-----------+------------+-------------------------------------+ 114| PINMUX | on-chip | pinmux | 115+-----------+------------+-------------------------------------+ 116| GPIO | on-chip | gpio | 117+-----------+------------+-------------------------------------+ 118| I2C | on-chip | i2c | 119+-----------+------------+-------------------------------------+ 120| PWM | on-chip | pwm | 121+-----------+------------+-------------------------------------+ 122| SPI | on-chip | spi | 123+-----------+------------+-------------------------------------+ 124| ADC | on-chip | ADC Controller | 125+-----------+------------+-------------------------------------+ 126 127Other hardware features are not yet supported on this Zephyr port. 128 129The default configuration can be found in the defconfig file: 130``boards/arm/nucleo_l476rg/nucleo_l476rg_defconfig`` 131 132 133Connections and IOs 134=================== 135 136Nucleo L476RG Board has 8 GPIO controllers. These controllers are responsible for pin muxing, 137input/output, pull-up, etc. 138 139Available pins: 140--------------- 141.. image:: img/nucleo_l476rg_arduino.jpg 142 :align: center 143 :alt: Nucleo L476RG Arduino connectors 144.. image:: img/nucleo_l476rg_morpho.jpg 145 :align: center 146 :alt: Nucleo L476RG Morpho connectors 147 148For mode details please refer to `STM32 Nucleo-64 board User Manual`_. 149 150Default Zephyr Peripheral Mapping: 151---------------------------------- 152 153.. rst-class:: rst-columns 154 155- UART_1 TX/RX : PA9/PA10 156- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com) 157- UART_3 TX/RX : PB10/PB11 158- I2C_1 SCL/SDA : PB8/PB9 (Arduino I2C) 159- I2C_3 SCL/SDA : PC0/PC1 160- SPI_1 CS/SCK/MISO/MOSI : PB6/PA5/PA6/PA7 (Arduino SPI) 161- SPI_2 CS/SCK/MISO/MOSI : PB12/PB13/PB14/PB15 162- SPI_3 CS/SCK/MISO/MOSI : PA15/PC10/PC11/PC12 163- PWM_2_CH1 : PA0 164- USER_PB : PC13 165- LD2 : PA5 166 167System Clock 168------------ 169 170Nucleo L476RG System Clock could be driven by internal or external oscillator, 171as well as main PLL clock. By default System clock is driven by PLL clock at 80MHz, 172driven by 16MHz high speed internal oscillator. 173 174Serial Port 175----------- 176 177Nucleo L476RG board has 6 U(S)ARTs. The Zephyr console output is assigned to UART2. 178Default settings are 115200 8N1. 179 180 181Programming and Debugging 182************************* 183 184Applications for the ``nucleo_l476rg`` board configuration can be built and 185flashed in the usual way (see :ref:`build_an_application` and 186:ref:`application_run` for more details). 187 188Flashing 189======== 190 191Nucleo L476RG board includes an ST-LINK/V2-1 embedded debug tool 192interface. This interface is supported by the openocd version 193included in the Zephyr SDK since v0.9.2. 194 195Flashing an application to Nucleo L476RG 196---------------------------------------- 197 198Connect the Nucleo L476RG to your host computer using the USB port. 199Then build and flash an application. Here is an example for the 200:ref:`hello_world` application. 201 202Run a serial host program to connect with your Nucleo board: 203 204.. code-block:: console 205 206 $ minicom -D /dev/ttyACM0 207 208Then build and flash the application. 209 210.. zephyr-app-commands:: 211 :zephyr-app: samples/hello_world 212 :board: nucleo_l476rg 213 :goals: build flash 214 215You should see the following message on the console: 216 217.. code-block:: console 218 219 Hello World! arm 220 221Debugging 222========= 223 224You can debug an application in the usual way. Here is an example for the 225:ref:`hello_world` application. 226 227.. zephyr-app-commands:: 228 :zephyr-app: samples/hello_world 229 :board: nucleo_l476rg 230 :maybe-skip-config: 231 :goals: debug 232 233.. _Nucleo L476RG website: 234 https://www.st.com/en/evaluation-tools/nucleo-l476rg.html 235 236.. _STM32 Nucleo-64 board User Manual: 237 https://www.st.com/resource/en/user_manual/dm00105823.pdf 238 239.. _STM32L476RG on www.st.com: 240 https://www.st.com/en/microcontrollers/stm32l476rg.html 241 242.. _STM32L476 reference manual: 243 https://www.st.com/resource/en/reference_manual/DM00083560.pdf 244