Commit ddd0932a authored by IBEN EL HADJ MESSAOUD Marwa's avatar IBEN EL HADJ MESSAOUD Marwa Committed by Erwan Gouriou
Browse files

stm32cube: update stm32h5 to cube version V1.2.0

Update Cube version for STM32H5xx series
on https://github.com/STMicroelectronics
from version v1.1.0
to version v1.2.0

Signed-off-by: default avatarIBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
parent 38df14fa
Loading
Loading
Loading
Loading
+1 −6
Changes for stm32cube/stm32h5xx/CMakeLists.txt: 1 added line, 6 removed lines.
Original line number Diff line number Diff line
# Copyright (c) 2023 STMicroelectronics
# Copyright (c) 2023-2024 STMicroelectronics
#
# SPDX-License-Identifier: Apache-2.0

@@ -51,7 +51,6 @@ zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_IWDG drivers/src/stm32h5xx_hal
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_LPTIM drivers/src/stm32h5xx_hal_lptim.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_MMC drivers/src/stm32h5xx_hal_mmc.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_MMC_EX drivers/src/stm32h5xx_hal_mmc_ex.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_MSP drivers/src/stm32h5xx_hal_msp.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_NAND drivers/src/stm32h5xx_hal_nand.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_NOR drivers/src/stm32h5xx_hal_nor.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_OPAMP drivers/src/stm32h5xx_hal_opamp.c)
@@ -81,9 +80,6 @@ zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_SPI drivers/src/stm32h5xx_hal_
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_SPI_EX drivers/src/stm32h5xx_hal_spi_ex.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_SRAM drivers/src/stm32h5xx_hal_sram.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_TIM drivers/src/stm32h5xx_hal_tim.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_TIM drivers/src/stm32h5xx_hal_timebase_rtc_alarm.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_TIM drivers/src/stm32h5xx_hal_timebase_rtc_wakeup.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_TIM drivers/src/stm32h5xx_hal_timebase_tim.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_TIM_EX drivers/src/stm32h5xx_hal_tim_ex.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_UART drivers/src/stm32h5xx_hal_uart.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_UART_EX drivers/src/stm32h5xx_hal_uart_ex.c)
@@ -105,7 +101,6 @@ zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_FMC drivers/src/stm32h5xx_ll_fm
zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_GPIO drivers/src/stm32h5xx_ll_gpio.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_I2C drivers/src/stm32h5xx_ll_i2c.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_I3C drivers/src/stm32h5xx_ll_i3c.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_I3C drivers/src/stm32h5xx_util_i3c.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_ICACHE drivers/src/stm32h5xx_ll_icache.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_LPTIM drivers/src/stm32h5xx_ll_lptim.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_LPUART drivers/src/stm32h5xx_ll_lpuart.c)

stm32cube/stm32h5xx/README

100755 → 100644
+2 −2
Changes for stm32cube/stm32h5xx/README: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ Origin:
   http://www.st.com/en/embedded-software/stm32cubeh5.html

Status:
   version v1.1.0
   version v1.2.0

Purpose:
   ST Microelectronics official MCU package for STM32H5 series.
@@ -23,7 +23,7 @@ URL:
   https://github.com/STMicroelectronics/STM32CubeH5

Commit:
   3d723b2467cdb13c2d780ceaa583b269680b67a4
   182f4c8589bf775b330ed63af7c0c17060d8a649
Maintained-by:
   External

+33 −11
Changes for stm32cube/stm32h5xx/drivers/include/Legacy/stm32_hal_legacy.h: 33 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2023 STMicroelectronics.
  * Copyright (c) 2021 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
@@ -275,7 +275,7 @@ extern "C" {
#define DAC_WAVEGENERATION_NOISE                        DAC_WAVE_NOISE
#define DAC_WAVEGENERATION_TRIANGLE                     DAC_WAVE_TRIANGLE

#if defined(STM32G4) || defined(STM32L5) || defined(STM32H7) || defined (STM32U5)
#if defined(STM32G4) || defined(STM32H7) || defined (STM32U5)
#define DAC_CHIPCONNECT_DISABLE       DAC_CHIPCONNECT_EXTERNAL
#define DAC_CHIPCONNECT_ENABLE        DAC_CHIPCONNECT_INTERNAL
#endif
@@ -548,6 +548,16 @@ extern "C" {
#define OB_SRAM134_RST_ERASE          OB_SRAM_RST_ERASE
#define OB_SRAM134_RST_NOT_ERASE      OB_SRAM_RST_NOT_ERASE
#endif /* STM32U5 */
#if defined(STM32U0)
#define OB_USER_nRST_STOP             OB_USER_NRST_STOP
#define OB_USER_nRST_STDBY            OB_USER_NRST_STDBY
#define OB_USER_nRST_SHDW             OB_USER_NRST_SHDW
#define OB_USER_nBOOT_SEL             OB_USER_NBOOT_SEL
#define OB_USER_nBOOT0                OB_USER_NBOOT0
#define OB_USER_nBOOT1                OB_USER_NBOOT1
#define OB_nBOOT0_RESET               OB_NBOOT0_RESET
#define OB_nBOOT0_SET                 OB_NBOOT0_SET
#endif /* STM32U0 */

/**
  * @}
@@ -1239,10 +1249,10 @@ extern "C" {
#define RTC_TAMPERPIN_PA0  RTC_TAMPERPIN_POS1
#define RTC_TAMPERPIN_PI8  RTC_TAMPERPIN_POS1

#if defined(STM32H5)
#if defined(STM32H5) || defined(STM32H7RS)
#define TAMP_SECRETDEVICE_ERASE_NONE        TAMP_DEVICESECRETS_ERASE_NONE
#define TAMP_SECRETDEVICE_ERASE_BKP_SRAM    TAMP_DEVICESECRETS_ERASE_BKPSRAM
#endif /* STM32H5 */
#endif /* STM32H5 || STM32H7RS */

#if defined(STM32WBA)
#define TAMP_SECRETDEVICE_ERASE_NONE            TAMP_DEVICESECRETS_ERASE_NONE
@@ -1254,10 +1264,10 @@ extern "C" {
#define TAMP_SECRETDEVICE_ERASE_ALL             TAMP_DEVICESECRETS_ERASE_ALL
#endif /* STM32WBA */

#if defined(STM32H5) || defined(STM32WBA)
#if defined(STM32H5) || defined(STM32WBA) || defined(STM32H7RS)
#define TAMP_SECRETDEVICE_ERASE_DISABLE     TAMP_DEVICESECRETS_ERASE_NONE
#define TAMP_SECRETDEVICE_ERASE_ENABLE      TAMP_SECRETDEVICE_ERASE_ALL
#endif /* STM32H5 || STM32WBA */
#endif /* STM32H5 || STM32WBA || STM32H7RS */

#if defined(STM32F7)
#define RTC_TAMPCR_TAMPXE          RTC_TAMPER_ENABLE_BITS_MASK
@@ -1595,6 +1605,8 @@ extern "C" {
#define ETH_MAC_SMALL_FIFO_RW_ACTIVE          0x00000006U  /* MAC small FIFO read / write controllers active */
#define ETH_MAC_MII_RECEIVE_PROTOCOL_ACTIVE   0x00000001U  /* MAC MII receive protocol engine active */

#define ETH_TxPacketConfig        ETH_TxPacketConfigTypeDef   /* Transmit Packet Configuration structure definition */

/**
  * @}
  */
@@ -1987,12 +1999,12 @@ extern "C" {
/** @defgroup HAL_RTC_Aliased_Functions HAL RTC Aliased Functions maintained for legacy purpose
  * @{
  */
#if defined(STM32H5) || defined(STM32WBA)
#if defined(STM32H5) || defined(STM32WBA) || defined(STM32H7RS)
#define HAL_RTCEx_SetBoothardwareKey            HAL_RTCEx_LockBootHardwareKey
#define HAL_RTCEx_BKUPBlock_Enable              HAL_RTCEx_BKUPBlock
#define HAL_RTCEx_BKUPBlock_Disable             HAL_RTCEx_BKUPUnblock
#define HAL_RTCEx_Erase_SecretDev_Conf          HAL_RTCEx_ConfigEraseDeviceSecrets
#endif /* STM32H5 || STM32WBA */
#endif /* STM32H5 || STM32WBA || STM32H7RS */

/**
  * @}
@@ -3642,8 +3654,12 @@ extern "C" {
#define RCC_MCOSOURCE_PLLCLK_NODIV  RCC_MCO1SOURCE_PLLCLK
#define RCC_MCOSOURCE_PLLCLK_DIV2   RCC_MCO1SOURCE_PLLCLK_DIV2

#if defined(STM32U0)
#define RCC_SYSCLKSOURCE_STATUS_PLLR   RCC_SYSCLKSOURCE_STATUS_PLLCLK
#endif

#if defined(STM32L4) || defined(STM32WB) || defined(STM32G0) || defined(STM32G4) || defined(STM32L5) || \
    defined(STM32WL) || defined(STM32C0)
    defined(STM32WL) || defined(STM32C0) || defined(STM32H7RS) || defined(STM32U0)
#define RCC_RTCCLKSOURCE_NO_CLK     RCC_RTCCLKSOURCE_NONE
#else
#define RCC_RTCCLKSOURCE_NONE       RCC_RTCCLKSOURCE_NO_CLK
@@ -3745,8 +3761,10 @@ extern "C" {
#define __HAL_RCC_GET_DFSDM_SOURCE  __HAL_RCC_GET_DFSDM1_SOURCE
#define RCC_DFSDM1CLKSOURCE_PCLK    RCC_DFSDM1CLKSOURCE_PCLK2
#define RCC_SWPMI1CLKSOURCE_PCLK    RCC_SWPMI1CLKSOURCE_PCLK1
#if !defined(STM32U0)
#define RCC_LPTIM1CLKSOURCE_PCLK    RCC_LPTIM1CLKSOURCE_PCLK1
#define RCC_LPTIM2CLKSOURCE_PCLK    RCC_LPTIM2CLKSOURCE_PCLK1
#endif

#define RCC_DFSDM1AUDIOCLKSOURCE_I2SAPB1    RCC_DFSDM1AUDIOCLKSOURCE_I2S1
#define RCC_DFSDM1AUDIOCLKSOURCE_I2SAPB2    RCC_DFSDM1AUDIOCLKSOURCE_I2S2
@@ -3892,7 +3910,7 @@ extern "C" {
  */
#if defined (STM32G0) || defined (STM32L5) || defined (STM32L412xx) || defined (STM32L422xx) || \
    defined (STM32L4P5xx)|| defined (STM32L4Q5xx) || defined (STM32G4) || defined (STM32WL) || defined (STM32U5) || \
    defined (STM32WBA) || defined (STM32H5) || defined (STM32C0)
    defined (STM32WBA) || defined (STM32H5) || defined (STM32C0) || defined (STM32H7RS) ||  defined (STM32U0)
#else
#define __HAL_RTC_CLEAR_FLAG                      __HAL_RTC_EXTI_CLEAR_FLAG
#endif
@@ -3929,7 +3947,8 @@ extern "C" {

#if defined (STM32F0) || defined (STM32F2) || defined (STM32F3) || defined (STM32F4) || defined (STM32F7) || \
    defined (STM32H7) || \
    defined (STM32L0) || defined (STM32L1)
    defined (STM32L0) || defined (STM32L1) || \
    defined (STM32WB)
#define __HAL_RTC_TAMPER_GET_IT                   __HAL_RTC_TAMPER_GET_FLAG
#endif

@@ -4214,6 +4233,9 @@ extern "C" {
#define __HAL_TIM_GetCompare            __HAL_TIM_GET_COMPARE

#define TIM_BREAKINPUTSOURCE_DFSDM  TIM_BREAKINPUTSOURCE_DFSDM1

#define TIM_OCMODE_ASSYMETRIC_PWM1      TIM_OCMODE_ASYMMETRIC_PWM1
#define TIM_OCMODE_ASSYMETRIC_PWM2      TIM_OCMODE_ASYMMETRIC_PWM2
/**
  * @}
  */
+6 −8
Changes for stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal.h: 6 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -202,8 +202,8 @@ extern HAL_TickFreqTypeDef uwTickFreq;
/** @defgroup SBS_EPOCH_Selection  EPOCH Selection
  * @{
  */
#define SBS_EPOCH_SEL_SECURE             0x0UL                         /*!< EPOCH secure selected */
#define SBS_EPOCH_SEL_NONSECURE          SBS_EPOCHSELCR_EPOCH_SEL_0    /*!< EPOCH non secure selected */
#define SBS_EPOCH_SEL_NONSECURE          0x0UL                         /*!< EPOCH non secure selected */
#define SBS_EPOCH_SEL_SECURE             SBS_EPOCHSELCR_EPOCH_SEL_0    /*!< EPOCH secure selected */
#define SBS_EPOCH_SEL_PUFCHECK           SBS_EPOCHSELCR_EPOCH_SEL_1    /*!< EPOCH all zeros for PUF integrity check */

#define IS_SBS_EPOCH_SELECTION(SELECT) (((SELECT) == SBS_EPOCH_SEL_SECURE)    || \
@@ -231,9 +231,9 @@ extern HAL_TickFreqTypeDef uwTickFreq;
  * @{
  */
#define SBS_HDPL_VALUE_0                     0x000000B4U   /*!< Hide protection level 0 */
#define SBS_HDPL_VALUE_1                     0x00000051U   /*!< Hide protection level 0 */
#define SBS_HDPL_VALUE_2                     0x0000008AU   /*!< Hide protection level 0 */
#define SBS_HDPL_VALUE_3                     0x0000006FU   /*!< Hide protection level 0 */
#define SBS_HDPL_VALUE_1                     0x00000051U   /*!< Hide protection level 1 */
#define SBS_HDPL_VALUE_2                     0x0000008AU   /*!< Hide protection level 2 */
#define SBS_HDPL_VALUE_3                     0x0000006FU   /*!< Hide protection level 3 */
/**
  * @}
  */
@@ -278,8 +278,7 @@ extern HAL_TickFreqTypeDef uwTickFreq;
#define SBS_CLK                     SBS_SECCFGR_SBSSEC      /*!< SBS clock control */
#define SBS_CLASSB                  SBS_SECCFGR_CLASSBSEC   /*!< Class B */
#define SBS_FPU                     SBS_SECCFGR_FPUSEC      /*!< FPU */
#define SBS_SMPS                    SBS_SECCFGR_SDCE_SEC_EN /*!< SMPS */
#define SBS_ALL                     (SBS_CLK | SBS_CLASSB | SBS_FPU | SBS_SMPS) /*!< All */
#define SBS_ALL                     (SBS_CLK | SBS_CLASSB | SBS_FPU) /*!< All */
/**
  * @}
  */
@@ -667,7 +666,6 @@ extern HAL_TickFreqTypeDef uwTickFreq;
#define IS_SBS_ITEMS_ATTRIBUTES(__ITEM__) ((((__ITEM__) & SBS_CLK)    == SBS_CLK)    || \
                                           (((__ITEM__) & SBS_CLASSB) == SBS_CLASSB) || \
                                           (((__ITEM__) & SBS_FPU)    == SBS_FPU)    || \
                                           (((__ITEM__) & SBS_SMPS)   == SBS_SMPS)  || \
                                           (((__ITEM__) & ~(SBS_ALL)) == 0U))

#define IS_SBS_ATTRIBUTES(__ATTRIBUTES__) (((__ATTRIBUTES__) == SBS_SEC)  ||\
+24 −0
Changes for stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_adc.h: 24 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1754,6 +1754,30 @@ __LL_ADC_CALC_DATA_TO_VOLTAGE((__VREFANALOG_VOLTAGE__),\
                              (__ADC_DATA__),\
                              (__ADC_RESOLUTION__))

/**
  * @brief  Helper macro to calculate the voltage (unit: mVolt)
  *         corresponding to a ADC conversion data (unit: digital value)
  *         in differential ended mode.
  * @note   Analog reference voltage (Vref+) must be either known from
  *         user board environment or can be calculated using ADC measurement
  *         and ADC helper macro @ref __LL_ADC_CALC_VREFANALOG_VOLTAGE().
  * @param  __VREFANALOG_VOLTAGE__ Analog reference voltage (unit: mV)
  * @param  __ADC_DATA__ ADC conversion data (resolution 12 bits)
  *                       (unit: digital value).
  * @param  __ADC_RESOLUTION__ This parameter can be one of the following values:
  *         @arg @ref ADC_RESOLUTION_12B
  *         @arg @ref ADC_RESOLUTION_10B
  *         @arg @ref ADC_RESOLUTION_8B
  *         @arg @ref ADC_RESOLUTION_6B
  * @retval ADC conversion data equivalent voltage value (unit: mVolt)
  */
#define __HAL_ADC_CALC_DIFF_DATA_TO_VOLTAGE(__VREFANALOG_VOLTAGE__,\
                                            __ADC_DATA__,\
                                            __ADC_RESOLUTION__) \
__LL_ADC_CALC_DIFF_DATA_TO_VOLTAGE((__VREFANALOG_VOLTAGE__),\
                                   (__ADC_DATA__),\
                                   (__ADC_RESOLUTION__))

/**
  * @brief  Helper macro to calculate analog reference voltage (Vref+)
  *         (unit: mVolt) from ADC conversion data of internal voltage
Loading