1.. zephyr:board:: nucleo_l011k4
2
3Overview
4********
5The STM32 Nucleo-32 development board with STM32L011K4 MCU, supports Arduino Nano V3 connectivity.
6
7The STM32 Nucleo board provides an affordable, and flexible way for users to try out new concepts,
8and build prototypes with the STM32 microcontroller, choosing from the various
9combinations of performance, power consumption, and features.
10
11The Arduino* Nano V3 connectivity support allow easy functionality
12expansion of the STM32 Nucleo open development platform with a wide choice of
13specialized shields.
14
15The STM32 Nucleo board integrates the ST-LINK/V2-1 debugger and programmer.
16
17The STM32 Nucleo board comes with the STM32 comprehensive software HAL library together
18with various packaged software examples.
19
20More information about the board can be found at the `Nucleo L011K4 website`_.
21
22Hardware
23********
24Nucleo L011K4 provides the following hardware components:
25
26- STM32 microcontroller in LQFP32 package
27- Extension resource:
28
29  - Arduino* Nano V3 connectivity
30
31- On-board ST-LINK/V2-1 debugger/programmer with SWD connector:
32
33  - Selection-mode switch to use the kit as a standalone ST-LINK/V2-1
34
35- Flexible board power supply:
36
37  - USB VBUS or external source (3.3V, 5V, 7 - 12V)
38  - Power management access point
39
40- Three LEDs:
41
42  - USB communication (LD1), user LED (LD2), power LED (LD3)
43
44- One push-button: RESET
45- USB re-enumeration capability. Three different interfaces supported on USB:
46
47  - Virtual COM port
48  - Mass storage
49  - Debug port
50
51
52More information about STM32L011K4 can be found in the
53`STM32L0x1 reference manual`_
54
55
56Supported Features
57==================
58
59.. zephyr:board-supported-hw::
60
61Connections and IOs
62===================
63
64Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as
65input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the
66GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current
67capable except for analog inputs.
68
69Default Zephyr Peripheral Mapping:
70----------------------------------
71
72- UART_2 TX/RX : PA2/PA15 (ST-Link Virtual Port Com)
73- I2C1 SCL/SDA : PA4/PA10 (Arduino I2C)
74- SPI1 SCK/MISO/MOSI : PA5/PA6/PA7 (Arduino SPI)
75- LD2       : PB3
76
77For more details please refer to `STM32 Nucleo-32 board User Manual`_.
78
79Programming and Debugging
80*************************
81
82Nucleo L011K4 board includes an ST-LINK/V2-1 embedded debug tool interface.
83
84Applications for the ``nucleo_l011k4`` board configuration can be built and
85flashed in the usual way (see :ref:`build_an_application` and
86:ref:`application_run` for more details).
87
88Flashing
89========
90
91The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
92so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
93
94Alternatively, OpenOCD or JLink can also be used to flash the board using
95the ``--runner`` (or ``-r``) option:
96
97.. code-block:: console
98
99   $ west flash --runner openocd
100   $ west flash --runner jlink
101
102Flashing an application to Nucleo L011K4
103----------------------------------------
104
105Here is an example for the :zephyr:code-sample:`blinky` application.
106
107.. zephyr-app-commands::
108   :zephyr-app: samples/basic/blinky
109   :board: nucleo_l011k4
110   :goals: build flash
111
112You will see the LED blinking every second.
113
114Debugging
115=========
116
117You can debug an application in the usual way.  Here is an example for the
118:zephyr:code-sample:`hello_world` application.
119
120.. zephyr-app-commands::
121   :zephyr-app: samples/hello_world
122   :board: nucleo_l011k4
123   :maybe-skip-config:
124   :goals: debug
125
126References
127**********
128
129.. target-notes::
130
131.. _Nucleo L011K4 website:
132   https://www.st.com/en/evaluation-tools/nucleo-l011k4.html
133
134.. _STM32L0x1 reference manual:
135   https://www.st.com/resource/en/reference_manual/dm00108282-ultralowpower-stm32l0x1-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
136
137.. _STM32 Nucleo-32 board User Manual:
138   https://www.st.com/resource/en/user_manual/dm00231744-stm32-nucleo32-boards-mb1180-stmicroelectronics.pdf
139
140.. _STM32CubeProgrammer:
141   https://www.st.com/en/development-tools/stm32cubeprog.html
142