1.. zephyr:board:: stm32u5a9j_dk
2
3Overview
4********
5
6The STM32U5A9J-DK Discovery kit is a complete demonstration and development
7platform for the STM32U5A9NJH6Q microcontroller, featuring an Arm® Cortex®-M33
8core with Arm® TrustZone®.
9
10Leveraging the innovative ultra-low-power oriented features, 2.5 Mbytes of
11embedded SRAM, 4 Mbytes of embedded flash memory, and rich graphics features,
12the STM32U5A9J-DK Discovery kit enables users to easily prototype applications
13with state-of-the-art energy efficiency, as well as providing stunning and
14optimized graphics rendering with the support of the 2.5D NeoChrom Accelerator,
15Chrom-ART Accelerator, and Chrom-GRC™ MMU.
16
17The full range of hardware features available on the board helps users to
18enhance their application development by an evaluation of all the peripherals
19such as a 2.47-inch RGB 480x480 pixels TFT round LCD module with MIPI DSI®
20interface and capacitive touch panel, USB Type-C® HS, Octo-SPI flash memory
21device, Hexadeca-SPI PSRAM memory device, eMMC flash memory device,
22Time-of-Flight and gesture detection sensor, temperature sensor, and two 2.54 mm
23pitch double-row flexible expansion connectors for easy prototyping with
24daughterboards for specific applications (USART, LPUART, two SPIs, SAI, three
25I2C, SDMMC, ADCs, timers, and GPIOs).
26
27The STM32U5A9J-DK Discovery kit integrates an STLINK-V3E embedded in-circuit
28debugger and programmer for the STM32 microcontroller with a USB Virtual COM
29port bridge and comes with the STM32CubeU5 MCU Package, which provides an STM32
30comprehensive software HAL library as well as various software examples.
31
32.. image:: img/top_view.jpg
33     :align: center
34     :alt: STM32U5A9J-DK Top View
35
36.. image:: img/bottom_view.jpg
37     :align: center
38     :alt: STM32U5A9J-DK Bottom View
39
40More information about the board can be found at the `STM32U5A9J-DK website`_.
41More information about STM32U5A9NJH6Q can be found here:
42
43- `STM32U5A9NJ on www.st.com`_
44- `STM32U5 Series reference manual`_
45- `STM32U5Axxx datasheet`_
46
47Supported Features
48==================
49
50The current Zephyr stm32u5a9j_dk board configuration supports the following
51hardware features:
52
53+-----------+------------+-------------------------------------+
54| Interface | Controller | Driver/Component                    |
55+===========+============+=====================================+
56| NVIC      | on-chip    | nested vector interrupt controller  |
57+-----------+------------+-------------------------------------+
58| UART      | on-chip    | serial port-polling;                |
59|           |            | serial port-interrupt               |
60+-----------+------------+-------------------------------------+
61| LPUART    | on-chip    | low power uart                      |
62+-----------+------------+-------------------------------------+
63| PINMUX    | on-chip    | pinmux                              |
64+-----------+------------+-------------------------------------+
65| GPIO      | on-chip    | gpio                                |
66+-----------+------------+-------------------------------------+
67| RNG       | on-chip    | True Random number generator        |
68+-----------+------------+-------------------------------------+
69| I2C       | on-chip    | i2c                                 |
70+-----------+------------+-------------------------------------+
71| SPI       | on-chip    | spi                                 |
72+-----------+------------+-------------------------------------+
73| FLASH     | on-chip    | flash memory                        |
74+-----------+------------+-------------------------------------+
75| ADC       | on-chip    | adc                                 |
76+-----------+------------+-------------------------------------+
77| SDMMC     | on-chip    | flash memory                        |
78+-----------+------------+-------------------------------------+
79| WATCHDOG  | on-chip    | independent watchdog                |
80+-----------+------------+-------------------------------------+
81| PWM       | on-chip    | pwm                                 |
82+-----------+------------+-------------------------------------+
83| TIMER     | on-chip    | counter                             |
84+-----------+------------+-------------------------------------+
85| RTC       | on-chip    | rtc                                 |
86+-----------+------------+-------------------------------------+
87
88Other hardware features have not been enabled yet for this board.
89
90The default configuration per core can be found in the defconfig file:
91:zephyr_file:`boards/st/stm32u5a9j_dk/stm32u5a9j_dk_defconfig`
92
93Pin Mapping
94===========
95
96For more details please refer to `STM32U5A9J-DK board User Manual`_.
97
98Default Zephyr Peripheral Mapping:
99----------------------------------
100
101- USART_1 TX/RX : PA9/PA10 (ST-Link Virtual Port Com)
102- LD3 : PE0
103- LD4 : PE1
104- User Button: PC13
105- USART_3 TX/RX : PB10/PB11
106- LPUART_1 TX/RX : PG7/PG8
107- I2C1 SCL/SDA : PG14/PG13
108- I2C2 SCL/SDA : PF1/PF0
109- I2C6 SCL/SDA : PD1/PD0
110- SPI2 SCK/MISO/MOSI/CS : PB13/PD3/PD4/PB12
111- SPI3 SCK/MISO/MOSI/CS : PG9/PG10/PG11/PG15
112- ADC1 : channel5 PA0, channel14 PC5
113- ADC2 : channel9 PA4
114- ADC4 : channel5 PF14
115
116System Clock
117============
118
119The STM32U5A9J-DK Discovery kit relies on an HSE oscillator (16 MHz crystal)
120and an LSE oscillator (32.768 kHz crystal) as clock references.
121Using the HSE (instead of HSI) is mandatory to manage the DSI interface for
122the LCD module and the USB high‑speed interface.
123
124Serial Port
125===========
126
127The STM32U5A9J Discovery kit has up to 4 USARTs, 2 UARTs, and 1 LPUART.
128The Zephyr console output is assigned to USART1 which connected to the onboard
129ST-LINK/V3.0. Virtual COM port interface. Default communication settings are
130115200 8N1.
131
132
133Programming and Debugging
134*************************
135
136STM32U5A9J Discovery kit includes an ST-LINK/V3 embedded debug tool interface.
137This probe allows to flash and debug the board using various tools.
138
139Flashing
140========
141
142The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
143so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
144
145Alternatively, OpenOCD can also be used to flash the board using
146the ``--runner`` (or ``-r``) option:
147
148.. code-block:: console
149
150   $ west flash --runner openocd
151
152Flashing an application to STM32U5A9J_DK
153----------------------------------------
154
155Connect the STM32U5A9J Discovery board to your host computer using the USB
156port, then run a serial host program to connect with your Discovery
157board. For example:
158
159.. code-block:: console
160
161   $ minicom -D /dev/ttyACM0 -b 115200
162
163Then, build and flash in the usual way. Here is an example for the
164:zephyr:code-sample:`hello_world` application.
165
166.. zephyr-app-commands::
167   :zephyr-app: samples/hello_world
168   :board: stm32u5a9j_dk
169   :goals: build flash
170
171You should see the following message on the console:
172
173.. code-block:: console
174
175   Hello World! stm32u5a9j_dk
176
177Debugging
178=========
179
180Default debugger for this board is openocd. It could be used in the usual way
181with "west debug" command.
182Here is an example for the :zephyr:code-sample:`blinky` application.
183
184.. zephyr-app-commands::
185   :zephyr-app: samples/basic/blinky
186   :board: stm32u5a9j_dk
187   :goals: debug
188
189
190.. _STM32U5A9J-DK website:
191   https://www.st.com/en/evaluation-tools/stm32u5a9j-dk.html
192
193.. _STM32U5A9J-DK board User Manual:
194   https://www.st.com/resource/en/user_manual/um2967-discovery-kit-with-stm32u5a9nj-mcu-stmicroelectronics.pdf
195
196.. _STM32U5A9NJ on www.st.com:
197   https://www.st.com/en/microcontrollers-microprocessors/stm32u5a9nj.html
198
199.. _STM32U5 Series reference manual:
200   https://www.st.com/resource/en/reference_manual/rm0456-stm32u5-series-armbased-32bit-mcus-stmicroelectronics.pdf
201
202.. _STM32U5Axxx datasheet:
203   https://www.st.com/resource/en/datasheet/stm32u5a9nj.pdf
204
205.. _STM32CubeProgrammer:
206   https://www.st.com/en/development-tools/stm32cubeprog.html
207
208.. _STM32U5A9J_DK board schematics:
209   https://www.st.com/resource/en/schematic_pack/mb1829-u5a9njq-b01-schematic.pdf
210