Skip to content

Commit fc79380

Browse files
manoj153nashif
authored andcommitted
boards: Add support for nucleo_h7a3zi_q
Introduce this board, rcc config: the SoC uses slightly different domain naming, eg: `cdppre` is equivalent to `d1ppre` D1 = CD D2 = CD<..>2 D3 = SRD Signed-off-by: Manojkumar Subramaniam <[email protected]>
1 parent ae0ce3a commit fc79380

File tree

10 files changed

+455
-0
lines changed

10 files changed

+455
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# STM32H7A3ZI-Q Nucleo board configuration
2+
3+
# Copyright (c) 2021 Electrolance Solutions
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD_NUCLEO_H7A3ZI_Q
7+
bool "Nucleo H75A3ZI-Q Development Board"
8+
depends on SOC_STM32H7A3XXQ
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# STM32H7A3ZI-Q Nucleo board configuration
2+
3+
# Copyright (c) 2021 Electrolance Solutions
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_NUCLEO_H7A3ZI_Q
7+
8+
config BOARD
9+
default "nucleo_h7a3zi_q"
10+
11+
endif # BOARD_NUCLEO_H7A3ZI_Q
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) 2021 Electrolance Solutions
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 &gpiob 1 0>, /* A3 */
17+
<4 0 &gpioc 2 0>, /* A4 */
18+
<5 0 &gpiof 11 0>, /* A5 */
19+
<6 0 &gpiob 7 0>, /* D0 */
20+
<7 0 &gpiob 6 0>, /* D1 */
21+
<8 0 &gpiog 14 0>, /* D2 */
22+
<9 0 &gpioe 13 0>, /* D3 */
23+
<10 0 &gpioe 14 0>, /* D4 */
24+
<11 0 &gpioe 11 0>, /* D5 */
25+
<12 0 &gpioa 8 0>, /* D6 */
26+
<13 0 &gpiog 12 0>, /* D7 */
27+
<14 0 &gpiog 9 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+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
board_runner_args(jlink "--device=STM32H7A3ZI" "--speed=4000")
4+
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset=hw")
5+
6+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
7+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
8+
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
1.09 MB
Loading
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
.. _nucleo_h7a3zi_q_board:
2+
3+
ST Nucleo H7A3ZI-Q
4+
##################
5+
6+
Overview
7+
********
8+
9+
The STM32 Nucleo-144 boards offer combinations of performance and power that
10+
provide an affordable and flexible way for users to build prototypes and try
11+
out new concepts. For compatible boards, the SMPS (Switched-Mode Power Supply)
12+
significantly reduces power consumption in Run mode.
13+
14+
The Arduino-compatible ST Zio connector expands functionality of the Nucleo
15+
open development platform, with a wide choice of specialized Arduino* Uno V3
16+
shields.
17+
18+
The STM32 Nucleo-144 board does not require any separate probe as it integrates
19+
the ST-LINK/V3E debugger/programmer.
20+
21+
The STM32 Nucleo-144 board comes with the STM32 comprehensive free software
22+
libraries and examples available with the STM32Cube MCU Package.
23+
24+
Key Features
25+
26+
- STM32 microcontroller in LQFP144 package
27+
- USB OTG or full-speed device (depending on STM32 support)
28+
- 3 user LEDs
29+
- 2 user and reset push-buttons
30+
- 32.768 kHz crystal oscillator
31+
- Board connectors:
32+
33+
- USB with Micro-AB
34+
- SWD
35+
- ST Zio connector including Arduino* Uno V3
36+
- ST morpho
37+
38+
- Flexible power-supply options: ST-LINK USB VBUS or external sources.
39+
- On-board ST-LINK/V3E debugger/programmer with USB re-enumeration
40+
- capability: mass storage, virtual COM port and debug port.
41+
- Comprehensive free software libraries and examples available with the
42+
STM32Cube MCU package.
43+
- Arm* Mbed Enabled* compliant (only for some Nucleo part numbers)
44+
45+
.. image:: img/nucleo_h7a3zi_q.jpg
46+
:width: 1000px
47+
:align: center
48+
:height: 1498px
49+
:alt: Nucleo H7A3ZI-Q
50+
51+
More information about the board can be found at the `Nucleo H7A3ZI-Q website`_.
52+
53+
Hardware
54+
********
55+
56+
Nucleo H7A3ZI-Q provides the following hardware components:
57+
58+
- STM32H7A3ZI in LQFP144 package
59+
- ARM 32-bit Cortex-M7 CPU with FPU
60+
- Chrom-ART Accelerator
61+
- Hardware JPEG Codec
62+
- 280 MHz max CPU frequency
63+
- VDD from 1.62 V to 3.6 V
64+
- 2 MB Flash
65+
- ~1.4 Mbytes SRAM
66+
- 32-bit timers(2)
67+
- 16-bit timers(15)
68+
- SPI(6)
69+
- I2C(4)
70+
- I2S (3)
71+
- USART(5)
72+
- UART(5)
73+
- USB OTG Full Speed and High Speed(1)
74+
- USB OTG Full Speed(1)
75+
- CAN-FD(2)
76+
- SAI(2)
77+
- SPDIF_Rx(4)
78+
- HDMI_CEC(1)
79+
- Dual Mode Quad SPI(1)
80+
- Camera Interface
81+
- GPIO (up to 114) with external interrupt capability
82+
- 16-bit ADC(2) with 24 channels / 3.6 MSPS
83+
- 12-bit DAC with 1/2 channels(2)
84+
- True Random Number Generator (RNG)
85+
- 16-channel DMA
86+
- LCD-TFT Controller with XGA resolution
87+
88+
Supported Features
89+
==================
90+
91+
The Zephyr nucleo_h7a3zi_q board configuration supports the following hardware
92+
features:
93+
94+
+-------------+------------+------------------------------------+
95+
| Interface | Controller | Driver/Component |
96+
+=============+============+====================================+
97+
| NVIC | on-chip | nested vector interrupt controller |
98+
+-------------+------------+------------------------------------+
99+
| UART | on-chip | serial port |
100+
+-------------+------------+------------------------------------+
101+
| PINMUX | on-chip | pinmux |
102+
+-------------+------------+------------------------------------+
103+
| GPIO | on-chip | gpio |
104+
+-------------+------------+------------------------------------+
105+
| PWM | on-chip | pwm |
106+
+-------------+------------+------------------------------------+
107+
| ADC | on-chip | adc |
108+
+-------------+------------+------------------------------------+
109+
| Backup SRAM | on-chip | Backup SRAM |
110+
+-------------+------------+------------------------------------+
111+
112+
113+
114+
Other hardware features are not yet supported on this Zephyr port.
115+
116+
The default configuration can be found in the defconfig file:
117+
``boards/arm/nucleo_h7a3zi_q/nucleo_h7a3zi_q_defconfig``
118+
119+
For mode details please refer to `STM32 Nucleo-144 board User Manual`_.
120+
121+
Default Zephyr Peripheral Mapping:
122+
----------------------------------
123+
124+
The Nucleo H7A3ZI-Q board features a ST Zio connector (extended Arduino Uno V3)
125+
and a ST morpho connector. Board is configured as follows:
126+
127+
- USART3 TX/RX : PD8/PD9 (ST-Link Virtual Port Com)
128+
- USER_PB : PC13
129+
- LD1 : PB0
130+
- LD2 : PE1
131+
- LD3 : PB14
132+
- ADC1_INP15 : PA3 (Arduino analog, A0)
133+
134+
System Clock
135+
------------
136+
137+
Nucleo H7A3ZI-Q System Clock could be driven by an internal or external
138+
oscillator, as well as the main PLL clock. By default, the System clock is
139+
driven by the PLL clock at 96MHz, driven by an 8MHz high-speed external clock.
140+
141+
Serial Port
142+
-----------
143+
144+
Nucleo H7A3ZI-Q board has 4 UARTs and 4 USARTs. The Zephyr console output is
145+
assigned to USART3. Default settings are 115200 8N1.
146+
147+
Programming and Debugging
148+
*************************
149+
150+
Applications for the ``nucleo_h7a3zi_q`` board configuration can be built and
151+
flashed in the usual way (see :ref:`build_an_application` and
152+
:ref:`application_run` for more details).
153+
154+
Flashing
155+
========
156+
157+
Nucleo H7A3ZI-Q board includes an ST-LINK/V3E embedded debug tool interface.
158+
159+
Flashing an application to Nucleo H7A3ZI-Q
160+
------------------------------------------
161+
162+
Here is an example for the :ref:`hello_world` application.
163+
164+
Run a serial host program to connect with your Nucleo board.
165+
166+
.. code-block:: console
167+
168+
$ minicom -b 115200 -D /dev/ttyACM0
169+
170+
Build and flash the application:
171+
172+
.. zephyr-app-commands::
173+
:zephyr-app: samples/hello_world
174+
:board: nucleo_h7a3zi_q
175+
:goals: build flash
176+
177+
You should see the following message on the console:
178+
179+
.. code-block:: console
180+
181+
$ Hello World! nucleo_h7a3zi_q
182+
183+
Debugging
184+
=========
185+
186+
You can debug an application in the usual way. Here is an example for the
187+
:ref:`hello_world` application.
188+
189+
.. zephyr-app-commands::
190+
:zephyr-app: samples/hello_world
191+
:board: nucleo_h7a3zi_q
192+
:maybe-skip-config:
193+
:goals: debug
194+
195+
.. _Nucleo H7A3ZI-Q website:
196+
https://www.st.com/en/evaluation-tools/nucleo-h7a3zi-q.html#overview
197+
198+
.. _STM32 Nucleo-144 board User Manual:
199+
https://www.st.com/resource/en/user_manual/um2408-stm32h7-nucleo144-boards-mb1363-stmicroelectronics.pdf
200+
201+
.. _STM32H7A3ZI-Q on www.st.com:
202+
https://www.st.com/en/microcontrollers-microprocessors/stm32h7a3zi.html
203+
204+
.. _STM32H7A3ZI-Q reference manual:
205+
https://www.st.com/resource/en/reference_manual/rm0455-stm32h7a37b3-and-stm32h7b0-value-line-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/*
2+
* Copyright (c) 2021 Electrolance Solutions
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
#include <st/h7/stm32h7a3Xi.dtsi>
9+
#include <st/h7/stm32h7a3z(g-i)txq-pinctrl.dtsi>
10+
#include "arduino_r3_connector.dtsi"
11+
12+
/ {
13+
model = "STMicroelectronics STM32H7A3ZI-Q-NUCLEO board";
14+
compatible = "st,stm32h7a3zi-q-nucleo";
15+
16+
chosen {
17+
zephyr,console = &usart3;
18+
zephyr,shell-uart = &usart3;
19+
zephyr,sram = &sram0;
20+
zephyr,flash = &flash0;
21+
zephyr,dtcm = &dtcm;
22+
};
23+
24+
leds {
25+
compatible = "gpio-leds";
26+
green_led: led_0 {
27+
gpios = <&gpiob 0 GPIO_ACTIVE_HIGH>;
28+
label = "User LD1";
29+
};
30+
yellow_led: led_1 {
31+
gpios = <&gpioe 1 GPIO_ACTIVE_HIGH>;
32+
label = "User LD2";
33+
};
34+
};
35+
36+
pwmleds {
37+
compatible = "pwm-leds";
38+
39+
red_pwm_led: red_pwm_led {
40+
pwms = <&pwm12 1 4 PWM_POLARITY_NORMAL>;
41+
};
42+
};
43+
44+
gpio_keys {
45+
compatible = "gpio-keys";
46+
user_button: button_0 {
47+
label = "User";
48+
gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
49+
};
50+
};
51+
52+
aliases {
53+
led0 = &green_led;
54+
led1 = &yellow_led;
55+
pwm-led0 = &red_pwm_led;
56+
sw0 = &user_button;
57+
};
58+
};
59+
60+
&clk_hse {
61+
hse-bypass;
62+
clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */
63+
status = "okay";
64+
};
65+
66+
&pll {
67+
div-m = <1>;
68+
mul-n = <24>;
69+
div-p = <2>;
70+
div-q = <4>;
71+
div-r = <2>;
72+
clocks = <&clk_hse>;
73+
status = "okay";
74+
};
75+
76+
&rcc {
77+
clocks = <&pll>;
78+
clock-frequency = <DT_FREQ_M(96)>;
79+
d1cpre = <1>;
80+
hpre = <1>;
81+
d1ppre = <2>;
82+
d2ppre1 = <2>;
83+
d2ppre2 = <2>;
84+
d3ppre = <2>;
85+
};
86+
87+
&usart3 {
88+
pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>;
89+
pinctrl-names = "default";
90+
current-speed = <115200>;
91+
status = "okay";
92+
};
93+
94+
&backup_sram {
95+
status = "okay";
96+
};
97+
98+
&timers12 {
99+
st,prescaler = <10000>;
100+
status = "okay";
101+
102+
pwm12: pwm {
103+
status = "okay";
104+
pinctrl-names = "default";
105+
pinctrl-0 = <&tim12_ch1_pb14>;
106+
};
107+
};
108+
109+
&adc1 {
110+
pinctrl-0 = <&adc1_inp15_pa3>;
111+
pinctrl-names = "default";
112+
status = "okay";
113+
};

0 commit comments

Comments
 (0)