Skip to content

Update STM32 F1,F2 and L1 HAL and CMSIS drivers #1427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,14 @@ typedef struct
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 85U /*!< LSI Maximum startup time in us */
/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
*/
Expand Down
59 changes: 57 additions & 2 deletions system/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@
#endif /* USE_HAL_DRIVER */

/**
* @brief CMSIS Device version number V4.3.2
* @brief CMSIS Device version number V4.3.3
*/
#define __STM32F1_CMSIS_VERSION_MAIN (0x04) /*!< [31:24] main version */
#define __STM32F1_CMSIS_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
#define __STM32F1_CMSIS_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */
#define __STM32F1_CMSIS_VERSION_SUB2 (0x03) /*!< [15:8] sub2 version */
#define __STM32F1_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
#define __STM32F1_CMSIS_VERSION ((__STM32F1_CMSIS_VERSION_MAIN << 24)\
|(__STM32F1_CMSIS_VERSION_SUB1 << 16)\
Expand Down Expand Up @@ -191,6 +191,61 @@ typedef enum

#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))

/* Use of CMSIS compiler intrinsics for register exclusive access */
/* Atomic 32-bit register access macro to set one or several bits */
#define ATOMIC_SET_BIT(REG, BIT) \
do { \
uint32_t val; \
do { \
val = __LDREXW((__IO uint32_t *)&(REG)) | (BIT); \
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
} while(0)

/* Atomic 32-bit register access macro to clear one or several bits */
#define ATOMIC_CLEAR_BIT(REG, BIT) \
do { \
uint32_t val; \
do { \
val = __LDREXW((__IO uint32_t *)&(REG)) & ~(BIT); \
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
} while(0)

/* Atomic 32-bit register access macro to clear and set one or several bits */
#define ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK) \
do { \
uint32_t val; \
do { \
val = (__LDREXW((__IO uint32_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
} while(0)

/* Atomic 16-bit register access macro to set one or several bits */
#define ATOMIC_SETH_BIT(REG, BIT) \
do { \
uint16_t val; \
do { \
val = __LDREXH((__IO uint16_t *)&(REG)) | (BIT); \
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
} while(0)

/* Atomic 16-bit register access macro to clear one or several bits */
#define ATOMIC_CLEARH_BIT(REG, BIT) \
do { \
uint16_t val; \
do { \
val = __LDREXH((__IO uint16_t *)&(REG)) & ~(BIT); \
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
} while(0)

/* Atomic 16-bit register access macro to clear and set one or several bits */
#define ATOMIC_MODIFYH_REG(REG, CLEARMSK, SETMASK) \
do { \
uint16_t val; \
do { \
val = (__LDREXH((__IO uint16_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
} while(0)


/**
* @}
Expand Down
1 change: 1 addition & 0 deletions system/Drivers/CMSIS/Device/ST/STM32F1xx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ CMSIS Device F1 | CMSIS Core | Was delivered in the full MCU package
Tag v4.3.1 | Tag v5.4.0_cm3 | Tag v1.8.0
Tag v4.3.1 | Tag v5.4.0_cm3 | Tag v1.8.1
Tag v4.3.2 | Tag v5.4.0_cm3 | Tag v1.8.2
Tag v4.3.3 | Tag v5.4.0_cm3 | Tag v1.8.4

The full **STM32CubeF1** MCU package is available [here](https://github.com/STMicroelectronics/STM32CubeF1).

Expand Down
Loading