Skip to content

Commit ede3ab1

Browse files
committed
boards/arm/stm32h7: Add support for ST Nucleo-H753ZI board
Add board support for the ST Nucleo-H753ZI (MB1364) development board featuring the STM32H753ZIT6 microcontroller (Arm Cortex-M7, 2 MB Flash, 1 MB RAM). This port was initially based on the linum-stm32h753bi board support, with a corrected clock tree and a substantially redesigned board architecture aimed at improving usability, scalability, and maintainability. Clock Tree ---------- Both HSE configurations (8 MHz ST-LINK MCO and 25 MHz external crystal) produce identical system performance: SYSCLK = 400 MHz (VOS1), HCLK = 200 MHz, PCLK = 100 MHz The original linum-based clock tree was corrected to fix PLL input range registers, VCO frequency calculations, and peripheral kernel clock assignments. FDCAN kernel clock is 25 MHz in both configurations (PLL2Q for 8 MHz HSE; HSE direct for 25 MHz HSE), ensuring compliance with standard CAN bitrates (125/250/500 kbps, 1 Mbps). Menuconfig-Driven Architecture ------------------------------- The central design goal of this port is to make NuttX more approachable for developers working with real hardware. The intent is to expose as many hardware options as practical through Kconfig/menuconfig, reducing the need to manually edit source files for routine board bring-up tasks. This is a proposed direction that could establish a new pattern for NuttX board ports -- one that prioritizes developer agility and user-friendliness alongside the existing coding standards. This is a deliberate departure from the pattern found in most existing NuttX board ports, where pin assignments, bus selections, and peripheral options are hardcoded. The intent is not to break convention for its own sake, but to demonstrate that a menuconfig-driven board layer reduces friction substantially -- particularly for developers new to NuttX or porting it to derivative hardware. Specifically, this port provides menuconfig control over: - HSE clock source (8 MHz ST-LINK MCO or 25 MHz external crystal) - SPI bus enable/disable and alternative pin set selection (SPI1-SPI6, 2-4 pin sets each); CS pins are registered per-peripheral at runtime - I2C bus enable/disable, alternative pin set selection (I2C1-I2C4, 2-5 pin sets each), and default bus frequency per bus; conflicting pin assignments (e.g. I2C1 pinset 1 vs I2C4 pinset 4) are prevented at compile time via Kconfig dependency rules - LED control mode: automatic (kernel OS state), user (/dev/userleds), or disabled - Button driver: number of buttons (1-32), built-in button (PC13) inclusion, additional button GPIO pins specified as a string (e.g. "PB1,PD0,PG4"), with compile-time EXTI conflict validation - ST7796 SPI LCD: bus, CS/DC/RESET/LED pins, CS polarity, color depth, orientation, rotation, SPI frequency, framebuffer size - MFRC522 RFID: bus, CS pin, CS polarity, IRQ pin, IRQ trigger type - SSD1306 OLED: bus, I2C address, frequency, brightness, resolution, device path Scope of This Port ------------------ This is not a minimal board port. Separating a clean minimal port from the full implementation was not practical at this stage, so the complete board support is submitted as-is -- following the same approach taken by the linum-stm32h753bi port. While the Nucleo-H753ZI is a development board rather than an OEM product, the port is fully functional: anyone with the hardware can build and run NuttX on it immediately using the provided configurations. Source Organization ------------------- The src/ directory uses a layered subdirectory structure to separate concerns and make the codebase easier to navigate and extend. This is a deliberate organizational choice that differs from the flat src/ layout common in other NuttX board ports. If the project prefers the traditional flat layout, all files can be moved directly into src/ with no functional changes required -- the Makefile and CMakeLists.txt are the only files that would need updating. src/ ├── stm32_boot.c ├── stm32_bringup.c ├── stm32_appinitialize.c ├── stm32_boot_image.c ├── nucleo-h753zi.h └── drivers/ ├── driver_bus/ (SPI, I2C bus initialization) ├── driver_generic/ (ADC, buttons, GPIO, PWM, LEDs) ├── driver_middleware/ (USB, ROMFS, progmem, autoleds, UID) └── driver_modules/ (peripheral drivers: displays, sensors, wireless, storage) Supported Peripheral Modules ----------------------------- - ST7796 SPI LCD 320x480 IPS with framebuffer (/dev/fb0, LVGL-ready) - SSD1306 I2C OLED 128x64/128x32 - MFRC522 SPI RFID 13.56 MHz (/dev/rfid0) - NRF24L01 SPI 2.4 GHz transceiver - MMC/SD card over SPI - LSM6DSL, LSM303AGR, LSM9DS1 IMU sensors (I2C) - LPS22HB pressure sensor (I2C) - PCA9635 I2C LED controller - PWM output (TIM1, CH1-CH4 + complementary) - PROGMEM MTD, RTC, USB OTG FS (device/host), USB MSC, ROMFS Configurations -------------- nsh - NuttShell, user LEDs, GPIO driver button_driver - 11-button demo (PC13 + 10 external), IRQ-driven, auto LEDs socketcan - FDCAN1 as SocketCAN, 500 kbps, candump/cansend Testing ------- The following drivers were validated on real hardware (Nucleo-H753ZI): - buttons (IRQ-driven, 11-button configuration) - leds (user and automatic modes) - gpio (/dev/gpioN) - mfrc522 (SPI RFID, /dev/rfid0) - socketcan (FDCAN1, 500 kbps, candump/cansend) - st7796 (SPI LCD, framebuffer, LVGL) - ssd1306 (I2C OLED) The ST7796 framebuffer driver (boards/.../stm32_st7796.c) and the FDCAN SocketCAN driver fix (arch/arm/src/stm32h7/stm32_fdcan_sock.c) were both developed and validated using this board. Signed-off-by: Vinicius May <vmay.sweden@gmail.com>
1 parent bcf682c commit ede3ab1

49 files changed

Lines changed: 15504 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

boards/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,6 +1916,15 @@ config ARCH_BOARD_NUCLEO_H743ZI
19161916
---help---
19171917
STMicro Nucleo H743ZI board based on the STMicro STM32H743ZI MCU.
19181918

1919+
config ARCH_BOARD_NUCLEO_H753ZI
1920+
bool "STM32H753 Nucleo H753ZI"
1921+
depends on ARCH_CHIP_STM32H753ZI
1922+
select ARCH_HAVE_LEDS
1923+
select ARCH_HAVE_BUTTONS
1924+
select ARCH_HAVE_IRQBUTTONS
1925+
---help---
1926+
STMicro Nucleo H753ZI board based on the STMicro STM32H753ZI MCU.
1927+
19191928
config ARCH_BOARD_NUCLEO_H743ZI2
19201929
bool "STM32H743 Nucleo H743ZI2"
19211930
depends on ARCH_CHIP_STM32H743ZI
@@ -3690,6 +3699,7 @@ config ARCH_BOARD
36903699
default "weact-stm32h743" if ARCH_BOARD_WEACT_STM32H743
36913700
default "weact-stm32h750" if ARCH_BOARD_WEACT_STM32H750
36923701
default "nucleo-h743zi" if ARCH_BOARD_NUCLEO_H743ZI
3702+
default "nucleo-h753zi" if ARCH_BOARD_NUCLEO_H753ZI
36933703
default "nucleo-h743zi2" if ARCH_BOARD_NUCLEO_H743ZI2
36943704
default "nucleo-h745zi" if ARCH_BOARD_NUCLEO_H745ZI
36953705
default "stm32h745i-disco" if ARCH_BOARD_STM32H745I_DISCO
@@ -4425,6 +4435,9 @@ endif
44254435
if ARCH_BOARD_NUCLEO_H743ZI
44264436
source "boards/arm/stm32h7/nucleo-h743zi/Kconfig"
44274437
endif
4438+
if ARCH_BOARD_NUCLEO_H753ZI
4439+
source "boards/arm/stm32h7/nucleo-h753zi/Kconfig"
4440+
endif
44284441
if ARCH_BOARD_NUCLEO_H743ZI2
44294442
source "boards/arm/stm32h7/nucleo-h743zi2/Kconfig"
44304443
endif
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ##############################################################################
2+
# boards/arm/stm32h7/nucleo-h753zi/CMakeLists.txt
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
7+
# license agreements. See the NOTICE file distributed with this work for
8+
# additional information regarding copyright ownership. The ASF licenses this
9+
# file to you under the Apache License, Version 2.0 (the "License"); you may not
10+
# use this file except in compliance with the License. You may obtain a copy of
11+
# the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18+
# License for the specific language governing permissions and limitations under
19+
# the License.
20+
#
21+
# ##############################################################################
22+
23+
add_subdirectory(src)

0 commit comments

Comments
 (0)