1.. zephyr:board:: nucleo_l496zg 2 3Overview 4******** 5 6The Nucleo L496ZG board features an ARM Cortex-M4 based STM32L496ZG MCU 7with a wide range of connectivity support and configurations. Here are 8some highlights of the Nucleo L476ZG board: 9 10 11- STM32 microcontroller in QFP144 package 12- USB OTG FS with Micro-AB connector 13- Two types of extension resources: 14 15 - Arduino Uno V3 connectivity 16 - ST morpho extension pin headers for full access to all STM32 I/Os 17 18- On-board ST-LINK/V2-1 debugger/programmer with SWD connector 19- Flexible board power supply: 20 21 - USB VBUS or external source(3.3V, 5V, 7 - 12V) 22 - Power management access point 23 24- 8 LEDs: user LEDs (LD1, LD2, LD3), communication LED (LD4), USB 25 power fault(LD5), power LED (LD6), USB FS OTG (LD7, LD8) 26- 2 push buttons: USER and RESET 27 28More information about the board can be found at the `Nucleo L496ZG website`_. 29 30Hardware 31******** 32 33The STM32L496ZG SoC provides the following hardware capabilities: 34 35- Ultra-low-power with FlexPowerControl (down to 108 nA Standby mode and 91 uA/MHz run mode) 36- Core: ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU, frequency up to 80 MHz, 100DMIPS/1.25DMIPS/MHz (Dhrystone 2.1) 37- Clock Sources: 38 39 - 4 to 48 MHz crystal oscillator 40 - 32 kHz crystal oscillator for RTC (LSE) 41 - Internal 16 MHz factory-trimmed RC ( |plusminus| 1%) 42 - Internal low-power 32 kHz RC ( |plusminus| 5%) 43 - Internal multispeed 100 kHz to 48 MHz oscillator, auto-trimmed by 44 LSE (better than |plusminus| 0.25 % accuracy) 45 - 3 PLLs for system clock, USB, audio, ADC 46 47- RTC with HW calendar, alarms and calibration 48- LCD 8 x 40 or 4 x 44 with step-up converter 49- Up to 24 capacitive sensing channels: support touchkey, linear and rotary touch sensors 50- 16x timers: 51 52 - 2x 16-bit advanced motor-control 53 - 2x 32-bit and 5x 16-bit general purpose 54 - 2x 16-bit basic 55 - 2x low-power 16-bit timers (available in Stop mode) 56 - 2x watchdogs 57 - SysTick timer 58 59- Up to 114 fast I/Os, most 5 V-tolerant, up to 14 I/Os with independent supply down to 1.08 V 60- Memories 61 62 - Up to 1 MB Flash, 2 banks read-while-write, proprietary code readout protection 63 - Up to 320 KB of SRAM including 64 KB with hardware parity check 64 - External memory interface for static memories supporting SRAM, PSRAM, NOR and NAND memories 65 - Quad SPI memory interface 66 67- 4x digital filters for sigma delta modulator 68- Rich analog peripherals (independent supply) 69 70 - 3x 12-bit ADC 5 MSPS, up to 16-bit with hardware oversampling, 200 uA/MSPS 71 - 2x 12-bit DAC, low-power sample and hold 72 - 2x operational amplifiers with built-in PGA 73 - 2x ultra-low-power comparators 74 75- 20x communication interfaces 76 77 - USB OTG 2.0 full-speed, LPM and BCD 78 - 2x SAIs (serial audio interface) 79 - 4x I2C FM+(1 Mbit/s), SMBus/PMBus 80 - 5x U(S)ARTs (ISO 7816, LIN, IrDA, modem) 81 - 1x LPUART 82 - 3x SPIs (4x SPIs with the Quad SPI) 83 - 2x CAN (2.0B Active) and SDMMC interface 84 - SWPMI single wire protocol master I/F 85 - IRTIM (Infrared interface) 86 87- 14-channel DMA controller 88- True random number generator 89- CRC calculation unit, 96-bit unique ID 90- Development support: serial wire debug (SWD), JTAG, Embedded Trace Macrocell |trade| 91 92 93More information about STM32L496ZG can be found here: 94 95- `STM32L496ZG on www.st.com`_ 96- `STM32L496 reference manual`_ 97 98Supported Features 99================== 100 101The Zephyr nucleo_l496zg board configuration supports the following hardware features: 102 103+-----------+------------+-------------------------------------+ 104| Interface | Controller | Driver/Component | 105+===========+============+=====================================+ 106| NVIC | on-chip | nested vector interrupt controller | 107+-----------+------------+-------------------------------------+ 108| UART | on-chip | serial port-polling; | 109| | | serial port-interrupt | 110+-----------+------------+-------------------------------------+ 111| PINMUX | on-chip | pinmux | 112+-----------+------------+-------------------------------------+ 113| GPIO | on-chip | gpio | 114+-----------+------------+-------------------------------------+ 115| I2C | on-chip | i2c | 116+-----------+------------+-------------------------------------+ 117| SPI | on-chip | spi | 118+-----------+------------+-------------------------------------+ 119| PWM | on-chip | pwm | 120+-----------+------------+-------------------------------------+ 121| RTC | on-chip | rtc | 122+-----------+------------+-------------------------------------+ 123| OTG FS | on-chip | USB OTG Full-speed | 124+-----------+------------+-------------------------------------+ 125| WATCHDOG | on-chip | System Window Watchdog | 126+-----------+------------+-------------------------------------+ 127 128Other hardware features are not yet supported on this Zephyr port. 129 130The default configuration can be found in the defconfig file: 131:zephyr_file:`boards/st/nucleo_l496zg/nucleo_l496zg_defconfig` 132 133 134Connections and IOs 135=================== 136 137Nucleo L496ZG Board has 8 GPIO controllers. These controllers are responsible for pin muxing, 138input/output, pull-up, etc. 139 140For more details please refer to `STM32 Nucleo-144 board User Manual`_. 141 142Default Zephyr Peripheral Mapping: 143---------------------------------- 144 145- UART_2 TX/RX : PD5/PD6 146- UART_3 TX/RX : PD8/PD9 147- LPUART_1 TX/RX : PG7/PG8 148- PWM_1_CH1: PE9 149- PWM_1_CH2: PE11 150- PWM_1_CH3: PE13 151- PWM_2_CH1: PA0 152- I2C_1_SCL: PB8 153- I2C_1_SDA: PB7 154- SPI_1_NSS: PD14 155- SPI_1_SCK: PA5 156- SPI_1_MISO: PA6 157- SPI_1_MOSI: PA7 158- USER_PB : PC13 159- LD1 : PC7 160- LD2 : PB7 161- LD3 : PB14 162 163System Clock 164------------ 165 166Nucleo L496ZG System Clock could be driven by internal or external oscillator, 167as well as main PLL clock. By default System clock is driven by PLL clock at 80MHz, 168driven by 16MHz high speed internal oscillator. 169 170Serial Port 171----------- 172 173Nucleo L496ZG board has 5 U(S)ARTs. The Zephyr console output is assigned to UART2. 174Default settings are 115200 8N1. 175 176 177Programming and Debugging 178************************* 179 180Nucleo L496ZG board includes an ST-LINK/V2-1 embedded debug tool interface. 181 182Applications for the ``nucleo_l496zg`` board configuration can be built and 183flashed in the usual way (see :ref:`build_an_application` and 184:ref:`application_run` for more details). 185 186Flashing 187======== 188 189The board is configured to be flashed using west `STM32CubeProgrammer`_ runner, 190so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required. 191 192Alternatively, OpenOCD or JLink can also be used to flash the board using 193the ``--runner`` (or ``-r``) option: 194 195.. code-block:: console 196 197 $ west flash --runner openocd 198 $ west flash --runner jlink 199 200Flashing an application to Nucleo L496ZG 201---------------------------------------- 202 203Connect the Nucleo L496ZG to your host computer using the USB port. 204Then build and flash an application. Here is an example for the 205:zephyr:code-sample:`hello_world` application. 206 207Run a serial host program to connect with your Nucleo board: 208 209.. code-block:: console 210 211 $ minicom -D /dev/ttyUSB0 212 213Then build and flash the application. 214 215.. zephyr-app-commands:: 216 :zephyr-app: samples/hello_world 217 :board: nucleo_l496zg 218 :goals: build flash 219 220You should see the following message on the console: 221 222.. code-block:: console 223 224 Hello World! arm 225 226Debugging 227========= 228 229You can debug an application in the usual way. Here is an example for the 230:zephyr:code-sample:`hello_world` application. 231 232.. zephyr-app-commands:: 233 :zephyr-app: samples/hello_world 234 :board: nucleo_l496zg 235 :maybe-skip-config: 236 :goals: debug 237 238.. _Nucleo L496ZG website: 239 https://www.st.com/en/evaluation-tools/nucleo-l496zg.html 240 241.. _STM32 Nucleo-144 board User Manual: 242 https://www.st.com/resource/en/user_manual/dm00368330.pdf 243 244.. _STM32L496ZG on www.st.com: 245 https://www.st.com/en/microcontrollers/stm32l496zg.html 246 247.. _STM32L496 reference manual: 248 https://www.st.com/resource/en/reference_manual/dm00083560.pdf 249 250.. _STM32CubeProgrammer: 251 https://www.st.com/en/development-tools/stm32cubeprog.html 252