Skip to content

Update STM32L0 HAL and CMSIS drivers #1251

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 5 commits into from
Dec 3, 2020
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
2 changes: 0 additions & 2 deletions cores/arduino/stm32/stm32_def_build.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,6 @@
#define CMSIS_STARTUP_FILE "startup_stm32l052xx.s"
#elif defined(STM32L053xx)
#define CMSIS_STARTUP_FILE "startup_stm32l053xx.s"
#elif defined(STM32L061xx)
#define CMSIS_STARTUP_FILE "startup_stm32l061xx.s"
#elif defined(STM32L062xx)
#define CMSIS_STARTUP_FILE "startup_stm32l062xx.s"
#elif defined(STM32L063xx)
Expand Down
3 changes: 3 additions & 0 deletions libraries/SrcWrapper/src/HAL/stm32yyxx_hal_exti.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
#ifdef STM32H7xx
#include "stm32h7xx_hal_exti.c"
#endif
#ifdef STM32L0xx
#include "stm32l0xx_hal_exti.c"
#endif
#ifdef STM32L1xx
#include "stm32l1xx_hal_exti.c"
#endif
Expand Down
3 changes: 3 additions & 0 deletions libraries/SrcWrapper/src/HAL/stm32yyxx_hal_smbus_ex.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef STM32L0xx
#include "stm32l0xx_hal_smbus_ex.c"
#endif
16 changes: 5 additions & 11 deletions system/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l010x4.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright(c) 2018 STMicroelectronics.
* <h2><center>&copy; Copyright(c) 2016 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
Expand Down Expand Up @@ -2972,7 +2972,10 @@ typedef struct
/* Reset and Clock Control */
/* */
/******************************************************************************/

/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
/* Note: No specific macro feature on this device */

/******************** Bit definition for RCC_CR register ********************/
#define RCC_CR_HSION_Pos (0U)
Expand Down Expand Up @@ -4644,13 +4647,7 @@ typedef struct
/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#if defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) \
|| defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#else
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#endif

/******************* Bit definition for TIM_CR1 register ********************/
#define TIM_CR1_CEN_Pos (0U)
Expand Down Expand Up @@ -5703,9 +5700,6 @@ typedef struct
#define IS_TIM_REMAP_INSTANCE(INSTANCE) (((INSTANCE) == TIM2) || \
((INSTANCE) == TIM21))

/****************** TIM Instances : supporting synchronization ****************/
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)

/******************* TIM Instances : output(s) OCXEC register *****************/
#define IS_TIM_OCXREF_CLEAR_INSTANCE(INSTANCE) ((INSTANCE) == TIM2)

Expand Down
15 changes: 4 additions & 11 deletions system/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l010x6.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright(c) 2018 STMicroelectronics.
* <h2><center>&copy; Copyright(c) 2016 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
Expand Down Expand Up @@ -2981,7 +2981,9 @@ typedef struct
/* Reset and Clock Control */
/* */
/******************************************************************************/

/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#define RCC_HSECSS_SUPPORT /*!< HSE CSS feature activation support */

/******************** Bit definition for RCC_CR register ********************/
Expand Down Expand Up @@ -4697,13 +4699,7 @@ typedef struct
/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#if defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) \
|| defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#else
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#endif

/******************* Bit definition for TIM_CR1 register ********************/
#define TIM_CR1_CEN_Pos (0U)
Expand Down Expand Up @@ -5760,9 +5756,6 @@ typedef struct
#define IS_TIM_REMAP_INSTANCE(INSTANCE) (((INSTANCE) == TIM2) || \
((INSTANCE) == TIM21))

/****************** TIM Instances : supporting synchronization ****************/
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)

/******************* TIM Instances : output(s) OCXEC register *****************/
#define IS_TIM_OCXREF_CLEAR_INSTANCE(INSTANCE) ((INSTANCE) == TIM2)

Expand Down
15 changes: 4 additions & 11 deletions system/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l010x8.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright(c) 2018 STMicroelectronics.
* <h2><center>&copy; Copyright(c) 2016 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
Expand Down Expand Up @@ -2980,7 +2980,9 @@ typedef struct
/* Reset and Clock Control */
/* */
/******************************************************************************/

/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#define RCC_HSECSS_SUPPORT /*!< HSE CSS feature activation support */

/******************** Bit definition for RCC_CR register ********************/
Expand Down Expand Up @@ -4690,13 +4692,7 @@ typedef struct
/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#if defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) \
|| defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#else
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#endif

/******************* Bit definition for TIM_CR1 register ********************/
#define TIM_CR1_CEN_Pos (0U)
Expand Down Expand Up @@ -5755,9 +5751,6 @@ typedef struct
#define IS_TIM_REMAP_INSTANCE(INSTANCE) (((INSTANCE) == TIM2) || \
((INSTANCE) == TIM21))

/****************** TIM Instances : supporting synchronization ****************/
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)

/******************* TIM Instances : output(s) OCXEC register *****************/
#define IS_TIM_OCXREF_CLEAR_INSTANCE(INSTANCE) ((INSTANCE) == TIM2)

Expand Down
15 changes: 4 additions & 11 deletions system/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l010xb.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright(c) 2018 STMicroelectronics.
* <h2><center>&copy; Copyright(c) 2016 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
Expand Down Expand Up @@ -2988,7 +2988,9 @@ typedef struct
/* Reset and Clock Control */
/* */
/******************************************************************************/

/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#define RCC_HSECSS_SUPPORT /*!< HSE CSS feature activation support */

/******************** Bit definition for RCC_CR register ********************/
Expand Down Expand Up @@ -4738,13 +4740,7 @@ typedef struct
/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#if defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) \
|| defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#else
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#endif

/******************* Bit definition for TIM_CR1 register ********************/
#define TIM_CR1_CEN_Pos (0U)
Expand Down Expand Up @@ -5831,9 +5827,6 @@ typedef struct
((INSTANCE) == TIM21) || \
((INSTANCE) == TIM22))

/****************** TIM Instances : supporting synchronization ****************/
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)

/******************* TIM Instances : output(s) OCXEC register *****************/
#define IS_TIM_OCXREF_CLEAR_INSTANCE(INSTANCE) ((INSTANCE) == TIM2)

Expand Down
14 changes: 4 additions & 10 deletions system/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l011xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3081,7 +3081,10 @@ typedef struct
/* Reset and Clock Control */
/* */
/******************************************************************************/

/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
/* Note: No specific macro feature on this device */

/******************** Bit definition for RCC_CR register ********************/
#define RCC_CR_HSION_Pos (0U)
Expand Down Expand Up @@ -4771,13 +4774,7 @@ typedef struct
/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#if defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) \
|| defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#else
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#endif

/******************* Bit definition for TIM_CR1 register ********************/
#define TIM_CR1_CEN_Pos (0U)
Expand Down Expand Up @@ -5845,9 +5842,6 @@ typedef struct
#define IS_TIM_REMAP_INSTANCE(INSTANCE) (((INSTANCE) == TIM2) || \
((INSTANCE) == TIM21))

/****************** TIM Instances : supporting synchronization ****************/
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)

/******************* TIM Instances : output(s) OCXEC register *****************/
#define IS_TIM_OCXREF_CLEAR_INSTANCE(INSTANCE) ((INSTANCE) == TIM2)

Expand Down
14 changes: 4 additions & 10 deletions system/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l021xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3209,7 +3209,10 @@ typedef struct
/* Reset and Clock Control */
/* */
/******************************************************************************/

/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
/* Note: No specific macro feature on this device */

/******************** Bit definition for RCC_CR register ********************/
#define RCC_CR_HSION_Pos (0U)
Expand Down Expand Up @@ -4908,13 +4911,7 @@ typedef struct
/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#if defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) \
|| defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#else
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#endif

/******************* Bit definition for TIM_CR1 register ********************/
#define TIM_CR1_CEN_Pos (0U)
Expand Down Expand Up @@ -5985,9 +5982,6 @@ typedef struct
#define IS_TIM_REMAP_INSTANCE(INSTANCE) (((INSTANCE) == TIM2) || \
((INSTANCE) == TIM21))

/****************** TIM Instances : supporting synchronization ****************/
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)

/******************* TIM Instances : output(s) OCXEC register *****************/
#define IS_TIM_OCXREF_CLEAR_INSTANCE(INSTANCE) ((INSTANCE) == TIM2)

Expand Down
15 changes: 5 additions & 10 deletions system/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l031xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3147,8 +3147,12 @@ typedef struct
/* Reset and Clock Control */
/* */
/******************************************************************************/

/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#define RCC_HSECSS_SUPPORT /*!< HSE CSS feature activation support */
#define RCC_MCO3_SUPPORT /*!<Support MCO3 */
#define RCC_MCO3_AF2_SUPPORT /*!<Support MCO3 on Alternate Function AF0 */

/******************** Bit definition for RCC_CR register ********************/
#define RCC_CR_HSION_Pos (0U)
Expand Down Expand Up @@ -4893,13 +4897,7 @@ typedef struct
/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#if defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) \
|| defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#else
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#endif

/******************* Bit definition for TIM_CR1 register ********************/
#define TIM_CR1_CEN_Pos (0U)
Expand Down Expand Up @@ -5989,9 +5987,6 @@ typedef struct
((INSTANCE) == TIM21) || \
((INSTANCE) == TIM22))

/****************** TIM Instances : supporting synchronization ****************/
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)

/******************* TIM Instances : output(s) OCXEC register *****************/
#define IS_TIM_OCXREF_CLEAR_INSTANCE(INSTANCE) ((INSTANCE) == TIM2)

Expand Down
15 changes: 5 additions & 10 deletions system/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l041xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3275,8 +3275,12 @@ typedef struct
/* Reset and Clock Control */
/* */
/******************************************************************************/

/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#define RCC_HSECSS_SUPPORT /*!< HSE CSS feature activation support */
#define RCC_MCO3_SUPPORT /*!<Support MCO3 */
#define RCC_MCO3_AF2_SUPPORT /*!<Support MCO3 on Alternate Function AF0 */

/******************** Bit definition for RCC_CR register ********************/
#define RCC_CR_HSION_Pos (0U)
Expand Down Expand Up @@ -5030,13 +5034,7 @@ typedef struct
/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#if defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) \
|| defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#else
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#endif

/******************* Bit definition for TIM_CR1 register ********************/
#define TIM_CR1_CEN_Pos (0U)
Expand Down Expand Up @@ -6129,9 +6127,6 @@ typedef struct
((INSTANCE) == TIM21) || \
((INSTANCE) == TIM22))

/****************** TIM Instances : supporting synchronization ****************/
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)

/******************* TIM Instances : output(s) OCXEC register *****************/
#define IS_TIM_OCXREF_CLEAR_INSTANCE(INSTANCE) ((INSTANCE) == TIM2)

Expand Down
15 changes: 5 additions & 10 deletions system/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l051xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3222,8 +3222,12 @@ typedef struct
/* Reset and Clock Control */
/* */
/******************************************************************************/

/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#define RCC_HSECSS_SUPPORT /*!< HSE CSS feature activation support */
#define RCC_MCO3_SUPPORT /*!<Support MCO3 */
#define RCC_MCO3_AF0_SUPPORT /*!<Support MCO3 on Alternate Function AF2 */

/******************** Bit definition for RCC_CR register ********************/
#define RCC_CR_HSION_Pos (0U)
Expand Down Expand Up @@ -5047,13 +5051,7 @@ typedef struct
/*
* @brief Specific device feature definitions (not present on all devices in the STM32L0 family)
*/
#if defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) \
|| defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define TIM_TIM2_REMAP_HSI_SUPPORT /*!<Support remap HSI on TIM2 */
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#else
#define TIM_TIM2_REMAP_HSI48_SUPPORT /*!<Support remap HSI48 on TIM2 */
#endif

/******************* Bit definition for TIM_CR1 register ********************/
#define TIM_CR1_CEN_Pos (0U)
Expand Down Expand Up @@ -6152,9 +6150,6 @@ typedef struct
((INSTANCE) == TIM21) || \
((INSTANCE) == TIM22))

/****************** TIM Instances : supporting synchronization ****************/
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)

/******************* TIM Instances : output(s) OCXEC register *****************/
#define IS_TIM_OCXREF_CLEAR_INSTANCE(INSTANCE) ((INSTANCE) == TIM2)

Expand Down
Loading