Skip to content

Commit 2ce8767

Browse files
djiatsaf-stfabiobaltieri
authored andcommitted
boards: st: add support for stm32u5a9j_dk2 board
- add dts for stm32u5a9j_dk - add board configurations files - add documentation Signed-off-by: Fabrice DJIATSA <[email protected]>
1 parent d851986 commit 2ce8767

File tree

9 files changed

+645
-0
lines changed

9 files changed

+645
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 STMicroelectronics
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_STM32U5G9J_DK2
5+
select SOC_STM32U5G9XX

boards/st/stm32u5g9j_dk2/board.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2025 STMicroelectronics
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# keep first
5+
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
6+
7+
board_runner_args(openocd "--tcl-port=6666")
8+
board_runner_args(openocd --cmd-pre-init "gdb_report_data_abort enable")
9+
board_runner_args(openocd "--no-halt")
10+
11+
# keep first
12+
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
13+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

boards/st/stm32u5g9j_dk2/board.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: stm32u5g9j_dk2
3+
full_name: STM32U5G9J Discovery Kit
4+
vendor: st
5+
socs:
6+
- name: stm32u5g9xx
Binary file not shown.
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
.. zephyr:board:: stm32u5g9j_dk2
2+
3+
Overview
4+
********
5+
6+
The STM32U5G9J-DK2 Discovery kit is a complete demonstration and development
7+
platform for the STM32U5G9ZJT6Q microcontroller, featuring an Arm |reg| Cortex |reg|‑M33
8+
core with Arm |reg| TrustZone |reg|.
9+
10+
Leveraging the innovative ultra-low power-oriented features, 3 Mbytes of
11+
embedded SRAM, 4 Mbytes of embedded flash memory, and rich graphics features,
12+
the STM32U5G9J-DK2 Discovery kit enables users to prototype applications
13+
with state-of-the-art energy efficiency, as well as providing stunning and
14+
optimized graphics rendering with the support of a 2.5D Neo-Chrom accelerator,
15+
chrom-ART Accelerator, and Chrom-GRC™ MMU.
16+
17+
The STM32U5G9J-DK2 Discovery kit integrates a full range of hardware features
18+
that help the user evaluate all the peripherals, such as a 5" RGB 800x480 pixels
19+
TFT colored LCD module with a 24‑bit RGB interface and capacitive touch panel,
20+
USB Type-C |reg| HS, Octo‑SPI flash memory device, ARDUINO |reg|, and STLINK-V3EC
21+
(USART console).
22+
23+
The STM32U5G9J-DK2 Discovery kit integrates an STLINK-V3EC embedded in-circuit
24+
debugger and programmer for the STM32 microcontroller with a USB Virtual COM
25+
port bridge and comes with the STM32CubeU5 MCU Package, which provides an STM32
26+
comprehensive software HAL library as well as various software examples.
27+
28+
More information about the board can be found at the `STM32U5G9J-DK2 website`_.
29+
More information about STM32U5G9ZJT6Q can be found here:
30+
31+
- `STM32U5G9ZJ on www.st.com`_
32+
- `STM32U5 Series reference manual`_
33+
- `STM32U5Gxxx datasheet`_
34+
35+
Supported Features
36+
==================
37+
38+
.. zephyr:board-supported-hw::
39+
40+
Pin Mapping
41+
===========
42+
43+
For more details please refer to `STM32U5G9J-DK2 board User Manual`_.
44+
45+
Default Zephyr Peripheral Mapping:
46+
----------------------------------
47+
48+
.. rst-class:: rst-columns
49+
50+
- USART_1 TX/RX : PA9/PA10 (ST-Link Virtual Port Com)
51+
- USART_2 TX/RX : PA2/PA3
52+
- LD2 : PD2
53+
- LD3 : PD4
54+
- User Button: PC13
55+
- I2C1 SCL/SDA : PG14/PG13
56+
- I2C2 SCL/SDA : PB10/PB11
57+
- SPI1 SCK/MISO/MOSI/CS : PA5/PA6/PB5/PA3
58+
- ADC1 : channel5 PA0, channel12 PA7
59+
- ADC4 : channel4 PC3
60+
- SDMMC1/LTDC conflicting pins: PC6, PC7, PC8, PC9, PB9
61+
- SDMMC1_CK : PC12
62+
- SDMMC1_CMD : PD2
63+
- SDMMC1_D0 : PC8
64+
- SDMMC1_D1 : PC9
65+
- SDMMC1_D2 : PC10
66+
- SDMMC1_D3 : PC11
67+
- SDMMC1_D4 : PB8
68+
- SDMMC1_D5 : PB9
69+
- SDMMC1_D6 : PC6
70+
- SDMMC1_D7 : PC7
71+
- LTDC_R0 : PC6
72+
- LTDC_R1 : PC7
73+
- LTDC_R2 : PE15
74+
- LTDC_R3 : PD8
75+
- LTDC_R4 : PD9
76+
- LTDC_R5 : PD10
77+
- LTDC_R6 : PD11
78+
- LTDC_R7 : PD12
79+
- LTDC_G0 : PC8
80+
- LTDC_G1 : PC9
81+
- LTDC_G2 : PE9
82+
- LTDC_G3 : PE10
83+
- LTDC_G4 : PE11
84+
- LTDC_G5 : PE12
85+
- LTDC_G6 : PE13
86+
- LTDC_G7 : PE14
87+
- LTDC_B0 : PB9
88+
- LTDC_B1 : PB2
89+
- LTDC_B2 : PD14
90+
- LTDC_B3 : PD15
91+
- LTDC_B4 : PD0
92+
- LTDC_B5 : PD1
93+
- LTDC_B6 : PE7
94+
- LTDC_B7 : PE8
95+
- LTDC_DE : PD6
96+
- LTDC_CLK : PD3
97+
- LTDC_HSYNC : PE0
98+
- LTDC_VSYNC : PD13
99+
100+
System Clock
101+
============
102+
103+
The STM32U5G9J-DK Discovery 2 kit relies on an HSE oscillator (16 MHz crystal)
104+
and an LSE oscillator (32.768 kHz crystal) as clock references.
105+
Using the HSE (instead of HSI) is mandatory to manage the DSI interface for
106+
the LCD module and the USB high‑speed interface.
107+
108+
Serial Port
109+
===========
110+
111+
The STM32U5G9J Discovery 2 kit has up to 4 USARTs, 2 UARTs, and 1 LPUART.
112+
The Zephyr console output is assigned to USART1 which connected to the onboard
113+
ST-LINK/V3.0. Virtual COM port interface. Default communication settings are
114+
115200 8N1.
115+
116+
117+
Programming and Debugging
118+
*************************
119+
120+
.. zephyr:board-supported-runners::
121+
122+
STM32U5G9J Discovery 2 kit includes an ST-LINK/V3 embedded debug tool interface.
123+
This probe allows to flash and debug the board using various tools.
124+
125+
Flashing
126+
========
127+
128+
The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
129+
so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
130+
131+
Alternatively, OpenOCD can also be used to flash the board using
132+
the ``--runner`` (or ``-r``) option:
133+
134+
.. code-block:: console
135+
136+
$ west flash --runner openocd
137+
138+
Flashing an application to STM32U5G9J_DK2
139+
-----------------------------------------
140+
141+
Connect the STM32U5G9J Discovery 2 board to your host computer using the USB
142+
port, then run a serial host program to connect with your Discovery
143+
board. For example:
144+
145+
.. code-block:: console
146+
147+
$ minicom -D /dev/ttyACM0 -b 115200
148+
149+
Then, build and flash in the usual way. Here is an example for the
150+
:zephyr:code-sample:`hello_world` application.
151+
152+
.. zephyr-app-commands::
153+
:zephyr-app: samples/hello_world
154+
:board: stm32u5g9j_dk2
155+
:goals: build flash
156+
157+
You should see the following message on the console:
158+
159+
.. code-block:: console
160+
161+
Hello World! stm32u5g9j_dk2
162+
163+
Debugging
164+
=========
165+
166+
Default debugger for this board is openocd. It could be used in the usual way
167+
with "west debug" command.
168+
Here is an example for the :zephyr:code-sample:`blinky` application.
169+
170+
.. zephyr-app-commands::
171+
:zephyr-app: samples/basic/blinky
172+
:board: stm32u5g9j_dk2
173+
:goals: debug
174+
175+
176+
.. _STM32U5G9J-DK2 website:
177+
https://www.st.com/en/evaluation-tools/stm32u5g9j-dk2.html
178+
179+
.. _STM32U5G9J-DK2 board User Manual:
180+
https://www.st.com/resource/en/user_manual/um3223-discovery-kit-with-stm32u5g9zj-mcu-stmicroelectronics.pdf
181+
182+
.. _STM32U5G9ZJ on www.st.com:
183+
https://www.st.com/en/microcontrollers-microprocessors/stm32u5g9zj.html
184+
185+
.. _STM32U5 Series reference manual:
186+
https://www.st.com/resource/en/reference_manual/rm0456-stm32u5-series-armbased-32bit-mcus-stmicroelectronics.pdf
187+
188+
.. _STM32U5Gxxx datasheet:
189+
https://www.st.com/resource/en/datasheet/stm32u5g7vj.pdf
190+
191+
.. _STM32CubeProgrammer:
192+
https://www.st.com/en/development-tools/stm32cubeprog.html
193+
194+
.. _STM32U5G9J_DK2 board schematics:
195+
https://www.st.com/resource/en/schematic_pack/mb1918-u5g9zjq-c01-schematic.pdf

0 commit comments

Comments
 (0)