You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2026/10/06 19:36:48 UTC
(nuttx) 01/02: arm/stm32h5: add STM32H573II support
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 407896ba020d402af4a2f0b649ad3419d32f6567
Author: raiden00pl <ra...@railab.me>
AuthorDate: Tue Sep 22 13:25:46 2026 +0200
arm/stm32h5: add STM32H573II support
add STM32H573II support
Assisted-by: Codex:GPT-6
Signed-off-by: raiden00pl <ra...@railab.me>
---
arch/arm/src/common/stm32/Kconfig.uart | 16 +++++++--------
arch/arm/src/stm32h5/Kconfig | 24 ++++++++++++++++++++++
arch/arm/src/stm32h5/hardware/stm32_ethernet.h | 4 ++--
arch/arm/src/stm32h5/hardware/stm32_flash.h | 3 ++-
arch/arm/src/stm32h5/hardware/stm32_pinmap.h | 3 ++-
arch/arm/src/stm32h5/hardware/stm32h56xxx_pinmap.h | 9 ++++----
arch/arm/src/stm32h5/stm32_flash.c | 2 +-
arch/arm/src/stm32h5/stm32h5xx_rcc.c | 7 +++++++
8 files changed, 51 insertions(+), 17 deletions(-)
diff --git a/arch/arm/src/common/stm32/Kconfig.uart b/arch/arm/src/common/stm32/Kconfig.uart
index 679b076ec2b..4398afedebf 100644
--- a/arch/arm/src/common/stm32/Kconfig.uart
+++ b/arch/arm/src/common/stm32/Kconfig.uart
@@ -13,7 +13,7 @@ config STM32_USART1_HAVE_RXDMA
default y if STM32_STM32F779AX && (STM32_DMA2)
default y if STM32_STM32G0 && (STM32_DMA2)
default y if STM32_STM32G4XXX && (STM32_DMA1 || STM32_DMA2)
- default y if STM32_STM32H56XXX && (STM32_DMA1 || STM32_DMA2)
+ default y if (STM32_STM32H56XXX || STM32_STM32H57XXX) && (STM32_DMA1 || STM32_DMA2)
default y if ARCH_CHIP_STM32H755XI && (STM32_DMA1 || STM32_DMA2)
default y if STM32_STM32L0 && (STM32_DMA2)
default y if STM32_STM32L15XX && (STM32_DMA1)
@@ -48,7 +48,7 @@ config STM32_USART2_HAVE_RXDMA
default y if STM32_STM32F779AX && (STM32_DMA1)
default y if STM32_STM32G0 && (STM32_DMA1)
default y if STM32_STM32G4XXX && (STM32_DMA1)
- default y if STM32_STM32H56XXX && (STM32_DMA1 || STM32_DMA2)
+ default y if (STM32_STM32H56XXX || STM32_STM32H57XXX) && (STM32_DMA1 || STM32_DMA2)
default y if ARCH_CHIP_STM32H755XI && (STM32_DMA1 || STM32_DMA2)
default y if STM32_STM32L0 && (STM32_DMA1)
default y if STM32_STM32L15XX && (STM32_DMA1)
@@ -82,7 +82,7 @@ config STM32_USART3_HAVE_RXDMA
default y if STM32_STM32F779AX && (STM32_DMA1)
default y if STM32_STM32G0 && (STM32_DMA1)
default y if STM32_STM32G4XXX && (STM32_DMA1)
- default y if STM32_STM32H56XXX && (STM32_DMA1 || STM32_DMA2)
+ default y if (STM32_STM32H56XXX || STM32_STM32H57XXX) && (STM32_DMA1 || STM32_DMA2)
default y if ARCH_CHIP_STM32H755XI && (STM32_DMA1 || STM32_DMA2)
default y if STM32_STM32L0 && (STM32_DMA1)
default y if STM32_STM32L15XX && (STM32_DMA1)
@@ -116,7 +116,7 @@ config STM32_UART4_HAVE_RXDMA
default y if STM32_STM32F779AX && (STM32_DMA1)
default y if STM32_STM32G0 && (STM32_DMA1)
default y if STM32_STM32G4XXX && (STM32_DMA1)
- default y if STM32_STM32H56XXX && (STM32_DMA1 || STM32_DMA2)
+ default y if (STM32_STM32H56XXX || STM32_STM32H57XXX) && (STM32_DMA1 || STM32_DMA2)
default y if ARCH_CHIP_STM32H755XI && (STM32_DMA1 || STM32_DMA2)
default y if STM32_STM32L0 && (STM32_DMA1)
default y if STM32_STM32L15XX && (STM32_DMA1)
@@ -150,7 +150,7 @@ config STM32_UART5_HAVE_RXDMA
default y if STM32_STM32F779AX && (STM32_DMA1)
default y if STM32_STM32G0 && (STM32_DMA1)
default y if STM32_STM32G4XXX && (STM32_DMA1)
- default y if STM32_STM32H56XXX && (STM32_DMA1 || STM32_DMA2)
+ default y if (STM32_STM32H56XXX || STM32_STM32H57XXX) && (STM32_DMA1 || STM32_DMA2)
default y if ARCH_CHIP_STM32H755XI && (STM32_DMA1 || STM32_DMA2)
default y if STM32_STM32L0 && (STM32_DMA1)
default y if STM32_STM32L15XX && (STM32_DMA1)
@@ -181,7 +181,7 @@ config STM32_USART6_HAVE_RXDMA
default y if STM32_STM32F4XXX && (STM32_DMA2)
default y if STM32_STM32F779AX && (STM32_DMA2)
default y if STM32_STM32G0 && (STM32_DMA2)
- default y if STM32_STM32H56XXX && (STM32_DMA1 || STM32_DMA2)
+ default y if (STM32_STM32H56XXX || STM32_STM32H57XXX) && (STM32_DMA1 || STM32_DMA2)
default y if ARCH_CHIP_STM32H755XI && (STM32_DMA1 || STM32_DMA2)
default y if STM32_STM32L0 && (STM32_DMA2)
@@ -202,7 +202,7 @@ config STM32_UART7_HAVE_RXDMA
default y if STM32_STM32F0 && (STM32_DMA1)
default y if STM32_STM32F779AX && (STM32_DMA1)
default y if STM32_STM32G0 && (STM32_DMA1)
- default y if STM32_STM32H56XXX && (STM32_DMA1 || STM32_DMA2)
+ default y if (STM32_STM32H56XXX || STM32_STM32H57XXX) && (STM32_DMA1 || STM32_DMA2)
default y if ARCH_CHIP_STM32H755XI && (STM32_DMA1 || STM32_DMA2)
default y if STM32_STM32L0 && (STM32_DMA1)
@@ -221,7 +221,7 @@ config STM32_UART8_HAVE_RXDMA
default y if STM32_STM32F0 && (STM32_DMA1)
default y if STM32_STM32F779AX && (STM32_DMA1)
default y if STM32_STM32G0 && (STM32_DMA1)
- default y if STM32_STM32H56XXX && (STM32_DMA1 || STM32_DMA2)
+ default y if (STM32_STM32H56XXX || STM32_STM32H57XXX) && (STM32_DMA1 || STM32_DMA2)
default y if ARCH_CHIP_STM32H755XI && (STM32_DMA1 || STM32_DMA2)
default y if STM32_STM32L0 && (STM32_DMA1)
diff --git a/arch/arm/src/stm32h5/Kconfig b/arch/arm/src/stm32h5/Kconfig
index ec3780c926f..b0e730ab570 100644
--- a/arch/arm/src/stm32h5/Kconfig
+++ b/arch/arm/src/stm32h5/Kconfig
@@ -70,6 +70,16 @@ config ARCH_CHIP_STM32H563ZI
---help---
STM32 H5 Cortex M33, 2 Mb FLASH, 640 Kb SRAM
+config ARCH_CHIP_STM32H573II
+ bool "STM32H573II"
+ select ARCH_CORTEXM33
+ select STM32_STM32H5XXXX
+ select STM32_STM32H57XXX
+ select STM32_FLASH_CONFIG_I
+ select STM32H5_IO_CONFIG_I
+ ---help---
+ STM32 H5 Cortex M33, 2 Mb FLASH, 640 Kb SRAM
+
endchoice # STM32 H5 Chip Selection
# Chip families:
@@ -128,6 +138,15 @@ config STM32_STM32H53XXX
config STM32_STM32H56XXX
bool
default n
+
+config STM32_STM32H57XXX
+ bool
+ default n
+ select STM32_HAVE_ETHERNET
+
+config STM32_H56_H57_PERIPHERALS
+ bool
+ default y if STM32_STM32H56XXX || STM32_STM32H57XXX
select STM32_HAVE_I2C3
select STM32_HAVE_QSPI1
select STM32_HAVE_CORDIC
@@ -199,6 +218,11 @@ config STM32H5_IO_CONFIG_R
bool
default n
+config STM32H5_IO_CONFIG_I
+ # Package designator I
+ bool
+ default n
+
config STM32H5_IO_CONFIG_J
# Package designator J
bool
diff --git a/arch/arm/src/stm32h5/hardware/stm32_ethernet.h b/arch/arm/src/stm32h5/hardware/stm32_ethernet.h
index b328ec952ce..08620371b48 100644
--- a/arch/arm/src/stm32h5/hardware/stm32_ethernet.h
+++ b/arch/arm/src/stm32h5/hardware/stm32_ethernet.h
@@ -33,7 +33,7 @@
/* Ethernet support only on STM32H563/573 chips. */
-#if defined(CONFIG_STM32_STM32H56XXX)
+#if defined(CONFIG_STM32_STM32H56XXX) || defined(CONFIG_STM32_STM32H57XXX)
/****************************************************************************
* Pre-processor Definitions
@@ -681,5 +681,5 @@ struct eth_desc_s
****************************************************************************/
#endif /* __ASSEMBLY__ */
-#endif /* CONFIG_STM32_STM32H56XXX */
+#endif /* CONFIG_STM32_STM32H56XXX || CONFIG_STM32_STM32H57XXX */
#endif /* __ARCH_ARM_SRC_STM32H5_HARDWARE_STM32_ETHERNET_H */
\ No newline at end of file
diff --git a/arch/arm/src/stm32h5/hardware/stm32_flash.h b/arch/arm/src/stm32h5/hardware/stm32_flash.h
index ff91e8f84c7..25b551eb5e0 100644
--- a/arch/arm/src/stm32h5/hardware/stm32_flash.h
+++ b/arch/arm/src/stm32h5/hardware/stm32_flash.h
@@ -31,7 +31,8 @@
#include "chip.h"
#if defined(CONFIG_STM32_STM32H50XXX) || \
- defined(CONFIG_STM32_STM32H53XXX) || defined(CONFIG_STM32_STM32H56XXX)
+ defined(CONFIG_STM32_STM32H53XXX) || \
+ defined(CONFIG_STM32_STM32H56XXX) || defined(CONFIG_STM32_STM32H57XXX)
# include "hardware/stm32h5xxx_flash.h"
#else
# error "Unsupported STM32 H5 flash"
diff --git a/arch/arm/src/stm32h5/hardware/stm32_pinmap.h b/arch/arm/src/stm32h5/hardware/stm32_pinmap.h
index 085b0a63982..e78d755b122 100644
--- a/arch/arm/src/stm32h5/hardware/stm32_pinmap.h
+++ b/arch/arm/src/stm32h5/hardware/stm32_pinmap.h
@@ -32,7 +32,8 @@
#if defined(CONFIG_STM32_STM32H50XXX)
# include "hardware/stm32h50xxx_pinmap.h"
-#elif defined(CONFIG_STM32_STM32H53XXX) || defined(CONFIG_STM32_STM32H56XXX)
+#elif defined(CONFIG_STM32_STM32H53XXX) || \
+ defined(CONFIG_STM32_STM32H56XXX) || defined(CONFIG_STM32_STM32H57XXX)
# include "hardware/stm32h56xxx_pinmap.h"
#else
# error "Unsupported STM32 H5 pin map"
diff --git a/arch/arm/src/stm32h5/hardware/stm32h56xxx_pinmap.h b/arch/arm/src/stm32h5/hardware/stm32h56xxx_pinmap.h
index 8a1d487674a..55d6d9ead54 100644
--- a/arch/arm/src/stm32h5/hardware/stm32h56xxx_pinmap.h
+++ b/arch/arm/src/stm32h5/hardware/stm32h56xxx_pinmap.h
@@ -31,13 +31,14 @@
#if defined(CONFIG_STM32_STM32H53XXX) || \
defined(CONFIG_STM32_STM32H563XX) || \
- defined(CONFIG_STM32_STM32H562XX)
+ defined(CONFIG_STM32_STM32H562XX) || \
+ defined(CONFIG_STM32_STM32H57XXX)
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
-/* Alternate Pin Functions. All members of the STM32H562xx and STM32H563xx
- * families share the same pin multiplexing (although they may differ in the
+/* Alternate Pin Functions. STM32H562xx, STM32H563xx and STM32H573xx
+ * devices share the same pin multiplexing (although they may differ in the
* pins physically available). See DS14258, Table 15 "Alternate Function AF0
* to AF7" and Table 16 "Alternate Function AF8 to AF15".
*
@@ -796,5 +797,5 @@
#define GPIO_ADC2_INN18_0 (GPIO_ANALOG | GPIO_PORTA | GPIO_PIN5)
#define GPIO_ADC2_INP19_0 (GPIO_ANALOG | GPIO_PORTA | GPIO_PIN5)
-#endif /* CONFIG_STM32_STM32H563XX*/
+#endif /* STM32H53xxx, STM32H562xx, STM32H563xx or STM32H57xxx */
#endif /* __ARCH_ARM_SRC_STM32H5_HARDWARE_STM32H56XXX_PINMAP_H */
diff --git a/arch/arm/src/stm32h5/stm32_flash.c b/arch/arm/src/stm32h5/stm32_flash.c
index feac762f165..9589d433ecd 100644
--- a/arch/arm/src/stm32h5/stm32_flash.c
+++ b/arch/arm/src/stm32h5/stm32_flash.c
@@ -26,7 +26,7 @@
#include <nuttx/config.h>
-#if defined(CONFIG_STM32_STM32H563XX)
+#if defined(CONFIG_STM32_STM32H563XX) || defined(CONFIG_STM32_STM32H57XXX)
# include "stm32h563xx_flash.c"
#else
# error "Unsupported STM32 H5 chip"
diff --git a/arch/arm/src/stm32h5/stm32h5xx_rcc.c b/arch/arm/src/stm32h5/stm32h5xx_rcc.c
index b73b90aa9ce..8252df5cc77 100644
--- a/arch/arm/src/stm32h5/stm32h5xx_rcc.c
+++ b/arch/arm/src/stm32h5/stm32h5xx_rcc.c
@@ -1030,6 +1030,13 @@ void stm32_stdclockconfig(void)
/* Enable External High-Speed Clock (HSE) */
regval = getreg32(STM32_RCC_CR);
+ regval &= ~(RCC_CR_HSEBYP | RCC_CR_HSEEXT);
+#ifdef STM32_HSEBYP_ENABLE
+ regval |= RCC_CR_HSEBYP; /* External oscillator */
+# ifdef STM32_HSEEXT_ENABLE
+ regval |= RCC_CR_HSEEXT; /* Digital bypass input */
+# endif
+#endif
regval |= RCC_CR_HSEON; /* Enable HSE */
putreg32(regval, STM32_RCC_CR);