Skip to content

Commit f040c55

Browse files
authored
Merge pull request stm32duino#263 from fpistm/HAL_update
Update STM32F3xx and STM32L4xx
2 parents 7c37fe8 + a9fd4b7 commit f040c55

File tree

200 files changed

+171483
-154602
lines changed

Some content is hidden

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

200 files changed

+171483
-154602
lines changed

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l431xx.h

+4,954-4,951
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l432xx.h

+4,891-4,888
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l433xx.h

+5,265-5,262
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l442xx.h

+4,942-4,939
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l443xx.h

+5,316-5,313
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l451xx.h

+5,026-5,023
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l452xx.h

+5,287-5,284
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l462xx.h

+5,338-5,335
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l471xx.h

+5,579-5,576
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l475xx.h

+6,484-6,530
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l476xx.h

+6,534-6,580
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l485xx.h

+6,535-6,581
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l486xx.h

+6,585-6,631
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l496xx.h

+7,051-7,097
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4a6xx.h

+7,137-7,183
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4r5xx.h

+7,207-7,256
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4r7xx.h

+7,317-7,366
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4r9xx.h

+8,297-8,346
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4s5xx.h

+7,298-7,347
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4s7xx.h

+7,408-7,457
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4s9xx.h

+8,388-8,437
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4xx.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
*/
119119
#define __STM32L4_CMSIS_VERSION_MAIN (0x01) /*!< [31:24] main version */
120120
#define __STM32L4_CMSIS_VERSION_SUB1 (0x04) /*!< [23:16] sub1 version */
121-
#define __STM32L4_CMSIS_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */
121+
#define __STM32L4_CMSIS_VERSION_SUB2 (0x03) /*!< [15:8] sub2 version */
122122
#define __STM32L4_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
123123
#define __STM32L4_CMSIS_VERSION ((__STM32L4_CMSIS_VERSION_MAIN << 24)\
124124
|(__STM32L4_CMSIS_VERSION_SUB1 << 16)\

system/Drivers/CMSIS/Device/ST/STM32L4xx/Release_Notes.html

+1-1
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32YYxx_CMSIS_version.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* STM32F7: 1.2.2
99
* STM32L0: 1.7.2
1010
* STM32L1: 2.2.3
11-
* STM32L4: 1.4.2
11+
* STM32L4: 1.4.3
1212

1313
Release notes of each STM32YYxx CMSIS available here:
1414

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h

+35-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,27 @@
7070
/** @defgroup HAL_Exported_Constants HAL Exported Constants
7171
* @{
7272
*/
73+
74+
/** @defgroup HAL_TICK_FREQ Tick Frequency
75+
* @{
76+
*/
77+
typedef enum
78+
{
79+
HAL_TICK_FREQ_10HZ = 100U,
80+
HAL_TICK_FREQ_100HZ = 10U,
81+
HAL_TICK_FREQ_1KHZ = 1U,
82+
HAL_TICK_FREQ_DEFAULT = HAL_TICK_FREQ_1KHZ
83+
} HAL_TickFreqTypeDef;
84+
/**
85+
* @}
86+
*/
87+
88+
/**
89+
* @}
90+
*/
91+
/** @defgroup HAL_Exported_Constants HAL Exported Constants
92+
* @{
93+
*/
7394
/** @defgroup SYSCFG_BitAddress_AliasRegion SYSCFG registers bit address in the alias region
7495
* @brief SYSCFG registers bit address in the alias region
7596
* @{
@@ -847,6 +868,16 @@
847868
*/
848869
#endif /* SYSCFG_RCR_PAGE0 */
849870

871+
/**
872+
* @}
873+
*/
874+
/* Private macro -------------------------------------------------------------*/
875+
/** @defgroup HAL_Private_Macros HAL Private Macros
876+
* @{
877+
*/
878+
#define IS_TICKFREQ(FREQ) (((FREQ) == HAL_TICK_FREQ_10HZ) || \
879+
((FREQ) == HAL_TICK_FREQ_100HZ) || \
880+
((FREQ) == HAL_TICK_FREQ_1KHZ))
850881
/**
851882
* @}
852883
*/
@@ -875,10 +906,13 @@ HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
875906
*/
876907
/* Peripheral Control functions ************************************************/
877908
void HAL_IncTick(void);
878-
void HAL_Delay(__IO uint32_t Delay);
909+
void HAL_Delay(uint32_t Delay);
879910
void HAL_SuspendTick(void);
880911
void HAL_ResumeTick(void);
881912
uint32_t HAL_GetTick(void);
913+
uint32_t HAL_GetTickPrio(void);
914+
HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq);
915+
HAL_TickFreqTypeDef HAL_GetTickFreq(void);
882916
uint32_t HAL_GetHalVersion(void);
883917
uint32_t HAL_GetREVID(void);
884918
uint32_t HAL_GetDEVID(void);

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h

+7-6
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,20 @@ typedef enum
7272
} HAL_LockTypeDef;
7373

7474
/* Exported macro ------------------------------------------------------------*/
75+
76+
#define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */
77+
7578
#define HAL_MAX_DELAY 0xFFFFFFFFU
7679

77-
#define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) != RESET)
78-
#define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == RESET)
80+
#define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) == BIT)
81+
#define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == 0U)
7982

8083
#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD_, __DMA_HANDLE_) \
8184
do{ \
8285
(__HANDLE__)->__PPP_DMA_FIELD_ = &(__DMA_HANDLE_); \
8386
(__DMA_HANDLE_).Parent = (__HANDLE__); \
8487
} while(0U)
8588

86-
#define UNUSED(x) ((void)(x))
87-
8889
/** @brief Reset the Handle's State field.
8990
* @param __HANDLE__ specifies the Peripheral Handle.
9091
* @note This macro can be used for the following purpose:
@@ -123,7 +124,7 @@ typedef enum
123124
}while (0U)
124125
#endif /* USE_RTOS */
125126

126-
#if defined ( __GNUC__ )
127+
#if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
127128
#ifndef __weak
128129
#define __weak __attribute__((weak))
129130
#endif /* __weak */
@@ -134,7 +135,7 @@ typedef enum
134135

135136

136137
/* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */
137-
#if defined (__GNUC__) /* GNU Compiler */
138+
#if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
138139
#ifndef __ALIGN_END
139140
#define __ALIGN_END __attribute__ ((aligned (4)))
140141
#endif /* __ALIGN_END */

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c.h

+6-4
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ typedef struct __I2C_HandleTypeDef
248248
#define I2C_NEXT_FRAME ((uint32_t)(I2C_RELOAD_MODE | I2C_SOFTEND_MODE))
249249
#define I2C_FIRST_AND_LAST_FRAME ((uint32_t)I2C_AUTOEND_MODE)
250250
#define I2C_LAST_FRAME ((uint32_t)I2C_AUTOEND_MODE)
251+
#define I2C_LAST_FRAME_NO_STOP ((uint32_t)I2C_SOFTEND_MODE)
251252
/**
252253
* @}
253254
*/
@@ -335,9 +336,9 @@ typedef struct __I2C_HandleTypeDef
335336
* @{
336337
*/
337338
#define I2C_NO_STARTSTOP (0x00000000U)
338-
#define I2C_GENERATE_STOP I2C_CR2_STOP
339-
#define I2C_GENERATE_START_READ (uint32_t)(I2C_CR2_START | I2C_CR2_RD_WRN)
340-
#define I2C_GENERATE_START_WRITE I2C_CR2_START
339+
#define I2C_GENERATE_STOP (uint32_t)(0x80000000U | I2C_CR2_STOP)
340+
#define I2C_GENERATE_START_READ (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN)
341+
#define I2C_GENERATE_START_WRITE (uint32_t)(0x80000000U | I2C_CR2_START)
341342
/**
342343
* @}
343344
*/
@@ -659,7 +660,8 @@ uint32_t HAL_I2C_GetError(I2C_HandleTypeDef *hi2c);
659660
((REQUEST) == I2C_FIRST_AND_NEXT_FRAME) || \
660661
((REQUEST) == I2C_NEXT_FRAME) || \
661662
((REQUEST) == I2C_FIRST_AND_LAST_FRAME) || \
662-
((REQUEST) == I2C_LAST_FRAME))
663+
((REQUEST) == I2C_LAST_FRAME) || \
664+
((REQUEST) == I2C_LAST_FRAME_NO_STOP))
663665

664666
#define I2C_RESET_CR2(__HANDLE__) ((__HANDLE__)->Instance->CR2 &= (uint32_t)~((uint32_t)(I2C_CR2_SADD | I2C_CR2_HEAD10R | I2C_CR2_NBYTES | I2C_CR2_RELOAD | I2C_CR2_RD_WRN)))
665667

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pcd.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,10 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
402402
*/
403403

404404
/* SetENDPOINT */
405-
#define PCD_SET_ENDPOINT(USBx, bEpNum,wRegValue) (*((uint16_t *)(((uint32_t)(&(USBx)->EP0R + (bEpNum) * 2U))))= (uint16_t)(wRegValue))
405+
#define PCD_SET_ENDPOINT(USBx, bEpNum,wRegValue) (*((__IO uint16_t *)(((uint32_t)(&(USBx)->EP0R + (bEpNum) * 2U))))= (uint16_t)(wRegValue))
406406

407407
/* GetENDPOINT */
408-
#define PCD_GET_ENDPOINT(USBx, bEpNum) (*((uint16_t *)(((uint32_t)(&(USBx)->EP0R + (bEpNum) * 2U)))))
408+
#define PCD_GET_ENDPOINT(USBx, bEpNum) (*((__IO uint16_t *)(((uint32_t)(&(USBx)->EP0R + (bEpNum) * 2U)))))
409409

410410

411411

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_smbus.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,9 @@ typedef struct
279279
*/
280280

281281
#define SMBUS_NO_STARTSTOP (0x00000000U)
282-
#define SMBUS_GENERATE_STOP I2C_CR2_STOP
283-
#define SMBUS_GENERATE_START_READ (uint32_t)(I2C_CR2_START | I2C_CR2_RD_WRN)
284-
#define SMBUS_GENERATE_START_WRITE I2C_CR2_START
282+
#define SMBUS_GENERATE_STOP (uint32_t)(0x80000000U | I2C_CR2_STOP)
283+
#define SMBUS_GENERATE_START_READ (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN)
284+
#define SMBUS_GENERATE_START_WRITE (uint32_t)(0x80000000U | I2C_CR2_START)
285285
/**
286286
* @}
287287
*/

0 commit comments

Comments
 (0)