1.. zephyr:board:: nucleo_f446re
2
3Overview
4********
5
6The Nucleo F446RE board features an ARM Cortex-M4 based STM32F446RE MCU
7with a wide range of connectivity support and configurations. Here are
8some highlights of the Nucleo F446RE board:
9
10- STM32 microcontroller in QFP64 package
11- Two types of extension resources:
12
13  - Arduino Uno V3 connectivity
14  - ST morpho extension pin headers for full access to all STM32 I/Os
15
16- On-board ST-LINK/V2-1 debugger/programmer with SWD connector
17- Flexible board power supply:
18
19  - USB VBUS or external source(3.3V, 5V, 7 - 12V)
20  - Power management access point
21
22- Three LEDs: USB communication (LD1), user LED (LD2), power LED (LD3)
23- Two push-buttons: USER and RESET
24
25More information about the board can be found at the `Nucleo F446RE website`_.
26
27Hardware
28********
29
30Nucleo F446RE provides the following hardware components:
31
32- STM32F446RET6 in LQFP64 package
33- ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU
34- Adaptive real-time accelerator (ART Accelerator)
35- 180 MHz max CPU frequency
36- VDD from 1.7 V to 3.6 V
37- 512 KB Flash
38- 128 KB SRAM
39- 10 General purpose timers
40- 2 Advanced control timers
41- 2 basic timers
42- SPI(4)
43- I2C(3)
44- USART(4)
45- UART(2)
46- USB OTG Full Speed and High Speed
47- CAN(2)
48- SAI(2)
49- SPDIF_Rx(1)
50- HDMI_CEC(1)
51- Quad SPI(1)
52- Camera Interface
53- GPIO(50) with external interrupt capability
54- 12-bit ADC(3) with 16 channels
55- 12-bit DAC with 2 channels
56
57More information about STM32F446RE can be found here:
58
59- `STM32F446RE on www.st.com`_
60- `STM32F446 reference manual`_
61
62Supported Features
63==================
64
65The Zephyr nucleo_f446re board configuration supports the following hardware features:
66
67+-------------+------------+-------------------------------------+
68| Interface   | Controller | Driver/Component                    |
69+=============+============+=====================================+
70| NVIC        | on-chip    | nested vector interrupt controller  |
71+-------------+------------+-------------------------------------+
72| UART        | on-chip    | serial port                         |
73+-------------+------------+-------------------------------------+
74| PINMUX      | on-chip    | pinmux                              |
75+-------------+------------+-------------------------------------+
76| GPIO        | on-chip    | gpio                                |
77+-------------+------------+-------------------------------------+
78| PWM         | on-chip    | pwm                                 |
79+-------------+------------+-------------------------------------+
80| I2C         | on-chip    | i2c                                 |
81+-------------+------------+-------------------------------------+
82| Backup SRAM | on-chip    | Backup SRAM                         |
83+-------------+------------+-------------------------------------+
84| CAN 1/2     | on-chip    | Controller Area Network             |
85+-------------+------------+-------------------------------------+
86
87Other hardware features are not yet supported on this Zephyr port.
88
89The default configuration can be found in
90:zephyr_file:`boards/st/nucleo_f446re/nucleo_f446re_defconfig`
91
92
93Connections and IOs
94===================
95
96Nucleo F446RE Board has 8 GPIO controllers. These controllers are responsible for pin muxing,
97input/output, pull-up, etc.
98
99Available pins:
100---------------
101.. image:: img/nucleo_f446re_arduino_top_left.jpg
102   :align: center
103   :alt: Nucleo F446RE Arduino connectors (top left)
104.. image:: img/nucleo_f446re_arduino_top_right.jpg
105   :align: center
106   :alt: Nucleo F446RE Arduino connectors (top right)
107.. image:: img/nucleo_f446re_morpho_top_left.jpg
108   :align: center
109   :alt: Nucleo F446RE Morpho connectors (top left)
110.. image:: img/nucleo_f446re_morpho_top_right.jpg
111   :align: center
112   :alt: Nucleo F446RE Morpho connectors (top right)
113
114For more details please refer to `STM32 Nucleo-64 board User Manual`_.
115
116Default Zephyr Peripheral Mapping:
117----------------------------------
118
119- UART_1_TX : PB6
120- UART_1_RX : PB7
121- UART_2_TX : PA2
122- UART_2_RX : PA3
123- USER_PB   : PC13
124- LD2       : PA5
125- I2C1_SDA  : PB9
126- I2C1_SCL  : PB8
127- I2C2_SDA  : PB3
128- I2C2_SCL  : PB10
129- I2C3_SDA  : PB4
130- I2C3_SCL  : PA8
131
132System Clock
133------------
134
135Nucleo F446RE System Clock could be driven by an internal or external oscillator,
136as well as the main PLL clock. By default, the System clock is driven by the PLL clock at 84MHz,
137driven by an 8MHz high-speed external clock.
138
139Serial Port
140-----------
141
142Nucleo F446RE board has 2 UARTs and 4 USARTs. The Zephyr console output is assigned to UART2.
143Default settings are 115200 8N1.
144
145Backup SRAM
146-----------
147
148In order to test backup SRAM you may want to disconnect VBAT from VDD. You can
149do it by removing ``SB45`` jumper on the back side of the board.
150
151Controller Area Network
152-----------------------
153
154The TX/RX wires connected with D14/D15 of CN5 connector. Thus the board can be
155used with `RS485 CAN Shield`_.
156
157Programming and Debugging
158*************************
159
160Nucleo F446RE board includes an ST-LINK/V2-1 embedded debug tool interface.
161
162Applications for the ``nucleo_f446re`` board configuration can be built and
163flashed in the usual way (see :ref:`build_an_application` and
164:ref:`application_run` for more details).
165
166Flashing
167========
168
169The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
170so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
171
172Alternatively, OpenOCD or JLink can also be used to flash the board using
173the ``--runner`` (or ``-r``) option:
174
175.. code-block:: console
176
177   $ west flash --runner openocd
178   $ west flash --runner jlink
179
180Flashing an application to Nucleo F446RE
181----------------------------------------
182
183Here is an example for the :zephyr:code-sample:`hello_world` application.
184
185Run a serial host program to connect with your Nucleo board.
186
187.. code-block:: console
188
189   $ minicom -b 115200 -D /dev/ttyACM0
190
191Build and flash the application:
192
193.. zephyr-app-commands::
194   :zephyr-app: samples/hello_world
195   :board: nucleo_f446re
196   :goals: build flash
197
198You should see the following message on the console:
199
200.. code-block:: console
201
202   $ Hello World! arm
203
204Debugging
205=========
206
207You can debug an application in the usual way.  Here is an example for the
208:zephyr:code-sample:`hello_world` application.
209
210.. zephyr-app-commands::
211   :zephyr-app: samples/hello_world
212   :board: nucleo_f446re
213   :maybe-skip-config:
214   :goals: debug
215
216.. _Nucleo F446RE website:
217   https://www.st.com/en/evaluation-tools/nucleo-f446re.html
218
219.. _STM32 Nucleo-64 board User Manual:
220   https://www.st.com/resource/en/user_manual/dm00105823.pdf
221
222.. _STM32F446RE on www.st.com:
223   https://www.st.com/en/microcontrollers/stm32f446re.html
224
225.. _STM32F446 reference manual:
226   https://www.st.com/resource/en/reference_manual/dm00135183.pdf
227
228.. _RS485 CAN Shield:
229   https://www.waveshare.com/wiki/RS485_CAN_Shield
230
231.. _STM32CubeProgrammer:
232   https://www.st.com/en/development-tools/stm32cubeprog.html
233