1.. zephyr:board:: nucleo_f334r8
2
3Overview
4********
5STM32 Nucleo-64 development board with STM32F334R8 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 does not require any separate probe as it integrates the ST-LINK/V2-1
16debugger and programmer.
17
18The STM32 Nucleo board comes with the STM32 comprehensive software HAL library together
19with various packaged software examples.
20
21More information about the board can be found at the `Nucleo F334R8 website`_.
22
23Hardware
24********
25Nucleo F334R8 provides the following hardware components:
26
27- STM32 microcontroller in QFP64 package
28- Two types of extension resources:
29
30  - Arduino* Uno V3 connectivity
31  - ST morpho extension pin headers for full access to all STM32 I/Os
32
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
54More information about STM32F334R8 can be found in the
55`STM32F334 reference manual`_
56
57
58Supported Features
59==================
60
61.. zephyr:board-supported-hw::
62
63Connections and IOs
64===================
65
66Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as
67input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the
68GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current
69capable except for analog inputs.
70
71Board connectors:
72-----------------
73.. image:: img/nucleo_f334r8_connectors.jpg
74   :align: center
75   :alt: Nucleo F334R8 connectors
76
77Default Zephyr Peripheral Mapping:
78----------------------------------
79
80- UART_1 TX/RX : PA9/PA10
81- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com)
82- UART_3 TX/RX : PB10/PB11
83- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
84- SPI1 CS/SCK/MISO/MOSI : PB6/PA5/PA6/PA7 (Arduino SPI)
85- PWM_1_CH1 : PA8
86- USER_PB   : PC13
87- LD2       : PA5
88
89For more details please refer to `STM32 Nucleo-64 board User Manual`_.
90
91Programming and Debugging
92*************************
93
94Nucleo F334R8 board includes an ST-LINK/V2-1 embedded debug tool interface.
95
96Applications for the ``nucleo_f334r8`` 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, JLink, or pyOCD 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   $ west flash --runner pyocd
114
115Flashing an application to Nucleo F334R8
116----------------------------------------
117
118Connect the Nucleo F334R8 to your host computer using the USB port,
119then build and flash an application. Here is an example for the
120:zephyr:code-sample:`blinky` application.
121
122.. zephyr-app-commands::
123   :zephyr-app: samples/basic/blinky
124   :board: nucleo_f334r8
125   :goals: build flash
126
127You will see the LED blinking every second.
128
129Debugging
130=========
131
132You can debug an application in the usual way.  Here is an example for
133the :zephyr:code-sample:`blinky` application.
134
135.. zephyr-app-commands::
136   :zephyr-app: samples/basic/blinky
137   :board: nucleo_f334r8
138   :maybe-skip-config:
139   :goals: debug
140
141References
142**********
143
144.. target-notes::
145
146.. _Nucleo F334R8 website:
147   https://www.st.com/en/evaluation-tools/nucleo-f334r8.html
148
149.. _STM32F334 reference manual:
150   https://www.st.com/resource/en/reference_manual/dm00093941.pdf
151
152.. _STM32 Nucleo-64 board User Manual:
153   https://www.st.com/resource/en/user_manual/dm00105823.pdf
154
155.. _STM32CubeProgrammer:
156   https://www.st.com/en/development-tools/stm32cubeprog.html
157