1.. zephyr:board:: nucleo_f072rb
2
3Overview
4********
5The STM32 Nucleo-64 development board with STM32F072RB 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 F072RB website`_.
21
22Hardware
23********
24Nucleo F072RB 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- On-board ST-LINK/V2-1 debugger/programmer with SWD connector:
33
34  - Selection-mode switch to use the kit as a standalone ST-LINK/V2-1
35
36- Flexible board power supply:
37
38  - USB VBUS or external source (3.3V, 5V, 7 - 12V)
39  - Power management access point
40
41- Three LEDs:
42
43  - USB communication (LD1), user LED (LD2), power LED (LD3)
44
45- Two push-buttons: USER and RESET
46- USB re-enumeration capability. Three different interfaces supported on USB:
47
48  - Virtual COM port
49  - Mass storage
50  - Debug port
51
52More information about STM32F072RB can be found in
53the `STM32F072 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
69Board connectors:
70-----------------
71.. image:: img/nucleo_f072rb_connectors.webp
72   :align: center
73   :alt: Nucleo F072RB connectors
74
75Default Zephyr Peripheral Mapping:
76----------------------------------
77
78- UART_1 TX/RX : PA9/PA10
79- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual COM Port)
80- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
81- I2C2 SCL/SDA : PB10/PB11
82- SPI1 NSS/SCK/MISO/MOSI : PB6/PA5/PA6/PA7 (Arduino SPI)
83- SPI2 SCK/MISO/MOSI : PB13/PB14/PB15
84- USER_PB : PC13
85- LD1 : PA5
86
87For more details please refer to `STM32 Nucleo-64 board User Manual`_.
88
89Programming and Debugging
90*************************
91
92.. zephyr:board-supported-runners::
93
94Nucleo F072RB board includes an ST-LINK/V2-1 embedded debug tool interface.
95
96Applications for the ``nucleo_f072rb`` board configuration can be built and
97flashed in the usual way (see :ref:`build_an_application` and
98:ref:`application_run` for more details).
99
100Flashing
101========
102
103The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
104so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
105
106Alternatively, OpenOCD or JLink can also be used to flash the board using
107the ``--runner`` (or ``-r``) option:
108
109.. code-block:: console
110
111   $ west flash --runner openocd
112   $ west flash --runner jlink
113
114Flashing an application to Nucleo F072RB
115----------------------------------------
116
117Here is an example for the :zephyr:code-sample:`blinky` application.
118
119.. zephyr-app-commands::
120   :zephyr-app: samples/basic/blinky
121   :board: nucleo_f072rb
122   :goals: build flash
123
124You will see the LED blinking every second.
125
126Debugging
127=========
128
129You can debug an application in the usual way.  Here is an example for the
130:zephyr:code-sample:`hello_world` application.
131
132.. zephyr-app-commands::
133   :zephyr-app: samples/hello_world
134   :board: nucleo_f072rb
135   :maybe-skip-config:
136   :goals: debug
137
138References
139**********
140
141.. target-notes::
142
143.. _Nucleo F072RB website:
144   https://www.st.com/en/evaluation-tools/nucleo-f072rb.html
145
146.. _STM32F072 reference manual:
147   https://www.st.com/resource/en/reference_manual/dm00031936.pdf
148
149.. _STM32 Nucleo-64 board User Manual:
150   https://www.st.com/resource/en/user_manual/dm00105823.pdf
151
152.. _STM32CubeProgrammer:
153   https://www.st.com/en/development-tools/stm32cubeprog.html
154