Skip to content

Commit c39415d

Browse files
committed
boards: st: add support for the nucleo_f439zi
Add support for the nucleo_f439zi board. Signed-off-by: Mathieu Anquetin <[email protected]>
1 parent 2e5bb91 commit c39415d

15 files changed

+603
-0
lines changed
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# NUCLEO-144 F439ZI board configuration
2+
3+
# Copyright (c) 2025 Mathieu Anquetin <[email protected]>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_NUCLEO_F439ZI
7+
8+
if NETWORKING
9+
10+
config NET_L2_ETHERNET
11+
default y
12+
13+
endif # NETWORKING
14+
15+
endif # BOARD_NUCLEO_F439ZI
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Mathieu Anquetin <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_NUCLEO_F439ZI
5+
select SOC_STM32F439XX
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2019, Christian Taedcke
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/st/nucleo_f439zi/board.cmake

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
# keep first
4+
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
5+
board_runner_args(jlink "--device=STM32F439ZI" "--speed=4000")
6+
7+
# keep first
8+
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
9+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
10+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/st/nucleo_f439zi/board.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: nucleo_f439zi
3+
full_name: Nucleo F439ZI
4+
vendor: st
5+
socs:
6+
- name: stm32f439xx
Loading
Loading
Loading
Loading
Loading

boards/st/nucleo_f439zi/doc/index.rst

+229
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
.. zephyr:board:: nucleo_f439zi
2+
3+
Overview
4+
********
5+
6+
The Nucleo F439ZI board features an ARM Cortex-M4 based STM32F439ZI MCU
7+
with a wide range of connectivity support and configurations. Here are
8+
some highlights of the Nucleo F439ZI board:
9+
10+
- STM32 microcontroller in LQFP144 package
11+
- LSE crystal: 32.768 kHz crystal oscillator
12+
- USB OTG
13+
- Ethernet compliant with IEEE-802.3-2002
14+
- Two types of extension resources:
15+
16+
- ST Zio connector including: support for Arduino* Uno V3 connectivity
17+
(A0 to A5, D0 to D15) and additional signals exposing a wide range of
18+
peripherals
19+
- ST morpho extension pin headers for full access to all STM32 I/Os
20+
21+
- On-board ST-LINK/V2-1 debugger/programmer with SWD connector
22+
- Flexible board power supply:
23+
24+
- 5 V from ST-LINK/V2-1 USB VBUS
25+
- External power sources: 3.3 V and 7 - 12 V on ST Zio or ST morpho
26+
connectors, 5 V on ST morpho connector
27+
28+
- Three user LEDs
29+
- Two push-buttons: USER and RESET
30+
31+
More information about the board can be found at the `Nucleo F439ZI website`_.
32+
33+
Hardware
34+
********
35+
36+
The Nucleo F439ZI provides the following hardware components:
37+
38+
- STM32F439ZIT6 in LQFP144 package
39+
- ARM |reg| 32-bit Cortex |reg| -M4 CPU with FPU
40+
- 180 MHz max CPU frequency
41+
- VDD from 1.8 V to 3.6 V
42+
- 2 MB Flash
43+
- 256+4 KB SRAM including 64-Kbyte of core coupled memory
44+
- GPIO with external interrupt capability
45+
- 3x12-bit ADC with 24 channels
46+
- 2x12-bit D/A converters
47+
- RTC
48+
- Advanced-control Timer
49+
- General Purpose Timers (17)
50+
- Watchdog Timers (2)
51+
- USART/UART (4/4)
52+
- I2C (3)
53+
- SPI (6)
54+
- SDIO
55+
- 2xCAN
56+
- USB 2.0 OTG FS with on-chip PHY
57+
- USB 2.0 OTG HS/FS with dedicated DMA, on-chip full-speed PHY and ULPI
58+
- 10/100 Ethernet MAC with dedicated DMA
59+
- 8- to 14-bit parallel camera
60+
- CRC calculation unit
61+
- True random number generator
62+
- DMA Controller
63+
- Crypto/hash processor for AES, TDES, MD5, SHA-1 and SHA-2
64+
65+
More information about STM32F439ZI can be found here:
66+
67+
- `STM32F439ZI on www.st.com`_
68+
- `STM32F439 reference manual`_
69+
- `STM32F439 datasheet`_
70+
71+
Supported Features
72+
==================
73+
74+
The Zephyr nucleo_f439zi board configuration supports the following hardware features:
75+
76+
+-----------+------------+-------------------------------------+
77+
| Interface | Controller | Driver/Component |
78+
+===========+============+=====================================+
79+
| NVIC | on-chip | nested vector interrupt controller |
80+
+-----------+------------+-------------------------------------+
81+
| UART | on-chip | serial port-polling; |
82+
| | | serial port-interrupt |
83+
+-----------+------------+-------------------------------------+
84+
| PINMUX | on-chip | pinmux |
85+
+-----------+------------+-------------------------------------+
86+
| GPIO | on-chip | gpio |
87+
+-----------+------------+-------------------------------------+
88+
| ETHERNET | on-chip | Ethernet |
89+
+-----------+------------+-------------------------------------+
90+
| PWM | on-chip | pwm |
91+
+-----------+------------+-------------------------------------+
92+
| I2C | on-chip | i2c |
93+
+-----------+------------+-------------------------------------+
94+
| USB | on-chip | usb |
95+
+-----------+------------+-------------------------------------+
96+
| SPI | on-chip | spi |
97+
+-----------+------------+-------------------------------------+
98+
| WATCHDOG | on-chip | independent watchdog |
99+
+-----------+------------+-------------------------------------+
100+
| ADC | on-chip | adc |
101+
+-----------+------------+-------------------------------------+
102+
| DAC | on-chip | DAC Controller |
103+
+-----------+------------+-------------------------------------+
104+
| DMA | on-chip | Direct Memory Access |
105+
+-----------+------------+-------------------------------------+
106+
| die-temp | on-chip | die temperature sensor |
107+
+-----------+------------+-------------------------------------+
108+
| RTC | on-chip | rtc |
109+
+-----------+------------+-------------------------------------+
110+
111+
Other hardware features are not yet supported on this Zephyr port.
112+
113+
The default configuration can be found in
114+
:zephyr_file:`boards/st/nucleo_f439zi/nucleo_f439zi_defconfig`
115+
116+
117+
Connections and IOs
118+
===================
119+
120+
The Nucleo F439ZI Board has 8 GPIO controllers. These controllers are responsible for pin muxing,
121+
input/output, pull-up, etc.
122+
123+
Available pins:
124+
---------------
125+
.. image:: img/nucleo_f439zi_cn8.jpg
126+
:align: center
127+
:alt: Nucleo F439ZI ZIO connectors (left)
128+
.. image:: img/nucleo_f439zi_cn7.jpg
129+
:align: center
130+
:alt: Nucleo F439ZI ZIO connectors (right)
131+
.. image:: img/nucleo_f439zi_cn11.jpg
132+
:align: center
133+
:alt: Nucleo F439ZI Morpho connectors (left)
134+
.. image:: img/nucleo_f439zi_cn12.jpg
135+
:align: center
136+
:alt: Nucleo F439ZI Morpho connectors (right)
137+
138+
For more details please refer to `STM32 Nucleo-144 board User Manual`_.
139+
140+
Default Zephyr Peripheral Mapping:
141+
----------------------------------
142+
143+
The Nucleo F439ZI board features a ST Zio connector (extended Arduino Uno V3)
144+
and a ST morpho connector. Board is configured as follows
145+
146+
- UART_3 TX/RX : PD8/PD9 (ST-Link Virtual Port Com)
147+
- UART_6 TX/RX : PG14/PG9 (Arduino Serial)
148+
- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
149+
- SPI1 NSS/SCK/MISO/MOSI : PD14/PA5/PA6/PA7 (Arduino SPI)
150+
- PWM_2_CH1 : PE13
151+
- ETH : PA1, PA2, PA7, PB13, PC1, PC4, PC5, PG11, PG13
152+
- USER_PB : PC13
153+
- LD1 : PB0
154+
- LD2 : PB7
155+
- LD3 : PB14
156+
- USB DM : PA11
157+
- USB DP : PA12
158+
- ADC1 : PA0
159+
160+
System Clock
161+
------------
162+
163+
The Nucleo F439ZI System Clock could be driven by an internal or external oscillator,
164+
as well as by the main PLL clock. By default System clock is driven by PLL clock at 180MHz,
165+
driven by an 8MHz high speed external clock.
166+
167+
Serial Port
168+
-----------
169+
170+
The Nucleo F439ZI board has 8 UARTs. The Zephyr console output is assigned to UART3.
171+
Default settings are 115200 8N1.
172+
173+
174+
Programming and Debugging
175+
*************************
176+
177+
The Nucleo F439ZI board includes an ST-LINK/V2-1 embedded debug tool interface.
178+
179+
Flashing
180+
========
181+
182+
The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
183+
so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
184+
185+
Alternatively, OpenOCD or JLink can also be used to flash the board using
186+
the ``--runner`` (or ``-r``) option:
187+
188+
.. code-block:: console
189+
190+
$ west flash --runner openocd
191+
$ west flash --runner jlink
192+
193+
Flash partitions for MCUBoot bootloader
194+
***************************************
195+
196+
The on-board STM32F439ZI MCU has 2MBs of internal flash memory. To use `MCUboot`_,
197+
define a :ref:`Zephyr partition table <flash_map_api>` for the flash memory in
198+
its devicetree file ``nucleo_f439zi.dts``. As a reference, a partition table for
199+
MCUBoot is already defined in the devicetree file, with these settings:
200+
201+
- `MCUBoot`_ bootloader partition takes 64K bytes.
202+
- Zephyr settings partition takes 64K bytes.
203+
- Application image takes 256K bytes in Slot 0 partition.
204+
- Updating image takes another 256K bytes in Slot 1 partition.
205+
- A scratch partition with 128K is required for image swap.
206+
207+
A specific application can adjust each partition size based on its needs.
208+
209+
210+
.. _Nucleo F439ZI website:
211+
https://www.st.com/en/evaluation-tools/nucleo-f439zi.html
212+
213+
.. _STM32 Nucleo-144 board User Manual:
214+
https://www.st.com/resource/en/user_manual/dm00244518.pdf
215+
216+
.. _STM32F439ZI on www.st.com:
217+
https://www.st.com/en/microcontrollers/stm32f439zi.html
218+
219+
.. _STM32F439 reference manual:
220+
https://www.st.com/resource/en/reference_manual/dm00031020.pdf
221+
222+
.. _STM32F439 datasheet:
223+
https://www.st.com/resource/en/datasheet/stm32f439zi.pdf
224+
225+
.. _MCUBoot:
226+
https://github.com/JuulLabs-OSS/mcuboot/blob/master/README.md
227+
228+
.. _STM32CubeProgrammer:
229+
https://www.st.com/en/development-tools/stm32cubeprog.html

0 commit comments

Comments
 (0)