Skip to content

Update STM32L0 HAL and CMSIS drivers #1463

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 2 commits into from
Aug 10, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -571,6 +571,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -573,6 +573,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -578,6 +578,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -585,6 +585,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -594,6 +594,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -615,6 +615,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -629,6 +629,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -738,6 +738,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -754,6 +754,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -759,6 +759,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -651,6 +651,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -765,6 +765,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -781,6 +781,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -672,6 +672,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -786,6 +786,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

/** @addtogroup Hardware_Constant_Definition
* @{
*/
#define LSI_STARTUP_TIME 200U /*!< 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 @@ -802,6 +802,15 @@ typedef struct
/** @addtogroup Exported_constants
* @{
*/

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

/**
* @}
*/

/** @addtogroup Peripheral_Registers_Bits_Definition
* @{
Expand Down
42 changes: 41 additions & 1 deletion system/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l0xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
*/
#define __STM32L0xx_CMSIS_VERSION_MAIN (0x01) /*!< [31:24] main version */
#define __STM32L0xx_CMSIS_VERSION_SUB1 (0x09) /*!< [23:16] sub1 version */
#define __STM32L0xx_CMSIS_VERSION_SUB2 (0x01) /*!< [15:8] sub2 version */
#define __STM32L0xx_CMSIS_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */
#define __STM32L0xx_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
#define __STM32L0xx_CMSIS_VERSION ((__STM32L0xx_CMSIS_VERSION_MAIN << 24)\
|(__STM32L0xx_CMSIS_VERSION_SUB1 << 16)\
Expand Down Expand Up @@ -208,6 +208,46 @@ typedef enum

#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))

/* Use of interrupt control 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 primask; \
primask = __get_PRIMASK(); \
__set_PRIMASK(1); \
SET_BIT((REG), (BIT)); \
__set_PRIMASK(primask); \
} while(0)

/* Atomic 32-bit register access macro to clear one or several bits */
#define ATOMIC_CLEAR_BIT(REG, BIT) \
do { \
uint32_t primask; \
primask = __get_PRIMASK(); \
__set_PRIMASK(1); \
CLEAR_BIT((REG), (BIT)); \
__set_PRIMASK(primask); \
} 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 primask; \
primask = __get_PRIMASK(); \
__set_PRIMASK(1); \
MODIFY_REG((REG), (CLEARMSK), (SETMASK)); \
__set_PRIMASK(primask); \
} while(0)

/* Atomic 16-bit register access macro to set one or several bits */
#define ATOMIC_SETH_BIT(REG, BIT) ATOMIC_SET_BIT(REG, BIT) \

/* Atomic 16-bit register access macro to clear one or several bits */
#define ATOMIC_CLEARH_BIT(REG, BIT) ATOMIC_CLEAR_BIT(REG, BIT) \

/* Atomic 16-bit register access macro to clear and set one or several bits */
#define ATOMIC_MODIFYH_REG(REG, CLEARMSK, SETMASK) ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK) \

/**
* @}
*/
Expand Down
Loading