1.. _nucleo_l432kc_board: 2 3ST Nucleo L432KC 4################ 5 6Overview 7******** 8 9The Nucleo L432KC board features an ARM Cortex-M4 based STM32L432KC MCU 10with a wide range of connectivity support and configurations. Here are 11some highlights of the Nucleo L432KC board: 12 13- STM32 microcontroller in UFQFPN32 package 14- Arduino Uno V3 connectivity 15- On-board ST-LINK/V2-1 debugger/programmer with SWD connector 16- Flexible board power supply: 17 18 - USB VBUS or external source(3.3V, 5V, 7 - 12V) 19 - Power management access point 20 21- Three LEDs: USB communication (LD1), power LED (LD2), user LED (LD3) 22- One push-button: RESET 23 24.. image:: img/nucleo_l432kc.jpg 25 :align: center 26 :alt: Nucleo L432KC 27 28More information about the board can be found at the `Nucleo L432KC website`_. 29 30Hardware 31******** 32 33The STM32L432KC SoC provides the following hardware IPs: 34 35- Ultra-low-power with FlexPowerControl (down to 28 nA Standby mode and 84 36 |micro| A/MHz run mode) 37- Core: ARM |reg| 32-bit Cortex |reg| -M4 CPU with FPU, frequency up to 80 MHz, 38 100DMIPS/1.25DMIPS/MHz (Dhrystone 2.1) 39- Clock Sources: 40 41 - 32 kHz crystal oscillator for RTC (LSE) 42 - Internal 16 MHz factory-trimmed RC ( |plusminus| 1%) 43 - Internal low-power 32 kHz RC ( |plusminus| 5%) 44 - Internal multispeed 100 kHz to 48 MHz oscillator, auto-trimmed by 45 LSE (better than |plusminus| 0.25 % accuracy) 46 - 2 PLLs for system clock, USB, audio, ADC 47 48- RTC with HW calendar, alarms and calibration 49- Up to 3 capacitive sensing channels: support touchkey, linear and rotary touch sensors 50- 11x timers: 51 52 - 1x 16-bit advanced motor-control 53 - 1x 32-bit and 2x 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 26 fast I/Os, most 5 V-tolerant 60- Memories 61 62 - Up to 256 KB single bank Flash, proprietary code readout protection 63 - Up to 64 KB of SRAM including 16 KB with hardware parity check 64 - Quad SPI memory interface 65 66- Rich analog peripherals (independent supply) 67 68 - 1x 12-bit ADC 5 MSPS, up to 16-bit with hardware oversampling, 200 69 |micro| A/MSPS 70 - 2x 12-bit DAC, low-power sample and hold 71 - 1x operational amplifiers with built-in PGA 72 - 2x ultra-low-power comparators 73 74- 13x communication interfaces 75 76 - USB OTG 2.0 full-speed crystal less solution with LPM and BCD 77 - 1x SAIs (serial audio interface) 78 - 2x I2C FM+(1 Mbit/s), SMBus/PMBus 79 - 3x USARTs (ISO 7816, LIN, IrDA, modem) 80 - 2x SPIs (3x SPIs with the Quad SPI) 81 - CAN (2.0B Active) 82 - SWPMI single wire protocol master I/F 83 - IRTIM (Infrared interface) 84 85- 14-channel DMA controller 86- True random number generator 87- CRC calculation unit, 96-bit unique ID 88- Development support: serial wire debug (SWD), JTAG, Embedded Trace Macrocell* 89 90 91More information about STM32L432KC can be found here: 92 93- `STM32L432KC on www.st.com`_ 94- `STM32L432 reference manual`_ 95 96Supported Features 97================== 98 99The Zephyr nucleo_l432kc board configuration supports the following hardware features: 100 101+-----------+------------+-------------------------------------+ 102| Interface | Controller | Driver/Component | 103+===========+============+=====================================+ 104| NVIC | on-chip | nested vector interrupt controller | 105+-----------+------------+-------------------------------------+ 106| UART | on-chip | serial port-polling; | 107| | | serial port-interrupt | 108+-----------+------------+-------------------------------------+ 109| PINMUX | on-chip | pinmux | 110+-----------+------------+-------------------------------------+ 111| GPIO | on-chip | gpio | 112+-----------+------------+-------------------------------------+ 113| I2C | on-chip | i2c | 114+-----------+------------+-------------------------------------+ 115| PWM | on-chip | pwm | 116+-----------+------------+-------------------------------------+ 117| CAN | on-chip | can | 118+-----------+------------+-------------------------------------+ 119 120.. note:: CAN feature requires CAN transceiver 121 122Other hardware features are not yet supported on this Zephyr port. 123 124The default configuration can be found in the defconfig file: 125``boards/arm/nucleo_l432kc/nucleo_l432kc_defconfig`` 126 127 128Connections and IOs 129=================== 130 131Nucleo L432KC Board has 6 GPIO controllers. These controllers are responsible for pin muxing, 132input/output, pull-up, etc. 133 134Available pins: 135--------------- 136.. image:: img/nucleo_l432kc_arduino_nano.jpg 137 :align: center 138 :alt: Nucleo L432KC Arduino connectors 139 140For mode details please refer to `STM32 Nucleo-32 board User Manual`_. 141 142Default Zephyr Peripheral Mapping: 143---------------------------------- 144 145- UART_1_TX : PA9 146- UART_1_RX : PA10 147- UART_2_TX : PA2 148- UART_2_RX : PA3 149- I2C_1_SCL : PB6 150- I2C_1_SDA : PB7 151- PWM_2_CH1 : PA0 152- LD3 : PB3 153 154System Clock 155------------ 156 157Nucleo L432KC System Clock could be driven by internal or external oscillator, 158as well as main PLL clock. By default System clock is driven by PLL clock at 80MHz, 159driven by 16MHz high speed internal oscillator. 160 161Serial Port 162----------- 163 164Nucleo L432KC board has 3 U(S)ARTs. The Zephyr console output is assigned to UART2. 165Default settings are 115200 8N1. 166 167 168Programming and Debugging 169************************* 170 171Applications for the ``nucleo_l432kc`` board configuration can be built and 172flashed in the usual way (see :ref:`build_an_application` and 173:ref:`application_run` for more details). 174 175Flashing 176======== 177 178Nucleo L432KC board includes an ST-LINK/V2-1 embedded debug tool 179interface. This interface is supported by the openocd version 180included in the Zephyr SDK since v0.9.2. 181 182Flashing an application to Nucleo L432KC 183---------------------------------------- 184 185Connect the Nucleo L432KC to your host computer using the USB port, 186then run a serial host program to connect with your Nucleo board. 187 188.. code-block:: console 189 190 $ minicom -D /dev/ttyACM0 191 192Now build and flash an application. Here is an example for 193:ref:`hello_world`. 194 195.. zephyr-app-commands:: 196 :zephyr-app: samples/hello_world 197 :board: nucleo_l432kc 198 :goals: build flash 199 200You should see the following message on the console: 201 202.. code-block:: console 203 204 $ Hello World! arm 205 206 207Debugging 208========= 209 210You can debug an application in the usual way. Here is an example for the 211:ref:`hello_world` application. 212 213.. zephyr-app-commands:: 214 :zephyr-app: samples/hello_world 215 :board: nucleo_l432kc 216 :maybe-skip-config: 217 :goals: debug 218 219.. _Nucleo L432KC website: 220 https://www.st.com/en/evaluation-tools/nucleo-l432kc.html 221 222.. _STM32 Nucleo-32 board User Manual: 223 https://www.st.com/resource/en/user_manual/dm00231744.pdf 224 225.. _STM32L432KC on www.st.com: 226 https://www.st.com/en/microcontrollers/stm32l432kc.html 227 228.. _STM32L432 reference manual: 229 https://www.st.com/resource/en/reference_manual/dm00151940.pdf 230