1.. zephyr:board:: nucleo_f030r8
2
3Overview
4********
5The STM32 Nucleo-64 development board with STM32F030R8 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 F030R8 website`_.
21
22Hardware
23********
24Nucleo F030R8 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 STM32F030R8 can be found here:
60
61- `STM32F030 reference manual`_
62- `STM32F030 data sheet`_
63
64Supported Features
65==================
66
67The Zephyr nucleo_f030r8 board configuration supports the following hardware features:
68
69+-----------+------------+-------------------------------------+
70| Interface | Controller | Driver/Component                    |
71+===========+============+=====================================+
72| NVIC      | on-chip    | nested vector interrupt controller  |
73+-----------+------------+-------------------------------------+
74| UART      | on-chip    | serial port-polling;                |
75|           |            | serial port-interrupt               |
76+-----------+------------+-------------------------------------+
77| PINMUX    | on-chip    | pinmux                              |
78+-----------+------------+-------------------------------------+
79| GPIO      | on-chip    | gpio                                |
80+-----------+------------+-------------------------------------+
81| CLOCK     | on-chip    | reset and clock control             |
82+-----------+------------+-------------------------------------+
83| FLASH     | on-chip    | flash memory                        |
84+-----------+------------+-------------------------------------+
85| WATCHDOG  | on-chip    | independent watchdog                |
86+-----------+------------+-------------------------------------+
87| I2C       | on-chip    | i2c controller                      |
88+-----------+------------+-------------------------------------+
89| ADC       | on-chip    | ADC controller                      |
90+-----------+------------+-------------------------------------+
91
92Other hardware features are not yet supported in this Zephyr port.
93
94The default configuration can be found in
95:zephyr_file:`boards/st/nucleo_f030r8/nucleo_f030r8_defconfig`
96
97Connections and IOs
98===================
99
100Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as
101input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the
102GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current
103capable except for analog inputs.
104
105Board connectors:
106-----------------
107.. image:: img/nucleo_f030r8_connectors.jpg
108   :align: center
109   :alt: Nucleo F030R8 connectors
110
111Default Zephyr Peripheral Mapping:
112----------------------------------
113
114- UART_1 TX/RX : PA9/PA10
115- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual COM Port)
116- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
117- I2C2 SCL/SDA : PB10/PB11
118- SPI1 NSS/SCK/MISO/MOSI : PB6/PA5/PA6/PA7 (Arduino SPI)
119- SPI2 NSS/SCK/MISO/MOSI : PB12/PB13/PB14/PB15
120- USER_PB : PC13
121- LD1 : PA5
122- ADC : PA0
123
124
125For more details please refer to `STM32 Nucleo-64 board User Manual`_.
126
127Programming and Debugging
128*************************
129
130Nucleo F030R8 board includes an ST-LINK/V2-1 embedded debug tool interface.
131
132Applications for the ``nucleo_f030r8`` board configuration can be built and
133flashed in the usual way (see :ref:`build_an_application` and
134:ref:`application_run` for more details).
135
136.. _nucleo-f030r8-flashing:
137
138Flashing
139========
140
141The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
142so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
143
144Alternatively, OpenOCD, JLink, prob-rs can also be used to flash the board using
145the ``--runner`` (or ``-r``) option:
146
147.. code-block:: console
148
149   $ west flash --runner openocd
150   $ west flash --runner jlink
151   $ west flash --runner prob-rs
152
153Flashing an application to Nucleo F030R8
154----------------------------------------
155
156Here is an example for the :zephyr:code-sample:`blinky` application.
157
158.. zephyr-app-commands::
159   :zephyr-app: samples/basic/blinky
160   :board: nucleo_f030r8
161   :goals: build flash
162
163You will see the LED blinking every second.
164
165If using the C-01 board, select revision '1' that supports the board.
166
167.. zephyr-app-commands::
168   :zephyr-app: samples/basic/blinky
169   :board: nucleo_f030r8@1
170   :goals: build flash
171
172Debugging
173=========
174
175You can debug an application in the usual way.  Here is an example for the
176:zephyr:code-sample:`blinky` application.
177
178.. zephyr-app-commands::
179   :zephyr-app: samples/basic/blinky
180   :board: nucleo_f030r8
181   :maybe-skip-config:
182   :goals: debug
183
184Again you have to use the adapted command for C-01.
185
186.. zephyr-app-commands::
187   :zephyr-app: samples/basic/blinky
188   :board: nucleo_f030r8@1
189   :maybe-skip-config:
190   :goals: debug
191
192Board Revisions
193***************
194
195Nucleo F030R8 has some version of board variants.
196`STM32 Nucleo-64 board User Manual`_ mentions to Nucleo board variants.
197
198   | *The board version MB1136 C-01 or MB1136 C-02 is mentioned on the sticker, placed on the bottom side of the PCB.*
199   | *The board marking MB1136 C-01 corresponds to a board, configured as HSE not used.*
200   | *The board marking MB1136 C-02 (or higher) corresponds to a board, configured to use ST-LINK MCO as the clock input.*
201
202Using revision **2** adapted for C-02(or higher) as default when not explicitly selecting revisions.
203If using the C-01 board, select revision **1**.
204Please see :ref:`Flashing <nucleo-f030r8-flashing>` section.
205
206References
207**********
208
209.. target-notes::
210
211.. _Nucleo F030R8 website:
212   https://www.st.com/en/evaluation-tools/nucleo-f030r8.html
213
214.. _STM32F030 reference manual:
215   https://www.st.com/resource/en/reference_manual/dm00091010.pdf
216
217.. _STM32F030 data sheet:
218   https://www.st.com/resource/en/datasheet/stm32f030r8.pdf
219
220.. _STM32 Nucleo-64 board User Manual:
221   https://www.st.com/resource/en/user_manual/dm00105823.pdf
222
223.. _STM32CubeProgrammer:
224   https://www.st.com/en/development-tools/stm32cubeprog.html
225