boards: arm: initial suport for NUCLEO-H743ZI
Only basic support has been added as some drivers require some fixes. I have successfully tested the following examples: - samples/hello_world - samples/basic/blinky - samples/basic/button Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
parent
f2b93fae5a
commit
34d5e2bca2
7
boards/arm/nucleo_h743zi/CMakeLists.txt
Normal file
7
boards/arm/nucleo_h743zi/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(CONFIG_PINMUX)
|
||||
zephyr_library()
|
||||
zephyr_library_sources(pinmux.c)
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
endif()
|
8
boards/arm/nucleo_h743zi/Kconfig.board
Normal file
8
boards/arm/nucleo_h743zi/Kconfig.board
Normal file
|
@ -0,0 +1,8 @@
|
|||
# STM32H743ZI Nucleo board configuration
|
||||
|
||||
# Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_NUCLEO_H743ZI
|
||||
bool "Nucleo H743ZI Development Board"
|
||||
depends on SOC_STM32H743XX
|
15
boards/arm/nucleo_h743zi/Kconfig.defconfig
Normal file
15
boards/arm/nucleo_h743zi/Kconfig.defconfig
Normal file
|
@ -0,0 +1,15 @@
|
|||
# STM32H743ZI Nucleo board configuration
|
||||
|
||||
# Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_NUCLEO_H743ZI
|
||||
|
||||
config BOARD
|
||||
default "nucleo_h743zi"
|
||||
|
||||
config UART_3
|
||||
default y
|
||||
depends on UART_CONSOLE
|
||||
|
||||
endif # BOARD_NUCLEO_H743ZI
|
37
boards/arm/nucleo_h743zi/arduino_r3_connector.dtsi
Normal file
37
boards/arm/nucleo_h743zi/arduino_r3_connector.dtsi
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Linaro Limited
|
||||
* Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
arduino_header: connector {
|
||||
compatible = "arduino-header-r3";
|
||||
#gpio-cells = <2>;
|
||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||
gpio-map-pass-thru = <0 0x3f>;
|
||||
gpio-map = <0 0 &gpioa 3 0>, /* A0 */
|
||||
<1 0 &gpioc 0 0>, /* A1 */
|
||||
<2 0 &gpioc 3 0>, /* A2 */
|
||||
<3 0 &gpiob 1 0>, /* A3 */
|
||||
<4 0 &gpioc 2 0>, /* A4 */
|
||||
<5 0 &gpiof 10 0>, /* A5 */
|
||||
<6 0 &gpiob 7 0>, /* D0 */
|
||||
<7 0 &gpiob 14 0>, /* D1 */
|
||||
<8 0 &gpiog 14 0>, /* D2 */
|
||||
<9 0 &gpioe 13 0>, /* D3 */
|
||||
<10 0 &gpioe 14 0>, /* D4 */
|
||||
<11 0 &gpioe 11 0>, /* D5 */
|
||||
<12 0 &gpioe 9 0>, /* D6 */
|
||||
<13 0 &gpiog 12 0>, /* D7 */
|
||||
<14 0 &gpiof 3 0>, /* D8 */
|
||||
<15 0 &gpiod 15 0>, /* D9 */
|
||||
<16 0 &gpiod 14 0>, /* D10 */
|
||||
<17 0 &gpiob 5 0>, /* D11 */
|
||||
<18 0 &gpioa 6 0>, /* D12 */
|
||||
<19 0 &gpioa 5 0>, /* D13 */
|
||||
<20 0 &gpiob 9 0>, /* D14 */
|
||||
<21 0 &gpiob 8 0>; /* D15 */
|
||||
};
|
||||
};
|
6
boards/arm/nucleo_h743zi/board.cmake
Normal file
6
boards/arm/nucleo_h743zi/board.cmake
Normal file
|
@ -0,0 +1,6 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board_runner_args(jlink "--device=STM32H743ZI" "--speed=4000")
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
BIN
boards/arm/nucleo_h743zi/doc/img/nucleo_h743zi.jpg
Normal file
BIN
boards/arm/nucleo_h743zi/doc/img/nucleo_h743zi.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
204
boards/arm/nucleo_h743zi/doc/index.rst
Normal file
204
boards/arm/nucleo_h743zi/doc/index.rst
Normal file
|
@ -0,0 +1,204 @@
|
|||
.. _nucleo_h743zi_board:
|
||||
|
||||
ST Nucleo H743ZI
|
||||
################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The STM32 Nucleo-144 boards offer combinations of performance and power that
|
||||
provide an affordable and flexible way for users to build prototypes and try
|
||||
out new concepts. For compatible boards, the SMPS (Switched-Mode Power Supply)
|
||||
significantly reduces power consumption in Run mode.
|
||||
|
||||
The Arduino-compatible ST Zio connector expands functionality of the Nucleo
|
||||
open development platform, with a wide choice of specialized Arduino* Uno V3
|
||||
shields.
|
||||
|
||||
The STM32 Nucleo-144 board does not require any separate probe as it integrates
|
||||
the ST-LINK/V2-1 debugger/programmer.
|
||||
|
||||
The STM32 Nucleo-144 board comes with the STM32 comprehensive free software
|
||||
libraries and examples available with the STM32Cube MCU Package.
|
||||
|
||||
Key Features
|
||||
|
||||
- STM32 microcontroller in LQFP144 package
|
||||
- Ethernet compliant with IEEE-802.3-2002 (depending on STM32 support)
|
||||
- USB OTG or full-speed device (depending on STM32 support)
|
||||
- 3 user LEDs
|
||||
- 2 user and reset push-buttons
|
||||
- 32.768 kHz crystal oscillator
|
||||
- Board connectors:
|
||||
|
||||
- USB with Micro-AB
|
||||
- SWD
|
||||
- Ethernet RJ45 (depending on STM32 support)
|
||||
- ST Zio connector including Arduino* Uno V3
|
||||
- ST morpho
|
||||
|
||||
- Flexible power-supply options: ST-LINK USB VBUS or external sources.
|
||||
- On-board ST-LINK/V2-1 debugger/programmer with USB re-enumeration
|
||||
- capability: mass storage, virtual COM port and debug port.
|
||||
- Comprehensive free software libraries and examples available with the
|
||||
STM32Cube MCU package.
|
||||
- Arm* Mbed Enabled* compliant (only for some Nucleo part numbers)
|
||||
|
||||
.. image:: img/nucleo_h743zi.jpg
|
||||
:width: 720px
|
||||
:align: center
|
||||
:height: 720px
|
||||
:alt: Nucleo H743ZI
|
||||
|
||||
More information about the board can be found at the `Nucleo H743ZI website`_.
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
Nucleo H743ZI provides the following hardware components:
|
||||
|
||||
- STM32H743ZI in LQFP144 package
|
||||
- ARM 32-bit Cortex-M7 CPU with FPU
|
||||
- Chrom-ART Accelerator
|
||||
- Hardware JPEG Codec
|
||||
- 480 MHz max CPU frequency
|
||||
- VDD from 1.62 V to 3.6 V
|
||||
- 2 MB Flash
|
||||
- 1 MB SRAM
|
||||
- High-resolution timer (2.1 ns)
|
||||
- 32-bit timers(2)
|
||||
- 16-bit timers(12)
|
||||
- SPI(6)
|
||||
- I2C(4)
|
||||
- I2S (3)
|
||||
- USART(4)
|
||||
- UART(4)
|
||||
- USB OTG Full Speed and High Speed(1)
|
||||
- USB OTG Full Speed(1)
|
||||
- CAN-FD(2)
|
||||
- SAI(2)
|
||||
- SPDIF_Rx(4)
|
||||
- HDMI_CEC(1)
|
||||
- Dual Mode Quad SPI(1)
|
||||
- Camera Interface
|
||||
- GPIO (up to 114) with external interrupt capability
|
||||
- 16-bit ADC(3) with 36 channels / 3.6 MSPS
|
||||
- 12-bit DAC with 2 channels(2)
|
||||
- True Random Number Generator (RNG)
|
||||
- 16-channel DMA
|
||||
- LCD-TFT Controller with XGA resolution
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
The Zephyr nucleo_h743zi board configuration supports the following hardware
|
||||
features:
|
||||
|
||||
+-----------+------------+-------------------------------------+
|
||||
| Interface | Controller | Driver/Component |
|
||||
+===========+============+=====================================+
|
||||
| NVIC | on-chip | nested vector interrupt controller |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| UART | on-chip | serial port |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| PINMUX | on-chip | pinmux |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| GPIO | on-chip | gpio |
|
||||
+-----------+------------+-------------------------------------+
|
||||
|
||||
Other hardware features are not yet supported on this Zephyr port.
|
||||
|
||||
The default configuration can be found in the defconfig file:
|
||||
``boards/arm/nucleo_h743zi/nucleo_h743zi_defconfig``
|
||||
|
||||
For mode details please refer to `STM32 Nucleo-144 board User Manual`_.
|
||||
|
||||
Default Zephyr Peripheral Mapping:
|
||||
----------------------------------
|
||||
|
||||
The Nucleo H743ZI board features a ST Zio connector (extended Arduino Uno V3)
|
||||
and a ST morpho connector. Board is configured as follows:
|
||||
|
||||
- UART_3 TX/RX : PD8/PD9 (ST-Link Virtual Port Com)
|
||||
- USER_PB : PC13
|
||||
- LD1 : PB0
|
||||
- LD2 : PB7
|
||||
- LD3 : PB14
|
||||
|
||||
System Clock
|
||||
------------
|
||||
|
||||
Nucleo H743ZI System Clock could be driven by an internal or external
|
||||
oscillator, as well as the main PLL clock. By default, the System clock is
|
||||
driven by the PLL clock at 96MHz, driven by an 8MHz high-speed external clock.
|
||||
|
||||
Serial Port
|
||||
-----------
|
||||
|
||||
Nucleo H743ZI board has 4 UARTs and 4 USARTs. The Zephyr console output is
|
||||
assigned to UART3. Default settings are 115200 8N1.
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Applications for the ``nucleo_h743zi`` board configuration can be built and
|
||||
flashed in the usual way (see :ref:`build_an_application` and
|
||||
:ref:`application_run` for more details).
|
||||
|
||||
.. note::
|
||||
|
||||
If using OpenOCD you will need a recent development version as the last
|
||||
official release does not support H7 series yet.
|
||||
|
||||
Flashing
|
||||
========
|
||||
|
||||
Nucleo H743ZI board includes an ST-LINK/V2-1 embedded debug tool interface.
|
||||
|
||||
Flashing an application to Nucleo H743ZI
|
||||
----------------------------------------
|
||||
|
||||
Here is an example for the :ref:`hello_world` application.
|
||||
|
||||
Run a serial host program to connect with your Nucleo board.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ minicom -b 115200 -D /dev/ttyACM0
|
||||
|
||||
Build and flash the application:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: nucleo_h743zi
|
||||
:goals: build flash
|
||||
|
||||
You should see the following message on the console:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ Hello World! nucleo_h743zi
|
||||
|
||||
Debugging
|
||||
=========
|
||||
|
||||
You can debug an application in the usual way. Here is an example for the
|
||||
:ref:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: nucleo_h743zi
|
||||
:maybe-skip-config:
|
||||
:goals: debug
|
||||
|
||||
.. _Nucleo H743ZI website:
|
||||
https://www.st.com/en/evaluation-tools/nucleo-h743zi.html
|
||||
|
||||
.. _STM32 Nucleo-144 board User Manual:
|
||||
http://www.st.com/resource/en/user_manual/dm00244518.pdf
|
||||
|
||||
.. _STM32H743ZI on www.st.com:
|
||||
https://www.st.com/content/st_com/en/products/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus/stm32-high-performance-mcus/stm32h7-series/stm32h743-753/stm32h743zi.html
|
||||
|
||||
.. _STM32H743 reference manual:
|
||||
https://www.st.com/resource/en/reference_manual/dm00314099.pdf
|
58
boards/arm/nucleo_h743zi/nucleo_h743zi.dts
Normal file
58
boards/arm/nucleo_h743zi/nucleo_h743zi.dts
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <st/h7/stm32h743Xi.dtsi>
|
||||
#include "arduino_r3_connector.dtsi"
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32H743ZI-NUCLEO board";
|
||||
compatible = "st,stm32h743zi-nucleo", "st,stm32h743";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &usart3;
|
||||
zephyr,shell-uart = &usart3;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,dtcm = &dtcm;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
green_led: led_0 {
|
||||
gpios = <&gpiob 0 GPIO_ACTIVE_HIGH>;
|
||||
label = "User LD1";
|
||||
};
|
||||
blue_led: led_1 {
|
||||
gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>;
|
||||
label = "User LD2";
|
||||
};
|
||||
red_led: led_2 {
|
||||
gpios = <&gpiob 14 GPIO_ACTIVE_HIGH>;
|
||||
label = "User LD3";
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
user_button: button_0 {
|
||||
label = "User";
|
||||
gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led0 = &green_led;
|
||||
led1 = &blue_led;
|
||||
led2 = &red_led;
|
||||
sw0 = &user_button;
|
||||
};
|
||||
};
|
||||
|
||||
&usart3 {
|
||||
current-speed = <115200>;
|
||||
status = "okay";
|
||||
};
|
14
boards/arm/nucleo_h743zi/nucleo_h743zi.yaml
Normal file
14
boards/arm/nucleo_h743zi/nucleo_h743zi.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
identifier: nucleo_h743zi
|
||||
name: NUCLEO-H743ZI
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
ram: 512
|
||||
flash: 2048
|
||||
supported:
|
||||
- arduino_gpio
|
||||
- uart
|
||||
- gpio
|
41
boards/arm/nucleo_h743zi/nucleo_h743zi_defconfig
Normal file
41
boards/arm/nucleo_h743zi/nucleo_h743zi_defconfig
Normal file
|
@ -0,0 +1,41 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_SOC_SERIES_STM32H7X=y
|
||||
CONFIG_SOC_STM32H743XX=y
|
||||
# 96MHz system clock (CubeMX Defaults)
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# Enable UART
|
||||
CONFIG_SERIAL=y
|
||||
|
||||
# Console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
||||
# Enable Pinmux
|
||||
CONFIG_PINMUX=y
|
||||
|
||||
# Enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Clock Configuration
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
# STLINK provides 8MHz clock input
|
||||
CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
|
||||
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
||||
# Use HSE as PLL input
|
||||
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
|
||||
# Nucleo-144 boards do not have an external oscillator, so just use
|
||||
# the 8MHz clock signal coming from integrated STLink
|
||||
CONFIG_CLOCK_STM32_HSE_BYPASS=y
|
||||
|
||||
# Produce 96MHz clock at PLL output
|
||||
CONFIG_CLOCK_STM32_PLL_M_DIVISOR=1
|
||||
CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=24
|
||||
CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2
|
||||
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=4
|
||||
CONFIG_CLOCK_STM32_PLL_R_DIVISOR=2
|
33
boards/arm/nucleo_h743zi/pinmux.c
Normal file
33
boards/arm/nucleo_h743zi/pinmux.c
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <device.h>
|
||||
#include <init.h>
|
||||
#include <drivers/pinmux.h>
|
||||
#include <sys/sys_io.h>
|
||||
|
||||
#include <pinmux/stm32/pinmux_stm32.h>
|
||||
|
||||
/* NUCLEO-H743ZI pin configurations */
|
||||
static const struct pin_config pinconf[] = {
|
||||
#ifdef CONFIG_UART_3
|
||||
{ STM32_PIN_PD8, STM32H7_PINMUX_FUNC_PD8_USART3_TX },
|
||||
{ STM32_PIN_PD9, STM32H7_PINMUX_FUNC_PD9_USART3_RX },
|
||||
#endif /* CONFIG_UART_3 */
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1,
|
||||
CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY);
|
12
boards/arm/nucleo_h743zi/support/openocd.cfg
Normal file
12
boards/arm/nucleo_h743zi/support/openocd.cfg
Normal file
|
@ -0,0 +1,12 @@
|
|||
source [find board/st_nucleo_h743zi.cfg]
|
||||
|
||||
$_CHIPNAME.cpu0 configure -event gdb-attach {
|
||||
echo "Debugger attaching: halting execution"
|
||||
reset halt
|
||||
gdb_breakpoint_override hard
|
||||
}
|
||||
|
||||
$_CHIPNAME.cpu0 configure -event gdb-detach {
|
||||
echo "Debugger detaching: resuming execution"
|
||||
resume
|
||||
}
|
Loading…
Reference in a new issue