1.. zephyr:board:: nucleo_f070rb
2
3Overview
4********
5The STM32 Nucleo-64 development board with STM32F070RB 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 F070RB website`_.
21
22Hardware
23********
24Nucleo F070RB 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 STM32F070RB can be found in
60the `STM32F070 reference manual`_ .
61
62
63Supported Features
64==================
65
66The Zephyr nucleo_f070rb 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| FLASH     | on-chip    | flash memory                        |
83+-----------+------------+-------------------------------------+
84| WATCHDOG  | on-chip    | independent watchdog                |
85+-----------+------------+-------------------------------------+
86| I2C       | on-chip    | i2c controller                      |
87+-----------+------------+-------------------------------------+
88| SPI       | on-chip    | SPI controller                      |
89+-----------+------------+-------------------------------------+
90| RTC       | on-chip    | rtc                                 |
91+-----------+------------+-------------------------------------+
92
93Other hardware features are not yet supported in this Zephyr port.
94
95The default configuration can be found in
96:zephyr_file:`boards/st/nucleo_f070rb/nucleo_f070rb_defconfig`
97
98Connections and IOs
99===================
100
101Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as
102input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the
103GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current
104capable except for analog inputs.
105
106Board connectors:
107-----------------
108.. image:: img/nucleo_f070rb_connectors.jpg
109   :align: center
110   :alt: Nucleo F070RB connectors
111
112Default Zephyr Peripheral Mapping:
113----------------------------------
114
115- UART_1 TX/RX : PA9/PA10
116- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual COM Port)
117- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
118- I2C2 SCL/SDA : PB10/PB11
119- SPI1 NSS/SCK/MISO/MOSI : PB6/PA5/PA6/PA7 (Arduino SPI)
120- SPI2 SCK/MISO/MOSI : PB13/PB14/PB15
121- USER_PB : PC13
122- LD1 : PA5
123
124For more details please refer to `STM32 Nucleo-64 board User Manual`_.
125
126Programming and Debugging
127*************************
128
129Nucleo F070RB board includes an ST-LINK/V2-1 embedded debug tool interface.
130
131Applications for the ``nucleo_f070rb`` board configuration can be built and
132flashed in the usual way (see :ref:`build_an_application` and
133:ref:`application_run` for more details).
134
135Flashing
136========
137
138The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
139so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
140
141Alternatively, OpenOCD or JLink can also be used to flash the board using
142the ``--runner`` (or ``-r``) option:
143
144.. code-block:: console
145
146   $ west flash --runner openocd
147   $ west flash --runner jlink
148
149Flashing an application to Nucleo F070RB
150----------------------------------------
151
152Here is an example for the :zephyr:code-sample:`blinky` application.
153
154.. zephyr-app-commands::
155   :zephyr-app: samples/basic/blinky
156   :board: nucleo_f070rb
157   :goals: build flash
158
159You will see the LED blinking every second.
160
161Debugging
162=========
163
164You can debug an application in the usual way.  Here is an example for the
165:zephyr:code-sample:`hello_world` application.
166
167.. zephyr-app-commands::
168   :zephyr-app: samples/hello_world
169   :board: nucleo_f070rb
170   :maybe-skip-config:
171   :goals: debug
172
173References
174**********
175
176.. target-notes::
177
178.. _Nucleo F070RB website:
179   https://www.st.com/en/evaluation-tools/nucleo-f070rb.html
180
181.. _STM32F070 reference manual:
182   https://www.st.com/resource/en/reference_manual/dm00031936.pdf
183
184.. _STM32 Nucleo-64 board User Manual:
185   https://www.st.com/resource/en/user_manual/dm00105823.pdf
186
187.. _STM32CubeProgrammer:
188   https://www.st.com/en/development-tools/stm32cubeprog.html
189