Skip to content

Commit 9d40b01

Browse files
committed
system(H7) update STM32H7xx HAL Drivers to v1.11.3
Included in STM32CubeH7 FW v1.11.2 Signed-off-by: Frederic Pillon <[email protected]>
1 parent a76f802 commit 9d40b01

File tree

132 files changed

+6461
-3684
lines changed

Some content is hidden

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

132 files changed

+6461
-3684
lines changed

system/Drivers/STM32H7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h

+391-65
Large diffs are not rendered by default.

system/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_adc_ex.h

+10-2
Original file line numberDiff line numberDiff line change
@@ -918,12 +918,20 @@ typedef struct
918918
#define IS_ADC_INJECTED_NB_CONV(__LENGTH__) (((__LENGTH__) >= (1U)) && ((__LENGTH__) <= (4U)))
919919

920920
/**
921-
* @brief Calibration factor size verification (7 bits maximum).
921+
* @brief Calibration factor size verification (11 bits maximum).
922922
* @param __CALIBRATION_FACTOR__ Calibration factor value.
923923
* @retval SET (__CALIBRATION_FACTOR__ is within the authorized size) or RESET (__CALIBRATION_FACTOR__ is too large)
924924
*/
925-
#define IS_ADC_CALFACT(__CALIBRATION_FACTOR__) ((__CALIBRATION_FACTOR__) <= (0x7FU))
925+
#define IS_ADC_CALFACT(__CALIBRATION_FACTOR__) ((__CALIBRATION_FACTOR__) <= (0x7FFU))
926926

927+
#if defined(ADC_VER_V5_V90)
928+
/**
929+
* @brief Calibration factor size verification (7 bits maximum on ADC3).
930+
* @param __CALIBRATION_FACTOR__ Calibration factor value.
931+
* @retval SET (__CALIBRATION_FACTOR__ is within the authorized size) or RESET (__CALIBRATION_FACTOR__ is too large)
932+
*/
933+
#define IS_ADC_CALFACT_ADC3(__CALIBRATION_FACTOR__) ((__CALIBRATION_FACTOR__) <= (0x7FU))
934+
#endif
927935

928936
/**
929937
* @brief Verify the ADC channel setting.

system/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_conf_template.h

+8-2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#define HAL_DTS_MODULE_ENABLED
5050
#define HAL_DSI_MODULE_ENABLED
5151
#define HAL_ETH_MODULE_ENABLED
52+
/* #define HAL_ETH_LEGACY_MODULE_ENABLED */
5253
#define HAL_EXTI_MODULE_ENABLED
5354
#define HAL_FDCAN_MODULE_ENABLED
5455
#define HAL_FLASH_MODULE_ENABLED
@@ -165,8 +166,9 @@
165166
#define VDD_VALUE (3300UL) /*!< Value of VDD in mv */
166167
#define TICK_INT_PRIORITY (0x0FUL) /*!< tick interrupt priority */
167168
#define USE_RTOS 0
168-
#define USE_SD_TRANSCEIVER 0U /*!< use uSD Transceiver */
169-
#define USE_SPI_CRC 1U /*!< use CRC in SPI */
169+
#define USE_SD_TRANSCEIVER 0U /*!< use uSD Transceiver */
170+
#define USE_SPI_CRC 1U /*!< use CRC in SPI */
171+
#define USE_FLASH_ECC 0U /*!< use ECC error management in FLASH */
170172

171173
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
172174
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
@@ -285,6 +287,10 @@
285287
#include "stm32h7xx_hal_eth.h"
286288
#endif /* HAL_ETH_MODULE_ENABLED */
287289

290+
#ifdef HAL_ETH_LEGACY_MODULE_ENABLED
291+
#include "stm32h7xx_hal_eth_legacy.h"
292+
#endif /* HAL_ETH_LEGACY_MODULE_ENABLED */
293+
288294
#ifdef HAL_EXTI_MODULE_ENABLED
289295
#include "stm32h7xx_hal_exti.h"
290296
#endif /* HAL_EXTI_MODULE_ENABLED */

system/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cortex.h

+2
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb);
307307
#if (__MPU_PRESENT == 1)
308308
void HAL_MPU_Enable(uint32_t MPU_Control);
309309
void HAL_MPU_Disable(void);
310+
void HAL_MPU_EnableRegion(uint32_t RegionNumber);
311+
void HAL_MPU_DisableRegion(uint32_t RegionNumber);
310312
void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);
311313
#endif /* __MPU_PRESENT */
312314
uint32_t HAL_NVIC_GetPriorityGrouping(void);

system/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_crc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t
318318
/** @defgroup CRC_Exported_Functions_Group3 Peripheral State functions
319319
* @{
320320
*/
321-
HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc);
321+
HAL_CRC_StateTypeDef HAL_CRC_GetState(const CRC_HandleTypeDef *hcrc);
322322
/**
323323
* @}
324324
*/

system/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dac.h

+21-21
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ typedef struct
7878
__IO uint32_t ErrorCode; /*!< DAC Error code */
7979

8080
#if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
81-
void (* ConvCpltCallbackCh1) (struct __DAC_HandleTypeDef *hdac);
82-
void (* ConvHalfCpltCallbackCh1) (struct __DAC_HandleTypeDef *hdac);
83-
void (* ErrorCallbackCh1) (struct __DAC_HandleTypeDef *hdac);
84-
void (* DMAUnderrunCallbackCh1) (struct __DAC_HandleTypeDef *hdac);
81+
void (* ConvCpltCallbackCh1)(struct __DAC_HandleTypeDef *hdac);
82+
void (* ConvHalfCpltCallbackCh1)(struct __DAC_HandleTypeDef *hdac);
83+
void (* ErrorCallbackCh1)(struct __DAC_HandleTypeDef *hdac);
84+
void (* DMAUnderrunCallbackCh1)(struct __DAC_HandleTypeDef *hdac);
8585

86-
void (* ConvCpltCallbackCh2) (struct __DAC_HandleTypeDef *hdac);
87-
void (* ConvHalfCpltCallbackCh2) (struct __DAC_HandleTypeDef *hdac);
88-
void (* ErrorCallbackCh2) (struct __DAC_HandleTypeDef *hdac);
89-
void (* DMAUnderrunCallbackCh2) (struct __DAC_HandleTypeDef *hdac);
86+
void (* ConvCpltCallbackCh2)(struct __DAC_HandleTypeDef *hdac);
87+
void (* ConvHalfCpltCallbackCh2)(struct __DAC_HandleTypeDef *hdac);
88+
void (* ErrorCallbackCh2)(struct __DAC_HandleTypeDef *hdac);
89+
void (* DMAUnderrunCallbackCh2)(struct __DAC_HandleTypeDef *hdac);
9090

9191

92-
void (* MspInitCallback) (struct __DAC_HandleTypeDef *hdac);
93-
void (* MspDeInitCallback) (struct __DAC_HandleTypeDef *hdac);
92+
void (* MspInitCallback)(struct __DAC_HandleTypeDef *hdac);
93+
void (* MspDeInitCallback)(struct __DAC_HandleTypeDef *hdac);
9494
#endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
9595

9696
} DAC_HandleTypeDef;
@@ -127,7 +127,7 @@ typedef struct
127127
uint32_t DAC_OutputBuffer; /*!< Specifies whether the DAC channel output buffer is enabled or disabled.
128128
This parameter can be a value of @ref DAC_output_buffer */
129129

130-
uint32_t DAC_ConnectOnChipPeripheral ; /*!< Specifies whether the DAC output is connected or not to on chip peripheral .
130+
uint32_t DAC_ConnectOnChipPeripheral ; /*!< Specifies whether the DAC output is connected or not to on chip peripheral.
131131
This parameter can be a value of @ref DAC_ConnectOnChipPeripheral */
132132

133133
uint32_t DAC_UserTrimming; /*!< Specifies the trimming mode
@@ -209,19 +209,19 @@ typedef void (*pDAC_CallbackTypeDef)(DAC_HandleTypeDef *hdac);
209209
#if defined(HRTIM1)
210210
#define DAC_TRIGGER_HR1_TRGO1 (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< HR1 TRGO1 selected as external conversion trigger for DAC channel */
211211
#define DAC_TRIGGER_HR1_TRGO2 (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_1 | DAC_CR_TEN1) /*!< HR1 TRGO2 selected as external conversion trigger for DAC channel */
212-
#endif
212+
#endif /* HRTIM12 */
213213
#define DAC_TRIGGER_LPTIM1_OUT (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< LPTIM1 OUT TRGO selected as external conversion trigger for DAC channel */
214214
#define DAC_TRIGGER_LPTIM2_OUT (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_2 | DAC_CR_TEN1) /*!< LPTIM2 OUT TRGO selected as external conversion trigger for DAC channel */
215215
#define DAC_TRIGGER_EXT_IT9 (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_2 | DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< EXTI Line9 event selected as external conversion trigger for DAC channel */
216216
#if defined(TIM23)
217217
#define DAC_TRIGGER_T23_TRGO (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_2 | DAC_CR_TSEL1_1 | DAC_CR_TEN1) /*!< TIM23 TRGO selected as external conversion trigger for DAC channel */
218-
#endif
218+
#endif /* TIM23 */
219219
#if defined(TIM24)
220220
#define DAC_TRIGGER_T24_TRGO (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_2 | DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< TIM24 TRGO selected as external conversion trigger for DAC channel */
221-
#endif
221+
#endif /* TIM24 */
222222
#if defined(DAC2)
223223
#define DAC_TRIGGER_LPTIM3_OUT (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_2 | DAC_CR_TSEL1_1 | DAC_CR_TEN1) /*!< LPTIM3 OUT TRGO selected as external conversion trigger for DAC channel */
224-
#endif
224+
#endif /* DAC2 */
225225

226226
/**
227227
* @}
@@ -478,7 +478,7 @@ void HAL_DAC_MspDeInit(DAC_HandleTypeDef *hdac);
478478
/* IO operation functions *****************************************************/
479479
HAL_StatusTypeDef HAL_DAC_Start(DAC_HandleTypeDef *hdac, uint32_t Channel);
480480
HAL_StatusTypeDef HAL_DAC_Stop(DAC_HandleTypeDef *hdac, uint32_t Channel);
481-
HAL_StatusTypeDef HAL_DAC_Start_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel, uint32_t *pData, uint32_t Length,
481+
HAL_StatusTypeDef HAL_DAC_Start_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel, const uint32_t *pData, uint32_t Length,
482482
uint32_t Alignment);
483483
HAL_StatusTypeDef HAL_DAC_Stop_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel);
484484
void HAL_DAC_IRQHandler(DAC_HandleTypeDef *hdac);
@@ -504,8 +504,9 @@ HAL_StatusTypeDef HAL_DAC_UnRegisterCallback(DAC_HandleTypeDef *hdac, HAL_DA
504504
* @{
505505
*/
506506
/* Peripheral Control functions ***********************************************/
507-
uint32_t HAL_DAC_GetValue(DAC_HandleTypeDef *hdac, uint32_t Channel);
508-
HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef *hdac, DAC_ChannelConfTypeDef *sConfig, uint32_t Channel);
507+
uint32_t HAL_DAC_GetValue(const DAC_HandleTypeDef *hdac, uint32_t Channel);
508+
HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef *hdac,
509+
const DAC_ChannelConfTypeDef *sConfig, uint32_t Channel);
509510
/**
510511
* @}
511512
*/
@@ -514,8 +515,8 @@ HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef *hdac, DAC_ChannelConf
514515
* @{
515516
*/
516517
/* Peripheral State and Error functions ***************************************/
517-
HAL_DAC_StateTypeDef HAL_DAC_GetState(DAC_HandleTypeDef *hdac);
518-
uint32_t HAL_DAC_GetError(DAC_HandleTypeDef *hdac);
518+
HAL_DAC_StateTypeDef HAL_DAC_GetState(const DAC_HandleTypeDef *hdac);
519+
uint32_t HAL_DAC_GetError(const DAC_HandleTypeDef *hdac);
519520

520521
/**
521522
* @}
@@ -551,4 +552,3 @@ void DAC_DMAHalfConvCpltCh1(DMA_HandleTypeDef *hdma);
551552

552553

553554
#endif /* STM32H7xx_HAL_DAC_H */
554-

system/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dac_ex.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ extern "C" {
8181
* @}
8282
*/
8383

84+
8485
/**
8586
* @}
8687
*/
@@ -140,7 +141,7 @@ extern "C" {
140141
((TRIGGER) == DAC_TRIGGER_T23_TRGO) || \
141142
((TRIGGER) == DAC_TRIGGER_T24_TRGO) || \
142143
((TRIGGER) == DAC_TRIGGER_SOFTWARE))
143-
#endif
144+
#endif /* HRTIM1 */
144145

145146
#define IS_DAC_SAMPLETIME(TIME) ((TIME) <= 0x000003FFU)
146147

@@ -205,11 +206,11 @@ HAL_StatusTypeDef HAL_DACEx_NoiseWaveGenerate(DAC_HandleTypeDef *hdac, uint32_t
205206

206207
HAL_StatusTypeDef HAL_DACEx_DualStart(DAC_HandleTypeDef *hdac);
207208
HAL_StatusTypeDef HAL_DACEx_DualStop(DAC_HandleTypeDef *hdac);
208-
HAL_StatusTypeDef HAL_DACEx_DualStart_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel, uint32_t *pData, uint32_t Length,
209-
uint32_t Alignment);
209+
HAL_StatusTypeDef HAL_DACEx_DualStart_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel,
210+
const uint32_t *pData, uint32_t Length, uint32_t Alignment);
210211
HAL_StatusTypeDef HAL_DACEx_DualStop_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel);
211212
HAL_StatusTypeDef HAL_DACEx_DualSetValue(DAC_HandleTypeDef *hdac, uint32_t Alignment, uint32_t Data1, uint32_t Data2);
212-
uint32_t HAL_DACEx_DualGetValue(DAC_HandleTypeDef *hdac);
213+
uint32_t HAL_DACEx_DualGetValue(const DAC_HandleTypeDef *hdac);
213214

214215
void HAL_DACEx_ConvCpltCallbackCh2(DAC_HandleTypeDef *hdac);
215216
void HAL_DACEx_ConvHalfCpltCallbackCh2(DAC_HandleTypeDef *hdac);
@@ -229,7 +230,7 @@ void HAL_DACEx_DMAUnderrunCallbackCh2(DAC_HandleTypeDef *hdac);
229230
HAL_StatusTypeDef HAL_DACEx_SelfCalibrate(DAC_HandleTypeDef *hdac, DAC_ChannelConfTypeDef *sConfig, uint32_t Channel);
230231
HAL_StatusTypeDef HAL_DACEx_SetUserTrimming(DAC_HandleTypeDef *hdac, DAC_ChannelConfTypeDef *sConfig, uint32_t Channel,
231232
uint32_t NewTrimmingValue);
232-
uint32_t HAL_DACEx_GetTrimOffset(DAC_HandleTypeDef *hdac, uint32_t Channel);
233+
uint32_t HAL_DACEx_GetTrimOffset(const DAC_HandleTypeDef *hdac, uint32_t Channel);
233234

234235
/**
235236
* @}
@@ -268,4 +269,3 @@ void DAC_DMAHalfConvCpltCh2(DMA_HandleTypeDef *hdma);
268269
#endif
269270

270271
#endif /* STM32H7xx_HAL_DAC_EX_H */
271-

system/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ typedef enum
6666
(__DMA_HANDLE__).Parent = (__HANDLE__); \
6767
} while(0)
6868

69-
#define UNUSED(x) ((void)(x))
69+
#if !defined(UNUSED)
70+
#define UNUSED(x) ((void)(x)) /* To avoid gcc/g++ warnings */
71+
#endif /* UNUSED */
7072

7173
/** @brief Reset the Handle's State field.
7274
* @param __HANDLE__: specifies the Peripheral Handle.

system/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dsi.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ typedef void (*pDSI_CallbackTypeDef)(DSI_HandleTypeDef *hdsi); /*!< pointer to
976976
#define __HAL_DSI_WRAPPER_ENABLE(__HANDLE__) do { \
977977
__IO uint32_t tmpreg = 0x00U; \
978978
SET_BIT((__HANDLE__)->Instance->WCR, DSI_WCR_DSIEN);\
979-
/* Delay after an DSI warpper enabling */ \
979+
/* Delay after an DSI wrapper enabling */ \
980980
tmpreg = READ_BIT((__HANDLE__)->Instance->WCR, DSI_WCR_DSIEN);\
981981
UNUSED(tmpreg); \
982982
} while(0U)
@@ -989,7 +989,7 @@ typedef void (*pDSI_CallbackTypeDef)(DSI_HandleTypeDef *hdsi); /*!< pointer to
989989
#define __HAL_DSI_WRAPPER_DISABLE(__HANDLE__) do { \
990990
__IO uint32_t tmpreg = 0x00U; \
991991
CLEAR_BIT((__HANDLE__)->Instance->WCR, DSI_WCR_DSIEN);\
992-
/* Delay after an DSI warpper disabling*/ \
992+
/* Delay after an DSI wrapper disabling*/ \
993993
tmpreg = READ_BIT((__HANDLE__)->Instance->WCR, DSI_WCR_DSIEN);\
994994
UNUSED(tmpreg); \
995995
} while(0U)
@@ -1184,7 +1184,7 @@ HAL_StatusTypeDef HAL_DSI_LongWrite(DSI_HandleTypeDef *hdsi,
11841184
uint32_t Mode,
11851185
uint32_t NbParams,
11861186
uint32_t Param1,
1187-
uint8_t *ParametersTable);
1187+
const uint8_t *ParametersTable);
11881188
HAL_StatusTypeDef HAL_DSI_Read(DSI_HandleTypeDef *hdsi,
11891189
uint32_t ChannelNbr,
11901190
uint8_t *Array,
@@ -1222,8 +1222,8 @@ HAL_StatusTypeDef HAL_DSI_SetContentionDetectionOff(DSI_HandleTypeDef *hdsi, Fun
12221222
* @brief Peripheral State and Errors functions
12231223
* @{
12241224
*/
1225-
uint32_t HAL_DSI_GetError(DSI_HandleTypeDef *hdsi);
1226-
HAL_DSI_StateTypeDef HAL_DSI_GetState(DSI_HandleTypeDef *hdsi);
1225+
uint32_t HAL_DSI_GetError(const DSI_HandleTypeDef *hdsi);
1226+
HAL_DSI_StateTypeDef HAL_DSI_GetState(const DSI_HandleTypeDef *hdsi);
12271227

12281228
/**
12291229
* @}
@@ -1271,10 +1271,10 @@ HAL_DSI_StateTypeDef HAL_DSI_GetState(DSI_HandleTypeDef *hdsi);
12711271
|| ((LooselyPacked) == DSI_LOOSELY_PACKED_DISABLE))
12721272
#define IS_DSI_DE_POLARITY(DataEnable) (((DataEnable) == DSI_DATA_ENABLE_ACTIVE_HIGH)\
12731273
|| ((DataEnable) == DSI_DATA_ENABLE_ACTIVE_LOW))
1274-
#define IS_DSI_VSYNC_POLARITY(VSYNC) (((VSYNC) == DSI_VSYNC_ACTIVE_HIGH)\
1275-
|| ((VSYNC) == DSI_VSYNC_ACTIVE_LOW))
1276-
#define IS_DSI_HSYNC_POLARITY(HSYNC) (((HSYNC) == DSI_HSYNC_ACTIVE_HIGH)\
1277-
|| ((HSYNC) == DSI_HSYNC_ACTIVE_LOW))
1274+
#define IS_DSI_VSYNC_POLARITY(Vsync) (((Vsync) == DSI_VSYNC_ACTIVE_HIGH)\
1275+
|| ((Vsync) == DSI_VSYNC_ACTIVE_LOW))
1276+
#define IS_DSI_HSYNC_POLARITY(Hsync) (((Hsync) == DSI_HSYNC_ACTIVE_HIGH)\
1277+
|| ((Hsync) == DSI_HSYNC_ACTIVE_LOW))
12781278
#define IS_DSI_VIDEO_MODE_TYPE(VideoModeType) (((VideoModeType) == DSI_VID_MODE_NB_PULSES) || \
12791279
((VideoModeType) == DSI_VID_MODE_NB_EVENTS) || \
12801280
((VideoModeType) == DSI_VID_MODE_BURST))

0 commit comments

Comments
 (0)