Skip to content

Commit 0d53844

Browse files
Tom OwenABOSTM
authored andcommitted
board: Added board support package for Nucleo_F446ZE
Includes support for USB, CAN, ADC, DAC, and Arduino GPIO Map. Future could support: ETM Trace (if Zephyr supports it), QSPI, FMC, DCMI Initially based on closest BSP for the same SoC: nucleo_f446re Extra peripherals added based on closest BSP for nucleo-144 board: nucleo_f429zi Checked against nucleo-144 schematic Documentation updated as best as I could Arduino compatible pinmux for SPI, UART and I2C via Zio header Tested: USB Device mode (samples/subsys/usb/console) Console via ST-link usart3 (samples/hello_world) user LEDs (samples/basic/blinky) scripts/twister --device-tests -p nucleo_f446ze Not tested but should work: SPI, I2C, CAN, ADC, DAC Not working yet: Quad-SPI (missing in dts/arm/st/f4/stm32f4.dtsi) Co-authored-by: Alexandre Bourdiol <[email protected]> Signed-off-by: Tom Owen <[email protected]>
1 parent 981d10f commit 0d53844

14 files changed

+599
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# STM32F446ZE Nucleo board configuration
2+
3+
# Copyright (c) 2021 Tom Owen
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD_NUCLEO_F446ZE
7+
bool "Nucleo F446ZE Development Board"
8+
depends on SOC_STM32F446XX
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# STM32F446ZE Nucleo board configuration
2+
3+
# Copyright (c) 2021 Tom Owen
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_NUCLEO_F446ZE
7+
8+
config BOARD
9+
default "nucleo_f446ze"
10+
11+
config SPI_STM32_INTERRUPT
12+
default y
13+
depends on SPI
14+
15+
endif # BOARD_NUCLEO_F446ZE
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2021, Tom Owen
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
arduino_header: connector {
9+
compatible = "arduino-header-r3";
10+
#gpio-cells = <2>;
11+
gpio-map-mask = <0xffffffff 0xffffffc0>;
12+
gpio-map-pass-thru = <0 0x3f>;
13+
gpio-map = <0 0 &gpioa 3 0>, /* A0 */
14+
<1 0 &gpioc 0 0>, /* A1 */
15+
<2 0 &gpioc 3 0>, /* A2 */
16+
<3 0 &gpiof 3 0>, /* A3 */
17+
<4 0 &gpiof 5 0>, /* A4 */
18+
<5 0 &gpiof 10 0>, /* A5 */
19+
<6 0 &gpiog 9 0>, /* D0 */
20+
<7 0 &gpiog 14 0>, /* D1 */
21+
<8 0 &gpiof 15 0>, /* D2 */
22+
<9 0 &gpioe 13 0>, /* D3 */
23+
<10 0 &gpiof 14 0>, /* D4 */
24+
<11 0 &gpioe 11 0>, /* D5 */
25+
<12 0 &gpioe 9 0>, /* D6 */
26+
<13 0 &gpiof 13 0>, /* D7 */
27+
<14 0 &gpiof 12 0>, /* D8 */
28+
<15 0 &gpiod 15 0>, /* D9 */
29+
<16 0 &gpiod 14 0>, /* D10 */
30+
<17 0 &gpioa 7 0>, /* D11 */
31+
<18 0 &gpioa 6 0>, /* D12 */
32+
<19 0 &gpioa 5 0>, /* D13 */
33+
<20 0 &gpiob 9 0>, /* D14 */
34+
<21 0 &gpiob 8 0>; /* D15 */
35+
};
36+
};
37+
38+
arduino_i2c: &i2c1 {};
39+
arduino_spi: &spi1 {};
40+
arduino_serial: &usart6 {};

boards/arm/nucleo_f446ze/board.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
board_runner_args(jlink "--device=STM32F446ZE" "--speed=4000")
4+
5+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
6+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
13.5 KB
Loading
460 KB
Loading
388 KB
Loading
502 KB
Loading
413 KB
Loading
Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
.. _nucleo_f446ze_board:
2+
3+
ST Nucleo F446ZE
4+
################
5+
6+
7+
Overview
8+
********
9+
10+
The Nucleo F446ZE board features an ARM Cortex-M4 based STM32F446ZE MCU
11+
with a wide range of connectivity support and configurations. Here are
12+
some highlights of the Nucleo F446ZE board:
13+
14+
- STM32F446 microcontroller in QFP144 package
15+
- Two types of extension resources:
16+
17+
- ST zio support for Arduino™ Uno V3 connectivity (A0 to A5, D0 to D15) and additional signals exposing a wide range of peripherals
18+
- ST morpho extension pin headers for full access to all STM32 I/Os
19+
20+
- On-board ST-LINK/V2-1 debugger/programmer with SWD connector
21+
- USB re-enumeration capability. Three different interfaces supported on USB:
22+
- Virtual Com port
23+
- Mass storage (USB Disk drive) for drag'n'drop programming
24+
- Debug port
25+
- Flexible board power supply:
26+
- USB VBUS or external source(3.3V, 5V, 7 - 12V)
27+
- Power management access point
28+
- USB OTG
29+
30+
- Three LEDs: USB communication (LD1), user LED (LD2), power LED (LD3)
31+
- Two push-buttons: USER and RESET
32+
33+
.. image:: img/nucleo_f446ze.jpg
34+
:width: 720px
35+
:align: center
36+
:height: 720px
37+
:alt: Nucleo F446ZE
38+
39+
More information about the board can be found at the `Nucleo F446ZE website`_.
40+
41+
Hardware
42+
********
43+
44+
Nucleo F446ZE provides the following hardware components:
45+
46+
- STM32F446ZET6 in LQFP144 package
47+
- ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU
48+
- Adaptive real-time accelerator (ART Accelerator)
49+
- 180 MHz max CPU frequency
50+
- VDD from 1.7 V to 3.6 V
51+
- 512 KB Flash
52+
- 128 KB SRAM
53+
- 10 General purpose timers
54+
- 2 Advanced control timers
55+
- 2 basic timers
56+
- SPI(4)
57+
- I2C(4)
58+
- USART(4)
59+
- UART(2)
60+
- USB OTG Full Speed and High Speed
61+
- CAN(2)
62+
- SAI(2)
63+
- SPDIF_Rx(1)
64+
- HDMI_CEC(1)
65+
- Quad SPI(1)
66+
- Camera Interface
67+
- GPIO(50) with external interrupt capability
68+
- 12-bit ADC(3) with 16 channels
69+
- 12-bit DAC with 2 channels
70+
71+
More information about STM32F446ZE can be found here:
72+
73+
- `STM32F446ZE on www.st.com`_
74+
- `STM32F446 reference manual`_
75+
76+
Supported Features
77+
==================
78+
79+
The Zephyr nucleo_f446ze board configuration supports the following hardware features:
80+
81+
+-------------+------------+-------------------------------------+
82+
| Interface | Controller | Driver/Component |
83+
+=============+============+=====================================+
84+
| NVIC | on-chip | nested vector interrupt controller |
85+
+-------------+------------+-------------------------------------+
86+
| UART | on-chip | serial port |
87+
+-------------+------------+-------------------------------------+
88+
| PINMUX | on-chip | pinmux |
89+
+-------------+------------+-------------------------------------+
90+
| GPIO | on-chip | gpio |
91+
+-------------+------------+-------------------------------------+
92+
| PWM | on-chip | pwm |
93+
+-------------+------------+-------------------------------------+
94+
| I2C | on-chip | i2c |
95+
+-------------+------------+-------------------------------------+
96+
| USB | on-chip | usb |
97+
+-------------+------------+-------------------------------------+
98+
| Backup SRAM | on-chip | Backup SRAM |
99+
+-------------+------------+-------------------------------------+
100+
| CAN 1/2 | on-chip | Controller Area Network |
101+
+-------------+------------+-------------------------------------+
102+
| ADC | on-chip | Analog Input |
103+
+-------------+------------+-------------------------------------+
104+
| DAC | on-chip | Analog Output |
105+
+-------------+------------+-------------------------------------+
106+
107+
Other hardware features are not yet supported on this Zephyr port.
108+
109+
The default configuration can be found in the defconfig file:
110+
``boards/arm/nucleo_f446ze/nucleo_f446ze_defconfig``
111+
112+
113+
Connections and IOs
114+
===================
115+
116+
Nucleo F446ZE Board has 8 GPIO controllers. These controllers are responsible for pin muxing,
117+
input/output, pull-up, etc.
118+
119+
Available pins:
120+
---------------
121+
.. image:: img/nucleo_f446ze_zio_left_2019_8_29.png
122+
:width: 720px
123+
:align: center
124+
:height: 540px
125+
:alt: Nucleo F446ZE Zio/Arduino connectors (left)
126+
.. image:: img/nucleo_f446ze_zio_right_2019_8_29.png
127+
:width: 720px
128+
:align: center
129+
:height: 540px
130+
:alt: Nucleo F446ZE Zio/Arduino connectors (right)
131+
.. image:: img/nucleo_f446ze_morpho_left_2019_8_29.png
132+
:width: 720px
133+
:align: center
134+
:height: 540px
135+
:alt: Nucleo F446ZE Morpho connectors (left)
136+
.. image:: img/nucleo_f446ze_morpho_right_2019_8_29.png
137+
:width: 720px
138+
:align: center
139+
:height: 540px
140+
:alt: Nucleo F446ZE Morpho connectors (right)
141+
142+
For mode details please refer to `STM32 Nucleo-144 board User Manual`_.
143+
144+
Default Zephyr Peripheral Mapping:
145+
----------------------------------
146+
147+
- UART_2_TX : PD5
148+
- UART_2_RX : PD6
149+
- UART_3_TX : PD8
150+
- UART_3_RX : PD9
151+
- USER_PB : PC13
152+
- LD0 : PB0
153+
- LD1 : PB7
154+
- LD2 : PB14
155+
- I2C1_SDA : PB9
156+
- I2C1_SCL : PB8
157+
- I2C2_SDA : PF0
158+
- I2C2_SCL : PF1
159+
- SPI1_CS : PD14
160+
- SPI1_SCK : PA5
161+
- SPI1_MISO : PA6
162+
- SPI1_MOSI : PA7
163+
- SPI2_NSS : PB12
164+
- SPI2_SCK : PB13
165+
- SPI2_MISO : PB14
166+
- SPI2_MOSI : PB15
167+
- CAN1_RX : PD0
168+
- CAN1_TX : PD1
169+
- USB_DP : PA11
170+
- USB_DM : PA12
171+
- ADC1_IN0 : PA0
172+
- DAC_OUT1 : PA4
173+
174+
175+
System Clock
176+
------------
177+
178+
Nucleo F446ZE System Clock could be driven by an internal or external oscillator,
179+
as well as the main PLL clock. By default, the System clock is driven by the PLL clock at 84MHz,
180+
driven by an 8MHz high-speed external clock.
181+
182+
Serial Port
183+
-----------
184+
185+
Nucleo F446ZE board has 2 UARTs and 4 USARTs. The Zephyr console output is assigned to USART3.
186+
Default settings are 115200 8N1.
187+
188+
Backup SRAM
189+
-----------
190+
191+
In order to test backup SRAM you may want to disconnect VBAT from VDD. You can
192+
do it by removing ``SB156`` jumper on the back side of the board.
193+
194+
Controller Area Network
195+
-----------------------
196+
197+
The TX/RX wires are connected with pins 25/27 of CN9 connector.
198+
199+
Programming and Debugging
200+
*************************
201+
202+
Applications for the ``nucleo_f446ze`` board configuration can be built and
203+
flashed in the usual way (see :ref:`build_an_application` and
204+
:ref:`application_run` for more details).
205+
206+
Flashing
207+
========
208+
209+
Nucleo F446ZE board includes an ST-LINK/V2-1 embedded debug tool interface.
210+
This interface is supported by the openocd version included in the Zephyr SDK.
211+
212+
Flashing an application to Nucleo F446ZE
213+
----------------------------------------
214+
215+
Here is an example for the :ref:`hello_world` application.
216+
217+
Run a serial host program to connect with your Nucleo board.
218+
219+
.. code-block:: console
220+
221+
$ minicom -b 115200 -D /dev/ttyACM0
222+
223+
Build and flash the application:
224+
225+
.. zephyr-app-commands::
226+
:zephyr-app: samples/hello_world
227+
:board: nucleo_f446ze
228+
:goals: build flash
229+
230+
You should see the following message on the console:
231+
232+
.. code-block:: console
233+
234+
$ Hello World! arm
235+
236+
Debugging
237+
=========
238+
239+
You can debug an application in the usual way. Here is an example for the
240+
:ref:`hello_world` application.
241+
242+
.. zephyr-app-commands::
243+
:zephyr-app: samples/hello_world
244+
:board: nucleo_f446ze
245+
:maybe-skip-config:
246+
:goals: debug
247+
248+
.. _Nucleo F446ZE website:
249+
http://www.st.com/en/evaluation-tools/nucleo-f446ze.html
250+
251+
.. _STM32 Nucleo-144 board User Manual:
252+
https://www.st.com/resource/en/user_manual/um1974-stm32-nucleo144-boards-mb1137-stmicroelectronics.pdf
253+
254+
.. _STM32F446ZE on www.st.com:
255+
http://www.st.com/en/microcontrollers/stm32f446ze.html
256+
257+
.. _STM32F446 reference manual:
258+
http://www.st.com/resource/en/reference_manual/dm00135183.pdf

0 commit comments

Comments
 (0)