1.. zephyr:board:: nucleo_l073rz
2
3Overview
4********
5The STM32 Nucleo-64 development board with STM32L073RZ MCU, supports Arduino and ST morpho 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* Uno V3 connectivity support and the ST morpho headers 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 L073RZ website`_.
21
22Hardware
23********
24Nucleo L073RZ provides the following hardware components:
25
26- STM32 microcontroller in QFP64 package
27- Two types of extension resources:
28
29  - Arduino* Uno V3 connectivity
30  - ST morpho extension pin headers for full access to all STM32 I/Os
31
32- ARM* mbed*
33- On-board ST-LINK/V2-1 debugger/programmer with SWD connector:
34
35  - Selection-mode switch to use the kit as a standalone ST-LINK/V2-1
36
37- Flexible board power supply:
38
39  - USB VBUS or external source (3.3V, 5V, 7 - 12V)
40  - Power management access point
41
42- Three LEDs:
43
44  - USB communication (LD1), user LED (LD2), power LED (LD3)
45
46- Two push-buttons: USER and RESET
47- USB re-enumeration capability. Three different interfaces supported on USB:
48
49  - Virtual COM port
50  - Mass storage
51  - Debug port
52
53- Support of wide choice of Integrated Development Environments (IDEs) including:
54
55  - IAR
56  - ARM Keil
57  - GCC-based IDEs
58
59More information about STM32L073RZ can be found in the
60`STM32L0x3 reference manual`_
61
62
63Supported Features
64==================
65
66The Zephyr nucleo_l073rz board configuration supports the following hardware features:
67
68+-----------+------------+-------------------------------------+
69| Interface | Controller | Driver/Component                    |
70+===========+============+=====================================+
71| NVIC      | on-chip    | nested vector interrupt controller  |
72+-----------+------------+-------------------------------------+
73| UART      | on-chip    | serial port-polling;                |
74|           |            | serial port-interrupt               |
75+-----------+------------+-------------------------------------+
76| PINMUX    | on-chip    | pinmux                              |
77+-----------+------------+-------------------------------------+
78| GPIO      | on-chip    | gpio                                |
79+-----------+------------+-------------------------------------+
80| CLOCK     | on-chip    | reset and clock control             |
81+-----------+------------+-------------------------------------+
82| I2C       | on-chip    | i2c controller                      |
83+-----------+------------+-------------------------------------+
84| SPI       | on-chip    | spi controller                      |
85+-----------+------------+-------------------------------------+
86| WATCHDOG  | on-chip    | independent watchdog                |
87+-----------+------------+-------------------------------------+
88| PWM       | on-chip    | pwm                                 |
89+-----------+------------+-------------------------------------+
90| ADC       | on-chip    | ADC Controller                      |
91+-----------+------------+-------------------------------------+
92| DAC       | on-chip    | DAC Controller                      |
93+-----------+------------+-------------------------------------+
94| RNG       | on-chip    | Random Number Generator             |
95+-----------+------------+-------------------------------------+
96| EEPROM    | on-chip    | eeprom                              |
97+-----------+------------+-------------------------------------+
98| die-temp  | on-chip    | die temperature sensor              |
99+-----------+------------+-------------------------------------+
100| RTC       | on-chip    | rtc                                 |
101+-----------+------------+-------------------------------------+
102
103Other hardware features are not yet supported in this Zephyr port.
104
105The default configuration can be found in the defconfig file:
106:zephyr_file:`boards/st/nucleo_l073rz/nucleo_l073rz_defconfig`
107
108Connections and IOs
109===================
110
111Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as
112input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the
113GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current
114capable except for analog inputs.
115
116Board connectors:
117-----------------
118.. image:: img/nucleo_l073rz_connectors.jpg
119   :align: center
120   :alt: Nucleo L073RZ connectors
121
122Default Zephyr Peripheral Mapping:
123----------------------------------
124
125- UART_1 TX/RX : PB6/PB7
126- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com)
127- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
128- SPI1 SCK/MISO/MOSI : PA5/PA6/PA7 (Arduino SPI)
129- USER_PB   : PC13
130- LD2       : PA5
131- DAC       : PA4
132- PWM_2_CH1 : PA5 (might conflict with SPI1)
133
134For more details please refer to `STM32 Nucleo-64 board User Manual`_.
135
136Programming and Debugging
137*************************
138
139Nucleo L073RZ board includes an ST-LINK/V2-1 embedded debug tool interface.
140
141Applications for the ``nucleo_l073rz`` board configuration can be built and
142flashed in the usual way (see :ref:`build_an_application` and
143:ref:`application_run` for more details).
144
145Flashing
146========
147
148The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
149so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
150
151Alternatively, OpenOCD or JLink can also be used to flash the board using
152the ``--runner`` (or ``-r``) option:
153
154.. code-block:: console
155
156   $ west flash --runner openocd
157   $ west flash --runner jlink
158
159Flashing an application to Nucleo L073RZ
160----------------------------------------
161
162Here is an example for the :zephyr:code-sample:`blinky` application.
163
164.. zephyr-app-commands::
165   :zephyr-app: samples/basic/blinky
166   :board: nucleo_l073rz
167   :goals: build flash
168
169You will see the LED blinking every second.
170
171Debugging
172=========
173
174You can debug an application in the usual way.  Here is an example for the
175:zephyr:code-sample:`hello_world` application.
176
177.. zephyr-app-commands::
178   :zephyr-app: samples/hello_world
179   :board: nucleo_l073rz
180   :maybe-skip-config:
181   :goals: debug
182
183References
184**********
185
186.. target-notes::
187
188.. _Nucleo L073RZ website:
189   https://www.st.com/en/evaluation-tools/nucleo-l073rz.html
190
191.. _STM32L0x3 reference manual:
192   https://www.st.com/resource/en/reference_manual/dm00095744.pdf
193
194.. _STM32 Nucleo-64 board User Manual:
195   https://www.st.com/resource/en/user_manual/dm00105823.pdf
196
197.. _STM32CubeProgrammer:
198   https://www.st.com/en/development-tools/stm32cubeprog.html
199