Skip to content

Commit

Permalink
stm32cube: stm32h5: critical package version fixes
Browse files Browse the repository at this point in the history
H5 Cube files first introduced by commit 1e6cac8 were not
the exact files released in v1.0.0 in the upstream GitHub repo. The gap
was not bridged in the update to v1.1.0 by commit 1946a19.
This patch fixes the problem & brings H5 Cube module files up to date
with the upstream Cube repo.

Signed-off-by: Abderrahmane Jarmouni <[email protected]>
  • Loading branch information
ajarmouni-st authored and erwango committed Dec 5, 2023
1 parent f217494 commit fa44367
Show file tree
Hide file tree
Showing 247 changed files with 4,289 additions and 5,100 deletions.
16 changes: 3 additions & 13 deletions stm32cube/stm32h5xx/README
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,16 @@ Patch List:
*Var init in LL_I2S_Init
- In the LL_I2S_Init function, initialisation of the sourceclock to avoid compilation warning.
Impacted files:
drivers/include/stm32h5xx_ll_spi.h
drivers/include/stm32h5xx_ll_spi.c
ST internal bug : 147754

*fix to the V2 HAL API to get PTP to work
impacted file : stm32h5xx_hal_eth.c
In the HAL_ETH_ReadData function where it checks for the last descriptor,
In the HAL_ETH_ReadData function where it checks for the last descriptor,
we added a checked if the TSA bit was set in DESC1
If the TSA bit is set then have a peak at the context descriptor which should be the one
If the TSA bit is set then have a peak at the context descriptor which should be the one
after the last descriptor
If the CTXT bit is set in the context descriptor then extract the timestamps
ST internal bug : 161504

*fix compilation error when instance does not exist on stm32h50x devices
- Include the stm32h5xx_ll_dlyb.h only if the stm32h5 device has a SDMMC BLYB or OCTOSPI BLYB
- Include the stm32h5xx_hal_dcache.h only if the stm32h5 device has a DCACHE
- Include the stm32h5xx_hal_sai.h only if the stm32h5 device has a SAI block A or B
Impacted files:
drivers/include/stm32h5xx_ll_dlyb.h
drivers/include/stm32h5xx_hal_dcache.h
drivers/include/stm32h5xx_hal_sai.h
ST internal bug : 166551 166552 166553

See release_note.html from STM32Cube
141 changes: 112 additions & 29 deletions stm32cube/stm32h5xx/drivers/include/Legacy/stm32_hal_legacy.h
100755 → 100644

Large diffs are not rendered by default.

22 changes: 5 additions & 17 deletions stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down Expand Up @@ -105,6 +105,7 @@ extern HAL_TickFreqTypeDef uwTickFreq;
* @}
*/

#if defined(VREFBUF)
/** @defgroup VREFBUF_VoltageScale VREFBUF Voltage Scale
* @{
*/
Expand All @@ -127,6 +128,7 @@ extern HAL_TickFreqTypeDef uwTickFreq;
/**
* @}
*/
#endif /* VREFBUF */

/** @defgroup SBS_FastModePlus_GPIO Fast-mode Plus on GPIO
* @{
Expand Down Expand Up @@ -160,22 +162,6 @@ extern HAL_TickFreqTypeDef uwTickFreq;
*/
#endif /* SBS_PMCR_ETH_SEL_PHY */

/** @defgroup SBS_Boostvddsel_Selection Boost VDD Selection
* @{
*/
#define SBS_BOOSTVDDSEL_VDDA ((uint32_t)0x00000000) /*!< Select VDDA as analog switch supply voltage
(when BOOSTEN bit is cleared) */
#define SBS_BOOSTVDDSEL_VDD SBS_PMCR_BOOSTVDDSEL /*!< Select VDD as analog switch supply voltage
(regardless of BOOSTEN bit) */

#define IS_SBS_BOOSTVDD_SELECTION(BOOSTVDDSEL) (((BOOSTVDDSEL) == SBS_BOOSTVDDSEL_VDDA) || \
((BOOSTVDDSEL) == SBS_BOOSTVDDSEL_VDD))

/**
* @}
*/


/** @defgroup SBS_Memories_Erase_Flag_Status Memory Erase Flags Status
* @{
*/
Expand Down Expand Up @@ -647,6 +633,7 @@ extern HAL_TickFreqTypeDef uwTickFreq;
((__CONFIG__) == SBS_BREAK_SRAM_ECC) || \
((__CONFIG__) == SBS_BREAK_LOCKUP))

#if defined(VREFBUF)
#define IS_VREFBUF_VOLTAGE_SCALE(__SCALE__) (((__SCALE__) == VREFBUF_VOLTAGE_SCALE0) || \
((__SCALE__) == VREFBUF_VOLTAGE_SCALE1) || \
((__SCALE__) == VREFBUF_VOLTAGE_SCALE2) || \
Expand All @@ -656,6 +643,7 @@ extern HAL_TickFreqTypeDef uwTickFreq;
((__VALUE__) == VREFBUF_HIGH_IMPEDANCE_ENABLE))

#define IS_VREFBUF_TRIMMING(__VALUE__) (((__VALUE__) > 0U) && ((__VALUE__) <= VREFBUF_CCR_TRIM))
#endif /* VREFBUF*/

#if defined(SBS_FASTMODEPLUS_PB9)
#define IS_SBS_FASTMODEPLUS(__PIN__) ((((__PIN__) & SBS_FASTMODEPLUS_PB6) == SBS_FASTMODEPLUS_PB6) || \
Expand Down
3 changes: 1 addition & 2 deletions stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_adc.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down Expand Up @@ -1126,7 +1126,6 @@ out-of-window sample to raise flag or interrupt */

/**
* @brief Verify the ADC regular conversions external trigger.
* @param __HANDLE__ ADC handle
* @param __REGTRIG__ programmed ADC regular conversions external trigger.
* @retval SET (__REGTRIG__ is a valid value) or RESET (__REGTRIG__ is invalid)
*/
Expand Down
3 changes: 1 addition & 2 deletions stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_adc_ex.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down Expand Up @@ -898,7 +898,6 @@ typedef struct

/**
* @brief Verify the ADC injected conversions external trigger.
* @param __HANDLE__ ADC handle.
* @param __INJTRIG__ programmed ADC injected conversions external trigger.
* @retval SET (__INJTRIG__ is a valid value) or RESET (__INJTRIG__ is invalid)
*/
Expand Down
2 changes: 1 addition & 1 deletion stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_cec.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down
2 changes: 1 addition & 1 deletion stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_comp.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
**********************************************************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down
2 changes: 1 addition & 1 deletion stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_conf.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
**********************************************************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down
2 changes: 1 addition & 1 deletion stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_cordic.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down
2 changes: 1 addition & 1 deletion stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_cortex.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down
4 changes: 2 additions & 2 deletions stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_crc.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down Expand Up @@ -318,7 +318,7 @@ uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t
/** @defgroup CRC_Exported_Functions_Group3 Peripheral State functions
* @{
*/
HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc);
HAL_CRC_StateTypeDef HAL_CRC_GetState(const CRC_HandleTypeDef *hcrc);
/**
* @}
*/
Expand Down
2 changes: 1 addition & 1 deletion stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_crc_ex.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down
6 changes: 3 additions & 3 deletions stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_cryp.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down Expand Up @@ -618,11 +618,11 @@ HAL_StatusTypeDef HAL_CRYP_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint32_t *pInp
*/
/* Interrupt Handler functions **********************************************/
void HAL_CRYP_IRQHandler(CRYP_HandleTypeDef *hcryp);
HAL_CRYP_STATETypeDef HAL_CRYP_GetState(CRYP_HandleTypeDef *hcryp);
HAL_CRYP_STATETypeDef HAL_CRYP_GetState(const CRYP_HandleTypeDef *hcryp);
void HAL_CRYP_InCpltCallback(CRYP_HandleTypeDef *hcryp);
void HAL_CRYP_OutCpltCallback(CRYP_HandleTypeDef *hcryp);
void HAL_CRYP_ErrorCallback(CRYP_HandleTypeDef *hcryp);
uint32_t HAL_CRYP_GetError(CRYP_HandleTypeDef *hcryp);
uint32_t HAL_CRYP_GetError(const CRYP_HandleTypeDef *hcryp);

/**
* @}
Expand Down
8 changes: 5 additions & 3 deletions stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_cryp_ex.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down Expand Up @@ -107,8 +107,10 @@ extern "C" {
/** @addtogroup CRYPEx_Exported_Functions_Group1 Extended AES processing functions
* @{
*/
HAL_StatusTypeDef HAL_CRYPEx_AESGCM_GenerateAuthTAG(CRYP_HandleTypeDef *hcryp, uint32_t *pAuthTag, uint32_t Timeout);
HAL_StatusTypeDef HAL_CRYPEx_AESCCM_GenerateAuthTAG(CRYP_HandleTypeDef *hcryp, uint32_t *pAuthTag, uint32_t Timeout);
HAL_StatusTypeDef HAL_CRYPEx_AESGCM_GenerateAuthTAG(CRYP_HandleTypeDef *hcryp, const uint32_t *pAuthTag,
uint32_t Timeout);
HAL_StatusTypeDef HAL_CRYPEx_AESCCM_GenerateAuthTAG(CRYP_HandleTypeDef *hcryp, const uint32_t *pAuthTag,
uint32_t Timeout);
/**
* @}
*/
Expand Down
3 changes: 1 addition & 2 deletions stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_dac.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down Expand Up @@ -224,7 +224,6 @@ typedef void (*pDAC_CallbackTypeDef)(DAC_HandleTypeDef *hdac);
#define DAC_TRIGGER_T5_TRGO ( DAC_CR_TSEL1_2 | DAC_CR_TEN1) /*!< TIM5 TRGO selected as external conversion trigger for DAC channel */
#define DAC_TRIGGER_T8_TRGO ( DAC_CR_TSEL1_2 | DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< TIM8 TRGO selected as external conversion trigger for DAC channel */
#define DAC_TRIGGER_T15_TRGO (DAC_CR_TSEL1_3 | DAC_CR_TEN1) /*!< TIM15 TRGO selected as external conversion trigger for DAC channel */

#else
/* Devices STM32H503xx */
#define DAC_TRIGGER_T3_TRGO ( DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< TIM3 TRGO selected as external conversion trigger for DAC channel */
Expand Down
2 changes: 1 addition & 1 deletion stm32cube/stm32h5xx/drivers/include/stm32h5xx_hal_dac_ex.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down
Loading

0 comments on commit fa44367

Please sign in to comment.