diff --git a/cmake/boards_db.cmake b/cmake/boards_db.cmake
index af691d12f5..e09e54a069 100644
--- a/cmake/boards_db.cmake
+++ b/cmake/boards_db.cmake
@@ -102957,13 +102957,13 @@ set(NUCLEO_L496ZG-P_VARIANT_PATH "${CMAKE_CURRENT_LIST_DIR}/../variants/STM32L4x
set(NUCLEO_L496ZG-P_MAXSIZE 1048576)
set(NUCLEO_L496ZG-P_MAXDATASIZE 327680)
set(NUCLEO_L496ZG-P_MCU cortex-m4)
-set(NUCLEO_L496ZG-P_FPCONF "fpv4-sp-d16-")
+set(NUCLEO_L496ZG-P_FPCONF "fpv4-sp-d16-hard")
add_library(NUCLEO_L496ZG-P INTERFACE)
target_compile_options(NUCLEO_L496ZG-P INTERFACE
"SHELL:-DSTM32L496xx "
"SHELL:"
"SHELL:"
- "SHELL:-mfpu=fpv4-sp-d16 "
+ "SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard"
-mcpu=${NUCLEO_L496ZG-P_MCU}
)
target_compile_definitions(NUCLEO_L496ZG-P INTERFACE
@@ -102987,7 +102987,7 @@ target_link_options(NUCLEO_L496ZG-P INTERFACE
"LINKER:--defsym=LD_FLASH_OFFSET=0x0"
"LINKER:--defsym=LD_MAX_SIZE=1048576"
"LINKER:--defsym=LD_MAX_DATA_SIZE=327680"
- "SHELL:-mfpu=fpv4-sp-d16 "
+ "SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard"
-mcpu=${NUCLEO_L496ZG-P_MCU}
)
diff --git a/cores/arduino/stm32/stm32_def_build.h b/cores/arduino/stm32/stm32_def_build.h
index 12d45ea5b4..5ac348f9dd 100644
--- a/cores/arduino/stm32/stm32_def_build.h
+++ b/cores/arduino/stm32/stm32_def_build.h
@@ -222,6 +222,10 @@
#define CMSIS_STARTUP_FILE "startup_stm32gbk1cb.s"
#elif defined(STM32H503xx)
#define CMSIS_STARTUP_FILE "startup_stm32h503xx.s"
+ #elif defined(STM32H523xx)
+ #define CMSIS_STARTUP_FILE "startup_stm32h523xx.s"
+ #elif defined(STM32H533xx)
+ #define CMSIS_STARTUP_FILE "startup_stm32h533xx.s"
#elif defined(STM32H562xx)
#define CMSIS_STARTUP_FILE "startup_stm32h562xx.s"
#elif defined(STM32H563xx)
diff --git a/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h523xx.h b/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h523xx.h
new file mode 100644
index 0000000000..039a4293e8
--- /dev/null
+++ b/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h523xx.h
@@ -0,0 +1,660 @@
+/**
+ ******************************************************************************
+ * @file partition_stm32h523xx.h
+ * @author MCD Application Team
+ * @brief CMSIS STM32H523xx Device Header File for Initial Setup for Secure /
+ * Non-Secure Zones for ARMCM33 based on CMSIS CORE partition_ARMCM33.h
+ * Template.
+ *
+ * This file contains:
+ * - Initialize Security Attribution Unit (SAU) CTRL register
+ * - Setup behavior of Sleep and Exception Handling
+ * - Setup behavior of Floating Point Unit
+ * - Setup Interrupt Target
+ *
+ ******************************************************************************
+ * Copyright (c) 2009-2019 Arm Limited. All rights reserved.
+ * Copyright (c) 2023 STMicroelectronics. All rights reserved.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************
+ */
+
+#ifndef PARTITION_STM32H523XX_H
+#define PARTITION_STM32H523XX_H
+
+/*
+//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
+*/
+
+/*
+// Initialize Security Attribution Unit (SAU) CTRL register
+*/
+#define SAU_INIT_CTRL 1
+
+/*
+// Enable SAU
+// Value for SAU->CTRL register bit ENABLE
+*/
+#define SAU_INIT_CTRL_ENABLE 0
+
+/*
+// When SAU is disabled
+// <0=> All Memory is Secure
+// <1=> All Memory is Non-Secure
+// Value for SAU->CTRL register bit ALLNS
+// When all Memory is Non-Secure (ALLNS is 1), IDAU can override memory map configuration.
+*/
+#define SAU_INIT_CTRL_ALLNS 1
+
+/*
+//
+*/
+
+/*
+// Initialize Security Attribution Unit (SAU) Address Regions
+// SAU configuration specifies regions to be one of:
+// - Secure and Non-Secure Callable
+// - Non-Secure
+// Note: All memory regions not configured by SAU are Secure
+*/
+#define SAU_REGIONS_MAX 8 /* Max. number of SAU regions */
+
+/*
+// Initialize SAU Region 0
+// Setup SAU Region 0 memory attributes
+*/
+#define SAU_INIT_REGION0 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START0 0x0C03E000 /* start address of SAU region 0 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END0 0x0C03FFFF /* end address of SAU region 0 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC0 1
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 1
+// Setup SAU Region 1 memory attributes
+*/
+#define SAU_INIT_REGION1 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START1 0x08040000 /* start address of SAU region 1 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END1 0x0807FFFF /* end address of SAU region 1 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC1 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 2
+// Setup SAU Region 2 memory attributes
+*/
+#define SAU_INIT_REGION2 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START2 0x20034000 /* start address of SAU region 2 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END2 0x20043FFF /* end address of SAU region 2 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC2 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 3
+// Setup SAU Region 3 memory attributes
+*/
+#define SAU_INIT_REGION3 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START3 0x40000000 /* start address of SAU region 3 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END3 0x4FFFFFFF /* end address of SAU region 3 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC3 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 4
+// Setup SAU Region 4 memory attributes
+*/
+#define SAU_INIT_REGION4 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START4 0x60000000 /* start address of SAU region 4 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END4 0x9FFFFFFF /* end address of SAU region 4 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC4 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 5
+// Setup SAU Region 5 memory attributes
+*/
+#define SAU_INIT_REGION5 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START5 0x0BF90000 /* start address of SAU region 5 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END5 0x0BFA8FFF /* end address of SAU region 5 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC5 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 6
+// Setup SAU Region 6 memory attributes
+*/
+#define SAU_INIT_REGION6 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START6 0x00000000 /* start address of SAU region 6 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END6 0x00000000 /* end address of SAU region 6 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC6 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 7
+// Setup SAU Region 7 memory attributes
+*/
+#define SAU_INIT_REGION7 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START7 0x00000000 /* start address of SAU region 7 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END7 0x00000000 /* end address of SAU region 7 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC7 0
+/*
+//
+*/
+
+/*
+//
+*/
+
+/*
+// Setup behaviour of Sleep and Exception Handling
+*/
+#define SCB_CSR_AIRCR_INIT 0
+
+/*
+// Deep Sleep can be enabled by
+// <0=>Secure and Non-Secure state
+// <1=>Secure state only
+// Value for SCB->CSR register bit DEEPSLEEPS
+*/
+#define SCB_CSR_DEEPSLEEPS_VAL 0
+
+/*
+// System reset request accessible from
+// <0=> Secure and Non-Secure state
+// <1=> Secure state only
+// Value for SCB->AIRCR register bit SYSRESETREQS
+*/
+#define SCB_AIRCR_SYSRESETREQS_VAL 0
+
+/*
+// Priority of Non-Secure exceptions is
+// <0=> Not altered
+// <1=> Lowered to 0x04-0x07
+// Value for SCB->AIRCR register bit PRIS
+*/
+#define SCB_AIRCR_PRIS_VAL 0
+
+/*
+// BusFault, HardFault, and NMI target
+// <0=> Secure state
+// <1=> Non-Secure state
+// Value for SCB->AIRCR register bit BFHFNMINS
+*/
+#define SCB_AIRCR_BFHFNMINS_VAL 0
+
+/*
+//
+*/
+
+/*
+// Setup behaviour of Floating Point Unit
+*/
+#define TZ_FPU_NS_USAGE 1
+
+/*
+// Floating Point Unit usage
+// <0=> Secure state only
+// <3=> Secure and Non-Secure state
+// Value for SCB->NSACR register bits CP10, CP11
+*/
+#define SCB_NSACR_CP10_11_VAL 3
+
+/*
+// Treat floating-point registers as Secure
+// <0=> Disabled
+// <1=> Enabled
+// Value for FPU->FPCCR register bit TS
+*/
+#define FPU_FPCCR_TS_VAL 0
+
+/*
+// Clear on return (CLRONRET) accessibility
+// <0=> Secure and Non-Secure state
+// <1=> Secure state only
+// Value for FPU->FPCCR register bit CLRONRETS
+*/
+#define FPU_FPCCR_CLRONRETS_VAL 0
+
+/*
+// Clear floating-point caller saved registers on exception return
+// <0=> Disabled
+// <1=> Enabled
+// Value for FPU->FPCCR register bit CLRONRET
+*/
+#define FPU_FPCCR_CLRONRET_VAL 1
+
+/*
+//
+*/
+
+/*
+// Setup Interrupt Target
+*/
+
+/*
+// Initialize ITNS 0 (Interrupts 0..31)
+*/
+#define NVIC_INIT_ITNS0 1
+
+/*
+// Interrupts 0..31
+// WWDG_IRQn <0=> Secure state <1=> Non-Secure state
+// PVD_AVD_IRQn <0=> Secure state <1=> Non-Secure state
+// RTC_IRQn <0=> Secure state <1=> Non-Secure state
+// RTC_S_IRQn <0=> Secure state <1=> Non-Secure state
+// TAMP_IRQn <0=> Secure state <1=> Non-Secure state
+// RAMCFG_IRQn <0=> Secure state <1=> Non-Secure state
+// FLASH_IRQn <0=> Secure state <1=> Non-Secure state
+// FLASH_S_IRQn <0=> Secure state <1=> Non-Secure state
+// GTZC_IRQn <0=> Secure state <1=> Non-Secure state
+// RCC_IRQn <0=> Secure state <1=> Non-Secure state
+// RCC_S_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI0_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI1_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI2_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI3_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI4_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI5_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI6_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI7_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI8_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI9_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI10_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI11_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI12_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI13_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI14_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI15_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel0_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel1_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel2_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel3_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel4_IRQn <0=> Secure state <1=> Non-Secure state
+*/
+#define NVIC_INIT_ITNS0_VAL 0x00000000
+
+/*
+//
+*/
+
+/*
+// Initialize ITNS 1 (Interrupts 32..63)
+*/
+#define NVIC_INIT_ITNS1 1
+
+/*
+// Interrupts 32..63
+// GPDMA1_Channel5_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel6_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel7_IRQn <0=> Secure state <1=> Non-Secure state
+// IWDG_IRQn <0=> Secure state <1=> Non-Secure state
+// ADC1_IRQn <0=> Secure state <1=> Non-Secure state
+// DAC1_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN1_IT0_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN1_IT1_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_BRK_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_UP_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_CC_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM2_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM3_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM4_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM5_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM6_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM7_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C1_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C1_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C2_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C2_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI1_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI2_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI3_IRQn <0=> Secure state <1=> Non-Secure state
+// USART1_IRQn <0=> Secure state <1=> Non-Secure state
+// USART2_IRQn <0=> Secure state <1=> Non-Secure state
+// USART3_IRQn <0=> Secure state <1=> Non-Secure state
+// UART4_IRQn <0=> Secure state <1=> Non-Secure state
+// UART5_IRQn <0=> Secure state <1=> Non-Secure state
+// LPUART1_IRQn <0=> Secure state <1=> Non-Secure state
+*/
+#define NVIC_INIT_ITNS1_VAL 0x00000000
+
+/*
+//
+*/
+
+/*
+// Initialize ITNS 2 (Interrupts 64..95)
+*/
+#define NVIC_INIT_ITNS2 1
+
+/*
+// Interrupts 64..95
+// LPTIM1_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_BRK_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_UP_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_CC_IRQn <0=> Secure state <1=> Non-Secure state
+// ADC2_IRQn <0=> Secure state <1=> Non-Secure state
+// LPTIM2_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM15_IRQn <0=> Secure state <1=> Non-Secure state
+// USB_DRD_FS_IRQn <0=> Secure state <1=> Non-Secure state
+// CRS_IRQn <0=> Secure state <1=> Non-Secure state
+// UCPD1_IRQn <0=> Secure state <1=> Non-Secure state
+// FMC_IRQn <0=> Secure state <1=> Non-Secure state
+// OCTOSPI1_IRQn <0=> Secure state <1=> Non-Secure state
+// SDMMC1_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C3_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C3_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI4_IRQn <0=> Secure state <1=> Non-Secure state
+// USART6_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel0_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel1_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel2_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel3_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel4_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel5_IRQn <0=> Secure state <1=> Non-Secure state
+*/
+#define NVIC_INIT_ITNS2_VAL 0x00000000
+
+/*
+//
+*/
+
+/*
+// Initialize ITNS 3 (Interrupts 96..127)
+*/
+#define NVIC_INIT_ITNS3 1
+
+/*
+// Interrupts 96..127
+// GPDMA2_Channel6_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel7_IRQn <0=> Secure state <1=> Non-Secure state
+// FPU_IRQn <0=> Secure state <1=> Non-Secure state
+// ICACHE_IRQn <0=> Secure state <1=> Non-Secure state
+// DCACHE_IRQn <0=> Secure state <1=> Non-Secure state
+// DCMI_PSSI_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN2_IT0_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN2_IT1_IRQn <0=> Secure state <1=> Non-Secure state
+// DTS_IRQn <0=> Secure state <1=> Non-Secure state
+// RNG_IRQn <0=> Secure state <1=> Non-Secure state
+// HASH_IRQn <0=> Secure state <1=> Non-Secure state
+// CEC_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM12_IRQn <0=> Secure state <1=> Non-Secure state
+// I3C1_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I3C1_ER_IRQn <0=> Secure state <1=> Non-Secure state
+*/
+#define NVIC_INIT_ITNS3_VAL 0x00000000
+
+/*
+//
+*/
+
+/*
+// Initialize ITNS 4 (Interrupts 131..132)
+*/
+#define NVIC_INIT_ITNS4 1
+
+/*
+// Interrupts 131..132
+// I3C2_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I3C2_ER_IRQn <0=> Secure state <1=> Non-Secure state
+*/
+#define NVIC_INIT_ITNS4_VAL 0x00000000
+
+/*
+//
+*/
+
+/*
+//
+*/
+
+/*
+ max 8 SAU regions.
+ SAU regions are defined in partition.h
+ */
+
+#define SAU_INIT_REGION(n) \
+ SAU->RNR = (n & SAU_RNR_REGION_Msk); \
+ SAU->RBAR = (SAU_INIT_START##n & SAU_RBAR_BADDR_Msk); \
+ SAU->RLAR = (SAU_INIT_END##n & SAU_RLAR_LADDR_Msk) | \
+ ((SAU_INIT_NSC##n << SAU_RLAR_NSC_Pos) & SAU_RLAR_NSC_Msk) | 1U
+
+/**
+ \brief Setup a SAU Region
+ \details Writes the region information contained in SAU_Region to the
+ registers SAU_RNR, SAU_RBAR, and SAU_RLAR
+ */
+__STATIC_INLINE void TZ_SAU_Setup (void)
+{
+
+#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U)
+
+ #if defined (SAU_INIT_REGION0) && (SAU_INIT_REGION0 == 1U)
+ SAU_INIT_REGION(0);
+ #endif
+
+ #if defined (SAU_INIT_REGION1) && (SAU_INIT_REGION1 == 1U)
+ SAU_INIT_REGION(1);
+ #endif
+
+ #if defined (SAU_INIT_REGION2) && (SAU_INIT_REGION2 == 1U)
+ SAU_INIT_REGION(2);
+ #endif
+
+ #if defined (SAU_INIT_REGION3) && (SAU_INIT_REGION3 == 1U)
+ SAU_INIT_REGION(3);
+ #endif
+
+ #if defined (SAU_INIT_REGION4) && (SAU_INIT_REGION4 == 1U)
+ SAU_INIT_REGION(4);
+ #endif
+
+ #if defined (SAU_INIT_REGION5) && (SAU_INIT_REGION5 == 1U)
+ SAU_INIT_REGION(5);
+ #endif
+
+ #if defined (SAU_INIT_REGION6) && (SAU_INIT_REGION6 == 1U)
+ SAU_INIT_REGION(6);
+ #endif
+
+ #if defined (SAU_INIT_REGION7) && (SAU_INIT_REGION7 == 1U)
+ SAU_INIT_REGION(7);
+ #endif
+
+ /* repeat this for all possible SAU regions */
+
+#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */
+
+
+ #if defined (SAU_INIT_CTRL) && (SAU_INIT_CTRL == 1U)
+ SAU->CTRL = ((SAU_INIT_CTRL_ENABLE << SAU_CTRL_ENABLE_Pos) & SAU_CTRL_ENABLE_Msk) |
+ ((SAU_INIT_CTRL_ALLNS << SAU_CTRL_ALLNS_Pos) & SAU_CTRL_ALLNS_Msk) ;
+ #endif
+
+ #if defined (SCB_CSR_AIRCR_INIT) && (SCB_CSR_AIRCR_INIT == 1U)
+ SCB->SCR = (SCB->SCR & ~(SCB_SCR_SLEEPDEEPS_Msk )) |
+ ((SCB_CSR_DEEPSLEEPS_VAL << SCB_SCR_SLEEPDEEPS_Pos) & SCB_SCR_SLEEPDEEPS_Msk);
+
+ SCB->AIRCR = (SCB->AIRCR & ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_SYSRESETREQS_Msk |
+ SCB_AIRCR_BFHFNMINS_Msk | SCB_AIRCR_PRIS_Msk) ) |
+ ((0x05FAU << SCB_AIRCR_VECTKEY_Pos) & SCB_AIRCR_VECTKEY_Msk) |
+ ((SCB_AIRCR_SYSRESETREQS_VAL << SCB_AIRCR_SYSRESETREQS_Pos) & SCB_AIRCR_SYSRESETREQS_Msk) |
+ ((SCB_AIRCR_PRIS_VAL << SCB_AIRCR_PRIS_Pos) & SCB_AIRCR_PRIS_Msk) |
+ ((SCB_AIRCR_BFHFNMINS_VAL << SCB_AIRCR_BFHFNMINS_Pos) & SCB_AIRCR_BFHFNMINS_Msk);
+ #endif /* defined (SCB_CSR_AIRCR_INIT) && (SCB_CSR_AIRCR_INIT == 1U) */
+
+ #if defined (__FPU_USED) && (__FPU_USED == 1U) && \
+ defined (TZ_FPU_NS_USAGE) && (TZ_FPU_NS_USAGE == 1U)
+
+ SCB->NSACR = (SCB->NSACR & ~(SCB_NSACR_CP10_Msk | SCB_NSACR_CP11_Msk)) |
+ ((SCB_NSACR_CP10_11_VAL << SCB_NSACR_CP10_Pos) & (SCB_NSACR_CP10_Msk | SCB_NSACR_CP11_Msk));
+
+ FPU->FPCCR = (FPU->FPCCR & ~(FPU_FPCCR_TS_Msk | FPU_FPCCR_CLRONRETS_Msk | FPU_FPCCR_CLRONRET_Msk)) |
+ ((FPU_FPCCR_TS_VAL << FPU_FPCCR_TS_Pos ) & FPU_FPCCR_TS_Msk ) |
+ ((FPU_FPCCR_CLRONRETS_VAL << FPU_FPCCR_CLRONRETS_Pos) & FPU_FPCCR_CLRONRETS_Msk) |
+ ((FPU_FPCCR_CLRONRET_VAL << FPU_FPCCR_CLRONRET_Pos ) & FPU_FPCCR_CLRONRET_Msk );
+ #endif
+
+ #if defined (NVIC_INIT_ITNS0) && (NVIC_INIT_ITNS0 == 1U)
+ NVIC->ITNS[0] = NVIC_INIT_ITNS0_VAL;
+ #endif
+
+ #if defined (NVIC_INIT_ITNS1) && (NVIC_INIT_ITNS1 == 1U)
+ NVIC->ITNS[1] = NVIC_INIT_ITNS1_VAL;
+ #endif
+
+ #if defined (NVIC_INIT_ITNS2) && (NVIC_INIT_ITNS2 == 1U)
+ NVIC->ITNS[2] = NVIC_INIT_ITNS2_VAL;
+ #endif
+
+ #if defined (NVIC_INIT_ITNS3) && (NVIC_INIT_ITNS3 == 1U)
+ NVIC->ITNS[3] = NVIC_INIT_ITNS3_VAL;
+ #endif
+
+ #if defined (NVIC_INIT_ITNS4) && (NVIC_INIT_ITNS4 == 1U)
+ NVIC->ITNS[4] = NVIC_INIT_ITNS4_VAL;
+ #endif
+
+}
+
+#endif /* PARTITION_STM32H523XX_H */
diff --git a/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h533xx.h b/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h533xx.h
new file mode 100644
index 0000000000..aa4972cc3a
--- /dev/null
+++ b/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h533xx.h
@@ -0,0 +1,664 @@
+/**
+ ******************************************************************************
+ * @file partition_stm32h533xx.h
+ * @author MCD Application Team
+ * @brief CMSIS STM32H533xx Device Header File for Initial Setup for Secure /
+ * Non-Secure Zones for ARMCM33 based on CMSIS CORE partition_ARMCM33.h
+ * Template.
+ *
+ * This file contains:
+ * - Initialize Security Attribution Unit (SAU) CTRL register
+ * - Setup behavior of Sleep and Exception Handling
+ * - Setup behavior of Floating Point Unit
+ * - Setup Interrupt Target
+ *
+ ******************************************************************************
+ * Copyright (c) 2009-2019 Arm Limited. All rights reserved.
+ * Copyright (c) 2023 STMicroelectronics. All rights reserved.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************
+ */
+
+#ifndef PARTITION_STM32H533XX_H
+#define PARTITION_STM32H533XX_H
+
+/*
+//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
+*/
+
+/*
+// Initialize Security Attribution Unit (SAU) CTRL register
+*/
+#define SAU_INIT_CTRL 1
+
+/*
+// Enable SAU
+// Value for SAU->CTRL register bit ENABLE
+*/
+#define SAU_INIT_CTRL_ENABLE 0
+
+/*
+// When SAU is disabled
+// <0=> All Memory is Secure
+// <1=> All Memory is Non-Secure
+// Value for SAU->CTRL register bit ALLNS
+// When all Memory is Non-Secure (ALLNS is 1), IDAU can override memory map configuration.
+*/
+#define SAU_INIT_CTRL_ALLNS 1
+
+/*
+//
+*/
+
+/*
+// Initialize Security Attribution Unit (SAU) Address Regions
+// SAU configuration specifies regions to be one of:
+// - Secure and Non-Secure Callable
+// - Non-Secure
+// Note: All memory regions not configured by SAU are Secure
+*/
+#define SAU_REGIONS_MAX 8 /* Max. number of SAU regions */
+
+/*
+// Initialize SAU Region 0
+// Setup SAU Region 0 memory attributes
+*/
+#define SAU_INIT_REGION0 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START0 0x0C03E000 /* start address of SAU region 0 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END0 0x0C03FFFF /* end address of SAU region 0 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC0 1
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 1
+// Setup SAU Region 1 memory attributes
+*/
+#define SAU_INIT_REGION1 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START1 0x08040000 /* start address of SAU region 1 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END1 0x0807FFFF /* end address of SAU region 1 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC1 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 2
+// Setup SAU Region 2 memory attributes
+*/
+#define SAU_INIT_REGION2 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START2 0x20034000 /* start address of SAU region 2 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END2 0x20043FFF /* end address of SAU region 2 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC2 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 3
+// Setup SAU Region 3 memory attributes
+*/
+#define SAU_INIT_REGION3 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START3 0x40000000 /* start address of SAU region 3 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END3 0x4FFFFFFF /* end address of SAU region 3 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC3 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 4
+// Setup SAU Region 4 memory attributes
+*/
+#define SAU_INIT_REGION4 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START4 0x60000000 /* start address of SAU region 4 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END4 0x9FFFFFFF /* end address of SAU region 4 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC4 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 5
+// Setup SAU Region 5 memory attributes
+*/
+#define SAU_INIT_REGION5 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START5 0x0BF90000 /* start address of SAU region 5 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END5 0x0BFA8FFF /* end address of SAU region 5 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC5 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 6
+// Setup SAU Region 6 memory attributes
+*/
+#define SAU_INIT_REGION6 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START6 0x00000000 /* start address of SAU region 6 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END6 0x00000000 /* end address of SAU region 6 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC6 0
+/*
+//
+*/
+
+/*
+// Initialize SAU Region 7
+// Setup SAU Region 7 memory attributes
+*/
+#define SAU_INIT_REGION7 0
+
+/*
+// Start Address <0-0xFFFFFFE0>
+*/
+#define SAU_INIT_START7 0x00000000 /* start address of SAU region 7 */
+
+/*
+// End Address <0x1F-0xFFFFFFFF>
+*/
+#define SAU_INIT_END7 0x00000000 /* end address of SAU region 7 */
+
+/*
+// Region is
+// <0=>Non-Secure
+// <1=>Secure, Non-Secure Callable
+*/
+#define SAU_INIT_NSC7 0
+/*
+//
+*/
+
+/*
+//
+*/
+
+/*
+// Setup behaviour of Sleep and Exception Handling
+*/
+#define SCB_CSR_AIRCR_INIT 0
+
+/*
+// Deep Sleep can be enabled by
+// <0=>Secure and Non-Secure state
+// <1=>Secure state only
+// Value for SCB->CSR register bit DEEPSLEEPS
+*/
+#define SCB_CSR_DEEPSLEEPS_VAL 0
+
+/*
+// System reset request accessible from
+// <0=> Secure and Non-Secure state
+// <1=> Secure state only
+// Value for SCB->AIRCR register bit SYSRESETREQS
+*/
+#define SCB_AIRCR_SYSRESETREQS_VAL 0
+
+/*
+// Priority of Non-Secure exceptions is
+// <0=> Not altered
+// <1=> Lowered to 0x04-0x07
+// Value for SCB->AIRCR register bit PRIS
+*/
+#define SCB_AIRCR_PRIS_VAL 0
+
+/*
+// BusFault, HardFault, and NMI target
+// <0=> Secure state
+// <1=> Non-Secure state
+// Value for SCB->AIRCR register bit BFHFNMINS
+*/
+#define SCB_AIRCR_BFHFNMINS_VAL 0
+
+/*
+//
+*/
+
+/*
+// Setup behaviour of Floating Point Unit
+*/
+#define TZ_FPU_NS_USAGE 1
+
+/*
+// Floating Point Unit usage
+// <0=> Secure state only
+// <3=> Secure and Non-Secure state
+// Value for SCB->NSACR register bits CP10, CP11
+*/
+#define SCB_NSACR_CP10_11_VAL 3
+
+/*
+// Treat floating-point registers as Secure
+// <0=> Disabled
+// <1=> Enabled
+// Value for FPU->FPCCR register bit TS
+*/
+#define FPU_FPCCR_TS_VAL 0
+
+/*
+// Clear on return (CLRONRET) accessibility
+// <0=> Secure and Non-Secure state
+// <1=> Secure state only
+// Value for FPU->FPCCR register bit CLRONRETS
+*/
+#define FPU_FPCCR_CLRONRETS_VAL 0
+
+/*
+// Clear floating-point caller saved registers on exception return
+// <0=> Disabled
+// <1=> Enabled
+// Value for FPU->FPCCR register bit CLRONRET
+*/
+#define FPU_FPCCR_CLRONRET_VAL 1
+
+/*
+//
+*/
+
+/*
+// Setup Interrupt Target
+*/
+
+/*
+// Initialize ITNS 0 (Interrupts 0..31)
+*/
+#define NVIC_INIT_ITNS0 1
+
+/*
+// Interrupts 0..31
+// WWDG_IRQn <0=> Secure state <1=> Non-Secure state
+// PVD_AVD_IRQn <0=> Secure state <1=> Non-Secure state
+// RTC_IRQn <0=> Secure state <1=> Non-Secure state
+// RTC_S_IRQn <0=> Secure state <1=> Non-Secure state
+// TAMP_IRQn <0=> Secure state <1=> Non-Secure state
+// RAMCFG_IRQn <0=> Secure state <1=> Non-Secure state
+// FLASH_IRQn <0=> Secure state <1=> Non-Secure state
+// FLASH_S_IRQn <0=> Secure state <1=> Non-Secure state
+// GTZC_IRQn <0=> Secure state <1=> Non-Secure state
+// RCC_IRQn <0=> Secure state <1=> Non-Secure state
+// RCC_S_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI0_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI1_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI2_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI3_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI4_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI5_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI6_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI7_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI8_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI9_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI10_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI11_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI12_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI13_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI14_IRQn <0=> Secure state <1=> Non-Secure state
+// EXTI15_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel0_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel1_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel2_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel3_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel4_IRQn <0=> Secure state <1=> Non-Secure state
+*/
+#define NVIC_INIT_ITNS0_VAL 0x00000000
+
+/*
+//
+*/
+
+/*
+// Initialize ITNS 1 (Interrupts 32..63)
+*/
+#define NVIC_INIT_ITNS1 1
+
+/*
+// Interrupts 32..63
+// GPDMA1_Channel5_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel6_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA1_Channel7_IRQn <0=> Secure state <1=> Non-Secure state
+// IWDG_IRQn <0=> Secure state <1=> Non-Secure state
+// SAES_IRQn <0=> Secure state <1=> Non-Secure state
+// ADC1_IRQn <0=> Secure state <1=> Non-Secure state
+// DAC1_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN1_IT0_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN1_IT1_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_BRK_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_UP_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_CC_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM2_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM3_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM4_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM5_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM6_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM7_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C1_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C1_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C2_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C2_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI1_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI2_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI3_IRQn <0=> Secure state <1=> Non-Secure state
+// USART1_IRQn <0=> Secure state <1=> Non-Secure state
+// USART2_IRQn <0=> Secure state <1=> Non-Secure state
+// USART3_IRQn <0=> Secure state <1=> Non-Secure state
+// UART4_IRQn <0=> Secure state <1=> Non-Secure state
+// UART5_IRQn <0=> Secure state <1=> Non-Secure state
+// LPUART1_IRQn <0=> Secure state <1=> Non-Secure state
+*/
+#define NVIC_INIT_ITNS1_VAL 0x00000000
+
+/*
+//
+*/
+
+/*
+// Initialize ITNS 2 (Interrupts 64..95)
+*/
+#define NVIC_INIT_ITNS2 1
+
+/*
+// Interrupts 64..95
+// LPTIM1_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_BRK_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_UP_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_CC_IRQn <0=> Secure state <1=> Non-Secure state
+// ADC2_IRQn <0=> Secure state <1=> Non-Secure state
+// LPTIM2_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM15_IRQn <0=> Secure state <1=> Non-Secure state
+// USB_DRD_FS_IRQn <0=> Secure state <1=> Non-Secure state
+// CRS_IRQn <0=> Secure state <1=> Non-Secure state
+// UCPD1_IRQn <0=> Secure state <1=> Non-Secure state
+// FMC_IRQn <0=> Secure state <1=> Non-Secure state
+// OCTOSPI1_IRQn <0=> Secure state <1=> Non-Secure state
+// SDMMC1_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C3_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C3_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI4_IRQn <0=> Secure state <1=> Non-Secure state
+// USART6_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel0_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel1_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel2_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel3_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel4_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel5_IRQn <0=> Secure state <1=> Non-Secure state
+*/
+#define NVIC_INIT_ITNS2_VAL 0x00000000
+
+/*
+//
+*/
+
+/*
+// Initialize ITNS 3 (Interrupts 96..127)
+*/
+#define NVIC_INIT_ITNS3 1
+
+/*
+// Interrupts 96..127
+// GPDMA2_Channel6_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel7_IRQn <0=> Secure state <1=> Non-Secure state
+// FPU_IRQn <0=> Secure state <1=> Non-Secure state
+// ICACHE_IRQn <0=> Secure state <1=> Non-Secure state
+// DCACHE_IRQn <0=> Secure state <1=> Non-Secure state
+// DCMI_PSSI_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN2_IT0_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN2_IT1_IRQn <0=> Secure state <1=> Non-Secure state
+// DTS_IRQn <0=> Secure state <1=> Non-Secure state
+// RNG_IRQn <0=> Secure state <1=> Non-Secure state
+// OTFDEC1_IRQn <0=> Secure state <1=> Non-Secure state
+// AES_IRQn <0=> Secure state <1=> Non-Secure state
+// HASH_IRQn <0=> Secure state <1=> Non-Secure state
+// PKA_IRQn <0=> Secure state <1=> Non-Secure state
+// CEC_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM12_IRQn <0=> Secure state <1=> Non-Secure state
+// I3C1_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I3C1_ER_IRQn <0=> Secure state <1=> Non-Secure state
+*/
+#define NVIC_INIT_ITNS3_VAL 0x00000000
+
+/*
+//
+*/
+
+/*
+// Initialize ITNS 4 (Interrupts 131..132)
+*/
+#define NVIC_INIT_ITNS4 1
+
+/*
+// Interrupts 131..132
+// I3C2_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I3C2_ER_IRQn <0=> Secure state <1=> Non-Secure state
+*/
+#define NVIC_INIT_ITNS4_VAL 0x00000000
+
+/*
+//
+*/
+
+/*
+//
+*/
+
+/*
+ max 8 SAU regions.
+ SAU regions are defined in partition.h
+ */
+
+#define SAU_INIT_REGION(n) \
+ SAU->RNR = (n & SAU_RNR_REGION_Msk); \
+ SAU->RBAR = (SAU_INIT_START##n & SAU_RBAR_BADDR_Msk); \
+ SAU->RLAR = (SAU_INIT_END##n & SAU_RLAR_LADDR_Msk) | \
+ ((SAU_INIT_NSC##n << SAU_RLAR_NSC_Pos) & SAU_RLAR_NSC_Msk) | 1U
+
+/**
+ \brief Setup a SAU Region
+ \details Writes the region information contained in SAU_Region to the
+ registers SAU_RNR, SAU_RBAR, and SAU_RLAR
+ */
+__STATIC_INLINE void TZ_SAU_Setup (void)
+{
+
+#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U)
+
+ #if defined (SAU_INIT_REGION0) && (SAU_INIT_REGION0 == 1U)
+ SAU_INIT_REGION(0);
+ #endif
+
+ #if defined (SAU_INIT_REGION1) && (SAU_INIT_REGION1 == 1U)
+ SAU_INIT_REGION(1);
+ #endif
+
+ #if defined (SAU_INIT_REGION2) && (SAU_INIT_REGION2 == 1U)
+ SAU_INIT_REGION(2);
+ #endif
+
+ #if defined (SAU_INIT_REGION3) && (SAU_INIT_REGION3 == 1U)
+ SAU_INIT_REGION(3);
+ #endif
+
+ #if defined (SAU_INIT_REGION4) && (SAU_INIT_REGION4 == 1U)
+ SAU_INIT_REGION(4);
+ #endif
+
+ #if defined (SAU_INIT_REGION5) && (SAU_INIT_REGION5 == 1U)
+ SAU_INIT_REGION(5);
+ #endif
+
+ #if defined (SAU_INIT_REGION6) && (SAU_INIT_REGION6 == 1U)
+ SAU_INIT_REGION(6);
+ #endif
+
+ #if defined (SAU_INIT_REGION7) && (SAU_INIT_REGION7 == 1U)
+ SAU_INIT_REGION(7);
+ #endif
+
+ /* repeat this for all possible SAU regions */
+
+#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */
+
+
+ #if defined (SAU_INIT_CTRL) && (SAU_INIT_CTRL == 1U)
+ SAU->CTRL = ((SAU_INIT_CTRL_ENABLE << SAU_CTRL_ENABLE_Pos) & SAU_CTRL_ENABLE_Msk) |
+ ((SAU_INIT_CTRL_ALLNS << SAU_CTRL_ALLNS_Pos) & SAU_CTRL_ALLNS_Msk) ;
+ #endif
+
+ #if defined (SCB_CSR_AIRCR_INIT) && (SCB_CSR_AIRCR_INIT == 1U)
+ SCB->SCR = (SCB->SCR & ~(SCB_SCR_SLEEPDEEPS_Msk )) |
+ ((SCB_CSR_DEEPSLEEPS_VAL << SCB_SCR_SLEEPDEEPS_Pos) & SCB_SCR_SLEEPDEEPS_Msk);
+
+ SCB->AIRCR = (SCB->AIRCR & ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_SYSRESETREQS_Msk |
+ SCB_AIRCR_BFHFNMINS_Msk | SCB_AIRCR_PRIS_Msk) ) |
+ ((0x05FAU << SCB_AIRCR_VECTKEY_Pos) & SCB_AIRCR_VECTKEY_Msk) |
+ ((SCB_AIRCR_SYSRESETREQS_VAL << SCB_AIRCR_SYSRESETREQS_Pos) & SCB_AIRCR_SYSRESETREQS_Msk) |
+ ((SCB_AIRCR_PRIS_VAL << SCB_AIRCR_PRIS_Pos) & SCB_AIRCR_PRIS_Msk) |
+ ((SCB_AIRCR_BFHFNMINS_VAL << SCB_AIRCR_BFHFNMINS_Pos) & SCB_AIRCR_BFHFNMINS_Msk);
+ #endif /* defined (SCB_CSR_AIRCR_INIT) && (SCB_CSR_AIRCR_INIT == 1U) */
+
+ #if defined (__FPU_USED) && (__FPU_USED == 1U) && \
+ defined (TZ_FPU_NS_USAGE) && (TZ_FPU_NS_USAGE == 1U)
+
+ SCB->NSACR = (SCB->NSACR & ~(SCB_NSACR_CP10_Msk | SCB_NSACR_CP11_Msk)) |
+ ((SCB_NSACR_CP10_11_VAL << SCB_NSACR_CP10_Pos) & (SCB_NSACR_CP10_Msk | SCB_NSACR_CP11_Msk));
+
+ FPU->FPCCR = (FPU->FPCCR & ~(FPU_FPCCR_TS_Msk | FPU_FPCCR_CLRONRETS_Msk | FPU_FPCCR_CLRONRET_Msk)) |
+ ((FPU_FPCCR_TS_VAL << FPU_FPCCR_TS_Pos ) & FPU_FPCCR_TS_Msk ) |
+ ((FPU_FPCCR_CLRONRETS_VAL << FPU_FPCCR_CLRONRETS_Pos) & FPU_FPCCR_CLRONRETS_Msk) |
+ ((FPU_FPCCR_CLRONRET_VAL << FPU_FPCCR_CLRONRET_Pos ) & FPU_FPCCR_CLRONRET_Msk );
+ #endif
+
+ #if defined (NVIC_INIT_ITNS0) && (NVIC_INIT_ITNS0 == 1U)
+ NVIC->ITNS[0] = NVIC_INIT_ITNS0_VAL;
+ #endif
+
+ #if defined (NVIC_INIT_ITNS1) && (NVIC_INIT_ITNS1 == 1U)
+ NVIC->ITNS[1] = NVIC_INIT_ITNS1_VAL;
+ #endif
+
+ #if defined (NVIC_INIT_ITNS2) && (NVIC_INIT_ITNS2 == 1U)
+ NVIC->ITNS[2] = NVIC_INIT_ITNS2_VAL;
+ #endif
+
+ #if defined (NVIC_INIT_ITNS3) && (NVIC_INIT_ITNS3 == 1U)
+ NVIC->ITNS[3] = NVIC_INIT_ITNS3_VAL;
+ #endif
+
+ #if defined (NVIC_INIT_ITNS4) && (NVIC_INIT_ITNS4 == 1U)
+ NVIC->ITNS[4] = NVIC_INIT_ITNS4_VAL;
+ #endif
+
+}
+
+#endif /* PARTITION_STM32H533XX_H */
diff --git a/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h562xx.h b/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h562xx.h
index e71349364e..40465c2166 100644
--- a/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h562xx.h
+++ b/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h562xx.h
@@ -13,17 +13,24 @@
* - Setup Interrupt Target
*
******************************************************************************
- * @attention
+ * Copyright (c) 2009-2019 Arm Limited. All rights reserved.
+ * Copyright (c) 2023 STMicroelectronics. All rights reserved.
*
- * Copyright (c) 2023 STMicroelectronics.
- * All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0
*
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
+ * Licensed under the Apache License, Version 2.0 (the License); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
+ * www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
******************************************************************************
- */
+ */
#ifndef PARTITION_STM32H562XX_H
#define PARTITION_STM32H562XX_H
@@ -420,34 +427,33 @@
// GPDMA1_Channel6_IRQn <0=> Secure state <1=> Non-Secure state
// GPDMA1_Channel7_IRQn <0=> Secure state <1=> Non-Secure state
// IWDG_IRQn <0=> Secure state <1=> Non-Secure state
-// ADC1_IRQn <0=> Secure state <1=> Non-Secure state
-// DAC1_IRQn <0=> Secure state <1=> Non-Secure state
-// FDCAN1_IT0_IRQn <0=> Secure state <1=> Non-Secure state
-// FDCAN1_IT1_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM1_BRK_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM1_UP_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM1_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM1_CC_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM2_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM3_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM4_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM5_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM6_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM7_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C1_EV_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C1_ER_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C2_EV_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C2_ER_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI1_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI2_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI3_IRQn <0=> Secure state <1=> Non-Secure state
-// USART1_IRQn <0=> Secure state <1=> Non-Secure state
-// USART2_IRQn <0=> Secure state <1=> Non-Secure state
-// USART3_IRQn <0=> Secure state <1=> Non-Secure state
-// UART4_IRQn <0=> Secure state <1=> Non-Secure state
-// UART5_IRQn <0=> Secure state <1=> Non-Secure state
-// LPUART1_IRQn <0=> Secure state <1=> Non-Secure state
-// LPTIM1_IRQn <0=> Secure state <1=> Non-Secure state
+// ADC1_IRQn <0=> Secure state <1=> Non-Secure state
+// DAC1_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN1_IT0_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN1_IT1_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_BRK_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_UP_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_CC_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM2_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM3_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM4_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM5_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM6_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM7_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C1_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C1_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C2_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C2_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI1_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI2_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI3_IRQn <0=> Secure state <1=> Non-Secure state
+// USART1_IRQn <0=> Secure state <1=> Non-Secure state
+// USART2_IRQn <0=> Secure state <1=> Non-Secure state
+// USART3_IRQn <0=> Secure state <1=> Non-Secure state
+// UART4_IRQn <0=> Secure state <1=> Non-Secure state
+// UART5_IRQn <0=> Secure state <1=> Non-Secure state
+// LPUART1_IRQn <0=> Secure state <1=> Non-Secure state
*/
#define NVIC_INIT_ITNS1_VAL 0x00000000
@@ -462,38 +468,38 @@
/*
// Interrupts 64..95
-// TIM8_BRK_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM8_UP_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM8_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM8_CC_IRQn <0=> Secure state <1=> Non-Secure state
-// ADC2_IRQn <0=> Secure state <1=> Non-Secure state
-// LPTIM2_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM15_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM16_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM17_IRQn <0=> Secure state <1=> Non-Secure state
-// USB_DRD_FS_IRQn <0=> Secure state <1=> Non-Secure state
-// CRS_IRQn <0=> Secure state <1=> Non-Secure state
-// UCPD1_IRQn <0=> Secure state <1=> Non-Secure state
-// FMC_IRQn <0=> Secure state <1=> Non-Secure state
-// OCTOSPI1_IRQn <0=> Secure state <1=> Non-Secure state
-// SDMMC1_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C3_EV_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C3_ER_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI4_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI5_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI6_IRQn <0=> Secure state <1=> Non-Secure state
-// USART6_IRQn <0=> Secure state <1=> Non-Secure state
-// USART10_IRQn <0=> Secure state <1=> Non-Secure state
-// USART11_IRQn <0=> Secure state <1=> Non-Secure state
-// SAI1_IRQn <0=> Secure state <1=> Non-Secure state
-// SAI2_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel0_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel1_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel2_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel3_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel4_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel5_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel6_IRQn <0=> Secure state <1=> Non-Secure state
+// LPTIM1_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_BRK_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_UP_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_CC_IRQn <0=> Secure state <1=> Non-Secure state
+// ADC2_IRQn <0=> Secure state <1=> Non-Secure state
+// LPTIM2_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM15_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM16_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM17_IRQn <0=> Secure state <1=> Non-Secure state
+// USB_DRD_FS_IRQn <0=> Secure state <1=> Non-Secure state
+// CRS_IRQn <0=> Secure state <1=> Non-Secure state
+// UCPD1_IRQn <0=> Secure state <1=> Non-Secure state
+// FMC_IRQn <0=> Secure state <1=> Non-Secure state
+// OCTOSPI1_IRQn <0=> Secure state <1=> Non-Secure state
+// SDMMC1_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C3_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C3_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI4_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI5_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI6_IRQn <0=> Secure state <1=> Non-Secure state
+// USART6_IRQn <0=> Secure state <1=> Non-Secure state
+// USART10_IRQn <0=> Secure state <1=> Non-Secure state
+// USART11_IRQn <0=> Secure state <1=> Non-Secure state
+// SAI1_IRQn <0=> Secure state <1=> Non-Secure state
+// SAI2_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel0_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel1_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel2_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel3_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel4_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel5_IRQn <0=> Secure state <1=> Non-Secure state
*/
#define NVIC_INIT_ITNS2_VAL 0x00000000
@@ -502,41 +508,60 @@
*/
/*
-// Initialize ITNS 3 (Interrupts 96..121)
+// Initialize ITNS 3 (Interrupts 96..127)
*/
#define NVIC_INIT_ITNS3 1
/*
-// Interrupts 96..121
-// GPDMA2_Channel7_IRQn <0=> Secure state <1=> Non-Secure state
-// UART7_IRQn <0=> Secure state <1=> Non-Secure state
-// UART8_IRQn <0=> Secure state <1=> Non-Secure state
-// UART9_IRQn <0=> Secure state <1=> Non-Secure state
-// UART12_IRQn <0=> Secure state <1=> Non-Secure state
-// FPU_IRQn <0=> Secure state <1=> Non-Secure state
-// ICACHE_IRQn <0=> Secure state <1=> Non-Secure state
-// DCACHE_IRQn <0=> Secure state <1=> Non-Secure state
-// DCMI_PSSI_IRQn <0=> Secure state <1=> Non-Secure state
-// CORDIC_IRQn <0=> Secure state <1=> Non-Secure state
-// FMAC_IRQn <0=> Secure state <1=> Non-Secure state
-// DTS_IRQn <0=> Secure state <1=> Non-Secure state
-// RNG_IRQn <0=> Secure state <1=> Non-Secure state
-// HASH_IRQn <0=> Secure state <1=> Non-Secure state
-// CEC_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM12_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM13_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM14_IRQn <0=> Secure state <1=> Non-Secure state
-// I3C1_EV_IRQn <0=> Secure state <1=> Non-Secure state
-// I3C1_ER_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C4_EV_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C4_ER_IRQn <0=> Secure state <1=> Non-Secure state
-// LPTIM3_IRQn <0=> Secure state <1=> Non-Secure state
-// LPTIM4_IRQn <0=> Secure state <1=> Non-Secure state
-// LPTIM5_IRQn <0=> Secure state <1=> Non-Secure state
-// LPTIM6_IRQn <0=> Secure state <1=> Non-Secure state
+// Interrupts 96..127
+// GPDMA2_Channel6_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel7_IRQn <0=> Secure state <1=> Non-Secure state
+// UART7_IRQn <0=> Secure state <1=> Non-Secure state
+// UART8_IRQn <0=> Secure state <1=> Non-Secure state
+// UART9_IRQn <0=> Secure state <1=> Non-Secure state
+// UART12_IRQn <0=> Secure state <1=> Non-Secure state
+// FPU_IRQn <0=> Secure state <1=> Non-Secure state
+// ICACHE_IRQn <0=> Secure state <1=> Non-Secure state
+// DCACHE_IRQn <0=> Secure state <1=> Non-Secure state
+// DCMI_PSSI_IRQn <0=> Secure state <1=> Non-Secure state
+// CORDIC_IRQn <0=> Secure state <1=> Non-Secure state
+// FMAC_IRQn <0=> Secure state <1=> Non-Secure state
+// DTS_IRQn <0=> Secure state <1=> Non-Secure state
+// RNG_IRQn <0=> Secure state <1=> Non-Secure state
+// HASH_IRQn <0=> Secure state <1=> Non-Secure state
+// CEC_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM12_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM13_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM14_IRQn <0=> Secure state <1=> Non-Secure state
+// I3C1_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I3C1_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C4_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C4_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// LPTIM3_IRQn <0=> Secure state <1=> Non-Secure state
*/
#define NVIC_INIT_ITNS3_VAL 0x00000000
+/*
+//
+*/
+
+/*
+// Initialize ITNS 4 (Interrupts 128..130)
+*/
+#define NVIC_INIT_ITNS4 1
+
+/*
+// Interrupts 128..130
+// LPTIM4_IRQn <0=> Secure state <1=> Non-Secure state
+// LPTIM5_IRQn <0=> Secure state <1=> Non-Secure state
+// LPTIM6_IRQn <0=> Secure state <1=> Non-Secure state
+*/
+#define NVIC_INIT_ITNS4_VAL 0x00000000
+
+/*
+//
+*/
+
/*
//
*/
@@ -644,6 +669,10 @@ __STATIC_INLINE void TZ_SAU_Setup (void)
NVIC->ITNS[3] = NVIC_INIT_ITNS3_VAL;
#endif
+ #if defined (NVIC_INIT_ITNS4) && (NVIC_INIT_ITNS4 == 1U)
+ NVIC->ITNS[4] = NVIC_INIT_ITNS4_VAL;
+ #endif
+
}
#endif /* PARTITION_STM32H562XX_H */
diff --git a/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h563xx.h b/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h563xx.h
index b31a2a0b95..a550c90622 100644
--- a/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h563xx.h
+++ b/system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/Templates/partition_stm32h563xx.h
@@ -13,17 +13,24 @@
* - Setup Interrupt Target
*
******************************************************************************
- * @attention
+ * Copyright (c) 2009-2019 Arm Limited. All rights reserved.
+ * Copyright (c) 2023 STMicroelectronics. All rights reserved.
*
- * Copyright (c) 2023 STMicroelectronics.
- * All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0
*
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
+ * Licensed under the Apache License, Version 2.0 (the License); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
+ * www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
******************************************************************************
- */
+ */
#ifndef PARTITION_STM32H563XX_H
#define PARTITION_STM32H563XX_H
@@ -420,34 +427,33 @@
// GPDMA1_Channel6_IRQn <0=> Secure state <1=> Non-Secure state
// GPDMA1_Channel7_IRQn <0=> Secure state <1=> Non-Secure state
// IWDG_IRQn <0=> Secure state <1=> Non-Secure state
-// ADC1_IRQn <0=> Secure state <1=> Non-Secure state
-// DAC1_IRQn <0=> Secure state <1=> Non-Secure state
-// FDCAN1_IT0_IRQn <0=> Secure state <1=> Non-Secure state
-// FDCAN1_IT1_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM1_BRK_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM1_UP_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM1_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM1_CC_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM2_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM3_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM4_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM5_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM6_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM7_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C1_EV_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C1_ER_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C2_EV_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C2_ER_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI1_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI2_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI3_IRQn <0=> Secure state <1=> Non-Secure state
-// USART1_IRQn <0=> Secure state <1=> Non-Secure state
-// USART2_IRQn <0=> Secure state <1=> Non-Secure state
-// USART3_IRQn <0=> Secure state <1=> Non-Secure state
-// UART4_IRQn <0=> Secure state <1=> Non-Secure state
-// UART5_IRQn <0=> Secure state <1=> Non-Secure state
-// LPUART1_IRQn <0=> Secure state <1=> Non-Secure state
-// LPTIM1_IRQn <0=> Secure state <1=> Non-Secure state
+// ADC1_IRQn <0=> Secure state <1=> Non-Secure state
+// DAC1_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN1_IT0_IRQn <0=> Secure state <1=> Non-Secure state
+// FDCAN1_IT1_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_BRK_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_UP_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM1_CC_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM2_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM3_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM4_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM5_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM6_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM7_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C1_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C1_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C2_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C2_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI1_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI2_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI3_IRQn <0=> Secure state <1=> Non-Secure state
+// USART1_IRQn <0=> Secure state <1=> Non-Secure state
+// USART2_IRQn <0=> Secure state <1=> Non-Secure state
+// USART3_IRQn <0=> Secure state <1=> Non-Secure state
+// UART4_IRQn <0=> Secure state <1=> Non-Secure state
+// UART5_IRQn <0=> Secure state <1=> Non-Secure state
+// LPUART1_IRQn <0=> Secure state <1=> Non-Secure state
*/
#define NVIC_INIT_ITNS1_VAL 0x00000000
@@ -462,38 +468,38 @@
/*
// Interrupts 64..95
-// TIM8_BRK_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM8_UP_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM8_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM8_CC_IRQn <0=> Secure state <1=> Non-Secure state
-// ADC2_IRQn <0=> Secure state <1=> Non-Secure state
-// LPTIM2_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM15_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM16_IRQn <0=> Secure state <1=> Non-Secure state
-// TIM17_IRQn <0=> Secure state <1=> Non-Secure state
-// USB_DRD_FS_IRQn <0=> Secure state <1=> Non-Secure state
-// CRS_IRQn <0=> Secure state <1=> Non-Secure state
-// UCPD1_IRQn <0=> Secure state <1=> Non-Secure state
-// FMC_IRQn <0=> Secure state <1=> Non-Secure state
-// OCTOSPI1_IRQn <0=> Secure state <1=> Non-Secure state
-// SDMMC1_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C3_EV_IRQn <0=> Secure state <1=> Non-Secure state
-// I2C3_ER_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI4_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI5_IRQn <0=> Secure state <1=> Non-Secure state
-// SPI6_IRQn <0=> Secure state <1=> Non-Secure state
-// USART6_IRQn <0=> Secure state <1=> Non-Secure state
-// USART10_IRQn <0=> Secure state <1=> Non-Secure state
-// USART11_IRQn <0=> Secure state <1=> Non-Secure state
-// SAI1_IRQn <0=> Secure state <1=> Non-Secure state
-// SAI2_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel0_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel1_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel2_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel3_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel4_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel5_IRQn <0=> Secure state <1=> Non-Secure state
-// GPDMA2_Channel6_IRQn <0=> Secure state <1=> Non-Secure state
+// LPTIM1_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_BRK_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_UP_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_TRG_COM_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM8_CC_IRQn <0=> Secure state <1=> Non-Secure state
+// ADC2_IRQn <0=> Secure state <1=> Non-Secure state
+// LPTIM2_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM15_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM16_IRQn <0=> Secure state <1=> Non-Secure state
+// TIM17_IRQn <0=> Secure state <1=> Non-Secure state
+// USB_DRD_FS_IRQn <0=> Secure state <1=> Non-Secure state
+// CRS_IRQn <0=> Secure state <1=> Non-Secure state
+// UCPD1_IRQn <0=> Secure state <1=> Non-Secure state
+// FMC_IRQn <0=> Secure state <1=> Non-Secure state
+// OCTOSPI1_IRQn <0=> Secure state <1=> Non-Secure state
+// SDMMC1_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C3_EV_IRQn <0=> Secure state <1=> Non-Secure state
+// I2C3_ER_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI4_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI5_IRQn <0=> Secure state <1=> Non-Secure state
+// SPI6_IRQn <0=> Secure state <1=> Non-Secure state
+// USART6_IRQn <0=> Secure state <1=> Non-Secure state
+// USART10_IRQn <0=> Secure state <1=> Non-Secure state
+// USART11_IRQn <0=> Secure state <1=> Non-Secure state
+// SAI1_IRQn <0=> Secure state <1=> Non-Secure state
+// SAI2_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel0_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel1_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel2_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel3_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel4_IRQn <0=> Secure state <1=> Non-Secure state
+// GPDMA2_Channel5_IRQn <0=> Secure state <1=> Non-Secure state
*/
#define NVIC_INIT_ITNS2_VAL 0x00000000
@@ -502,46 +508,65 @@
*/
/*
-// Initialize ITNS 3 (Interrupts 96..126)
+// Initialize ITNS 3 (Interrupts 96..127)
*/
#define NVIC_INIT_ITNS3 1
/*
-// Interrupts 96..126
-// GPDMA2_Channel7_IRQn <0=> Secure state <1=> Non-Secure state
-// UART7_IRQn <0=> Secure state <1=> Non-Secure state
-// UART8_IRQn <0=> Secure state <1=> Non-Secure state
-// UART9_IRQn <0=> Secure state <1=> Non-Secure state
-// UART12_IRQn <0=> Secure state <1=> Non-Secure state
-// SDMMC2_IRQn <0=> Secure state <1=> Non-Secure state
-// FPU_IRQn <0=> Secure state <1=> Non-Secure state
-//