1.. zephyr:board:: nucleo_f411re
2
3Overview
4********
5
6The Nucleo F411RE board features an ARM Cortex-M4 based STM32F411RE MCU
7with a wide range of connectivity support and configurations. Here are
8some highlights of the Nucleo F411RE 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 F411RE website`_.
26
27Hardware
28********
29
30Nucleo F411RE provides the following hardware components:
31
32- STM32F411RET6 in LQFP64 package
33- ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU
34- 100 MHz max CPU frequency
35- VDD from 1.7 V to 3.6 V
36- 512 KB Flash
37- 128 KB SRAM
38- GPIO with external interrupt capability
39- 12-bit ADC with 16 channels, with FIFO and burst support
40- RTC
41- 8 General purpose timers
42- 2 watchdog timers (independent and window)
43- SysTick timer
44- USART/UART (3)
45- I2C (3)
46- SPI/I2S (5)
47- SDIO
48- USB 2.0 OTG FS
49- DMA Controller
50- CRC calculation unit
51
52More information about STM32F411RE can be found here:
53
54- `STM32F411RE on www.st.com`_
55- `STM32F411 reference manual`_
56
57Supported Features
58==================
59
60The Zephyr nucleo_f411re board configuration supports the following hardware features:
61
62+-----------+------------+-------------------------------------+
63| Interface | Controller | Driver/Component                    |
64+===========+============+=====================================+
65| NVIC      | on-chip    | nested vector interrupt controller  |
66+-----------+------------+-------------------------------------+
67| UART      | on-chip    | serial port                         |
68+-----------+------------+-------------------------------------+
69| PINMUX    | on-chip    | pinmux                              |
70+-----------+------------+-------------------------------------+
71| GPIO      | on-chip    | gpio                                |
72+-----------+------------+-------------------------------------+
73| PWM       | on-chip    | pwm                                 |
74+-----------+------------+-------------------------------------+
75| I2C       | on-chip    | i2c                                 |
76+-----------+------------+-------------------------------------+
77| I2S       | on-chip    | i2s                                 |
78+-----------+------------+-------------------------------------+
79| SPI       | on-chip    | spi                                 |
80+-----------+------------+-------------------------------------+
81
82Other hardware features are not yet supported on this Zephyr port.
83
84The default configuration can be found in
85:zephyr_file:`boards/st/nucleo_f411re/nucleo_f411re_defconfig`
86
87
88Connections and IOs
89===================
90
91Nucleo F411RE Board has 8 GPIO controllers. These controllers are responsible for pin muxing,
92input/output, pull-up, etc.
93
94Available pins:
95---------------
96.. image:: img/nucleo_f411re_arduino.jpg
97   :align: center
98   :alt: Nucleo F411RE Arduino connectors
99.. image:: img/nucleo_f411re_morpho.jpg
100   :align: center
101   :alt: Nucleo F411RE Morpho connectors
102
103For more details please refer to `STM32 Nucleo-64 board User Manual`_.
104
105Default Zephyr Peripheral Mapping:
106----------------------------------
107
108- UART_1 TX/RX : PB6/PB7
109- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com)
110- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
111- I2C2 SCL/SDA : PB10/PB3
112- I2C1 SCL/SDA : PA8/B4
113- SPI1 CS/SCK/MISO/MOSI : PA4/PA5/PA6/PA7 (Arduino SPI)
114- I2S1 SCK/SD : PA5/PA7 (Arduino I2S)
115- USER_PB   : PC13
116- LD2       : PA5
117
118.. note:: Please note that SPI1 and I2S1 are connected to the same mcu pins, as the h/w controller is the same one.
119
120System Clock
121------------
122
123Nucleo F411RE System Clock could be driven by internal or external oscillator,
124as well as main PLL clock. By default System clock is driven by PLL clock at 84MHz,
125driven by 8MHz high speed external clock.
126
127Serial Port
128-----------
129
130Nucleo F411RE board has 3 UARTs. The Zephyr console output is assigned to UART2.
131Default settings are 115200 8N1.
132
133
134Programming and Debugging
135*************************
136
137Nucleo F411RE board includes an ST-LINK/V2-1 embedded debug tool interface.
138
139Applications for the ``nucleo_f411re`` board configuration can be built and
140flashed in the usual way (see :ref:`build_an_application` and
141:ref:`application_run` for more details).
142
143Flashing
144========
145
146The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
147so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
148
149Alternatively, OpenOCD or JLink can also be used to flash the board using
150the ``--runner`` (or ``-r``) option:
151
152.. code-block:: console
153
154   $ west flash --runner openocd
155   $ west flash --runner jlink
156
157Flashing an application to Nucleo F411RE
158----------------------------------------
159
160Here is an example for the :zephyr:code-sample:`hello_world` application.
161
162Run a serial host program to connect with your Nucleo board.
163
164.. code-block:: console
165
166   $ minicom -D /dev/ttyACM0
167
168Build and flash the application:
169
170.. zephyr-app-commands::
171   :zephyr-app: samples/hello_world
172   :board: nucleo_f411re
173   :goals: build flash
174
175You should see the following message on the console:
176
177.. code-block:: console
178
179   $ Hello World! arm
180
181Debugging
182=========
183
184You can debug an application in the usual way.  Here is an example for the
185:zephyr:code-sample:`hello_world` application.
186
187.. zephyr-app-commands::
188   :zephyr-app: samples/hello_world
189   :board: nucleo_f411re
190   :maybe-skip-config:
191   :goals: debug
192
193.. _Nucleo F411RE website:
194   https://www.st.com/en/evaluation-tools/nucleo-f411re.html
195
196.. _STM32 Nucleo-64 board User Manual:
197   https://www.st.com/resource/en/user_manual/dm00105823.pdf
198
199.. _STM32F411RE on www.st.com:
200   https://www.st.com/en/microcontrollers/stm32f411re.html
201
202.. _STM32F411 reference manual:
203   https://www.st.com/resource/en/reference_manual/dm00119316.pdf
204
205.. _STM32CubeProgrammer:
206   https://www.st.com/en/development-tools/stm32cubeprog.html
207