Skip to content

Commit 7dcdc8a

Browse files
committed
[G4] Update STM32G4xx HAL Drivers to v1.1.1
Included in STM32CubeG4 FW v1.2.0 Signed-off-by: Frederic Pillon <[email protected]>
1 parent 8d062a5 commit 7dcdc8a

File tree

72 files changed

+5610
-1837
lines changed

Some content is hidden

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

72 files changed

+5610
-1837
lines changed

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h

+157-27
Large diffs are not rendered by default.

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cordic.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
******************************************************************************
88
* @attention
99
*
10-
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
10+
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
1111
* All rights reserved.</center></h2>
1212
*
1313
* This software component is licensed by ST under BSD 3-Clause license,

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cryp.h

+24-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ typedef struct
6464
uint32_t *Header; /*!< used only in AES GCM and CCM Algorithm for authentication,
6565
GCM : also known as Additional Authentication Data
6666
CCM : named B1 composed of the associated data length and Associated Data. */
67-
uint32_t HeaderSize; /*!< The size of header buffer in word */
67+
uint32_t HeaderSize; /*!< The size of header buffer */
6868
uint32_t *B0; /*!< B0 is first authentication block used only in AES CCM mode */
69-
uint32_t DataWidthUnit; /*!< Data With Unit, this parameter can be value of @ref CRYP_Data_Width_Unit*/
69+
uint32_t DataWidthUnit; /*!< Payload Data Width Unit, this parameter can be value of @ref CRYP_Data_Width_Unit*/
70+
uint32_t HeaderWidthUnit; /*!< Header Width Unit, this parameter can be value of @ref CRYP_Header_Width_Unit*/
7071
uint32_t KeyIVConfigSkip; /*!< CRYP peripheral Key and IV configuration skip, to config Key and Initialization
7172
Vector only once and to skip configuration for consecutive processings.
7273
This parameter can be a value of @ref CRYP_Configuration_Skip */
@@ -182,10 +183,12 @@ typedef struct
182183

183184
uint32_t Key_saved[8]; /*!< copy of key registers */
184185

185-
uint32_t Size_saved; /*!< copy of input buffer size */
186+
uint16_t Size_saved; /*!< copy of input buffer size */
186187

187188
uint16_t CrypHeaderCount_saved; /*!< copy of CRYP header data counter when processing is suspended */
188189

190+
uint32_t SizesSum_saved; /*!< copy of SizesSum when processing is suspended */
191+
189192
uint32_t ResumingFlag; /*!< resumption flag to bypass steps already carried out */
190193

191194
FunctionalState AutoKeyDerivation_saved; /*!< copy of CRYP handle auto key derivation parameter */
@@ -259,6 +262,17 @@ typedef void (*pCRYP_CallbackTypeDef)(CRYP_HandleTypeDef *hcryp); /*!< point
259262
#define CRYP_DATAWIDTHUNIT_WORD 0x00000000U /*!< By default, size unit is word */
260263
#define CRYP_DATAWIDTHUNIT_BYTE 0x00000001U /*!< By default, size unit is byte */
261264

265+
/**
266+
* @}
267+
*/
268+
269+
/** @defgroup CRYP_Header_Width_Unit CRYP Header Width Unit
270+
* @{
271+
*/
272+
273+
#define CRYP_HEADERWIDTHUNIT_WORD 0x00000000U /*!< By default, header size unit is word */
274+
#define CRYP_HEADERWIDTHUNIT_BYTE 0x00000001U /*!< By default, header size unit is byte */
275+
262276
/**
263277
* @}
264278
*/
@@ -565,6 +579,13 @@ uint32_t HAL_CRYP_GetError(CRYP_HandleTypeDef *hcryp);
565579
#define IS_CRYP_INIT(CONFIG)(((CONFIG) == CRYP_KEYIVCONFIG_ALWAYS) || \
566580
((CONFIG) == CRYP_KEYIVCONFIG_ONCE))
567581

582+
#define IS_CRYP_BUFFERSIZE(ALGO, DATAWIDTH, SIZE) \
583+
(((((ALGO) == CRYP_AES_CTR)) && \
584+
((((DATAWIDTH) == CRYP_DATAWIDTHUNIT_WORD) && (((SIZE) % 4U) == 0U)) || \
585+
(((DATAWIDTH) == CRYP_DATAWIDTHUNIT_BYTE) && (((SIZE) % 16U) == 0U)))) || \
586+
(((ALGO) == CRYP_AES_ECB) || ((ALGO) == CRYP_AES_CBC) || \
587+
((ALGO)== CRYP_AES_GCM_GMAC) || ((ALGO) == CRYP_AES_CCM)))
588+
568589
/**
569590
* @}
570591
*/

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_fmac.h

+60-86
Large diffs are not rendered by default.

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio_ex.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ extern "C" {
8282
#endif /* TIM5 */
8383
#define GPIO_AF2_TIM8 ((uint8_t)0x02) /* TIM8 Alternate Function mapping */
8484
#define GPIO_AF2_TIM15 ((uint8_t)0x02) /* TIM15 Alternate Function mapping */
85+
#define GPIO_AF2_TIM16 ((uint8_t)0x02) /* TIM16 Alternate Function mapping */
8586
#if defined(TIM20)
8687
#define GPIO_AF2_TIM20 ((uint8_t)0x02) /* TIM20 Alternate Function mapping */
8788
#endif /* TIM20 */
@@ -214,6 +215,7 @@ extern "C" {
214215
* @brief AF 9 selection
215216
*/
216217
#define GPIO_AF9_TIM1 ((uint8_t)0x09) /* TIM1 Alternate Function mapping */
218+
#define GPIO_AF9_TIM8 ((uint8_t)0x09) /* TIM8 Alternate Function mapping */
217219
#define GPIO_AF9_TIM15 ((uint8_t)0x09) /* TIM15 Alternate Function mapping */
218220
#define GPIO_AF9_TIM1_COMP1 ((uint8_t)0x09) /* TIM1/COMP1 Break in Alternate Function mapping */
219221
#define GPIO_AF9_TIM8_COMP1 ((uint8_t)0x09) /* TIM8/COMP1 Break in Alternate Function mapping */
@@ -245,14 +247,16 @@ extern "C" {
245247
#define GPIO_AF11_FDCAN3 ((uint8_t)0x0B) /* FDCAN3 Alternate Function mapping */
246248
#endif /* FDCAN3 */
247249
#define GPIO_AF11_TIM1 ((uint8_t)0x0B) /* TIM1 Alternate Function mapping */
250+
#define GPIO_AF11_TIM8 ((uint8_t)0x0B) /* TIM8 Alternate Function mapping */
248251
#define GPIO_AF11_TIM8_COMP1 ((uint8_t)0x0B) /* TIM8/COMP1 Break in Alternate Function mapping */
249252
#define GPIO_AF11_LPTIM1 ((uint8_t)0x0B) /* LPTIM1 Alternate Function mapping */
250253

251254
/**
252255
* @brief AF 12 selection
253256
*/
254257
#define GPIO_AF12_LPUART1 ((uint8_t)0x0C) /* LPUART1 Alternate Function mapping */
255-
#define GPIO_AF12_TIM1_COMP1 ((uint8_t)0x0C) /* TIM8/COMP2 Break in Alternate Function mapping */
258+
#define GPIO_AF12_TIM1 ((uint8_t)0x0C) /* TIM1 Alternate Function mapping */
259+
#define GPIO_AF12_TIM1_COMP1 ((uint8_t)0x0C) /* TIM1/COMP1 Break in Alternate Function mapping */
256260
#define GPIO_AF12_TIM1_COMP2 ((uint8_t)0x0C) /* TIM1/COMP2 Break in Alternate Function mapping */
257261
#if defined(HRTIM1)
258262
#define GPIO_AF12_HRTIM1 ((uint8_t)0x0C) /* HRTIM1 Alternate Function mapping */

0 commit comments

Comments
 (0)