Skip to content

Commit b66f113

Browse files
FRASTMfpistm
authored andcommitted
[L5] Update STM32L5xx CMSIS Drivers to v1.0.3
Included in STM32CubeL5 FW v1.3.1 Signed-off-by: Francois Ramu <[email protected]>
1 parent c567a04 commit b66f113

33 files changed

+50229
-0
lines changed

system/Drivers/CMSIS/Device/ST/STM32L5xx/Include/Templates/partition_stm32l552xx.h

+646
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L5xx/Include/Templates/partition_stm32l562xx.h

+648
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/**
2+
******************************************************************************
3+
* @file partition_stm32l5xx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS STM32L5xx Device Header File for Initial Setup for
6+
* Secure / Non-Secure Zones based on CMSIS CORE V5.3.1
7+
*
8+
* The file is included in system_stm32l5xx_s.c in secure application.
9+
* It includes the configuration section that allows to select the
10+
* STM32L5xx device partitioning file for system core secure attributes
11+
* and interrupt secure and non-secure assignment.
12+
*
13+
******************************************************************************
14+
* @attention
15+
*
16+
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
17+
* All rights reserved.</center></h2>
18+
*
19+
* This software component is licensed by ST under Apache License, Version 2.0,
20+
* the "License"; You may not use this file except in compliance with the
21+
* License. You may obtain a copy of the License at:
22+
* opensource.org/licenses/Apache-2.0
23+
*
24+
******************************************************************************
25+
*/
26+
27+
/** @addtogroup CMSIS
28+
* @{
29+
*/
30+
31+
/** @addtogroup stm32l5xx
32+
* @{
33+
*/
34+
35+
#ifndef PARTITION_STM32L5XX_H
36+
#define PARTITION_STM32L5XX_H
37+
38+
#ifdef __cplusplus
39+
extern "C" {
40+
#endif /* __cplusplus */
41+
42+
/** @addtogroup Secure_configuration_section
43+
* @{
44+
*/
45+
46+
#if defined(STM32L552xx)
47+
#include "partition_stm32l552xx.h"
48+
#elif defined(STM32L562xx)
49+
#include "partition_stm32l562xx.h"
50+
#else
51+
#error "Please select first the target STM32L5xx device used in your application (in stm32l5xx.h file)"
52+
#endif
53+
54+
55+
#ifdef __cplusplus
56+
}
57+
#endif /* __cplusplus */
58+
59+
#endif /* PARTITION_STM32L5XX_H */
60+
/**
61+
* @}
62+
*/
63+
64+
/**
65+
* @}
66+
*/
67+
68+
69+
70+
71+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

system/Drivers/CMSIS/Device/ST/STM32L5xx/Include/stm32l552xx.h

+20,385
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32L5xx/Include/stm32l562xx.h

+21,186
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
/**
2+
******************************************************************************
3+
* @file stm32l5xx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS STM32L5xx Device Peripheral Access Layer Header File.
6+
*
7+
* The file is the unique include file that the application programmer
8+
* is using in the C source code, usually in main.c. This file contains:
9+
* - Configuration section that allows to select:
10+
* - The STM32L5xx device used in the target application
11+
* - To use or not the peripheral’s drivers in application code(i.e.
12+
* code will be based on direct access to peripheral’s registers
13+
* rather than drivers API), this option is controlled by
14+
* "#define USE_HAL_DRIVER"
15+
*
16+
******************************************************************************
17+
* @attention
18+
*
19+
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
20+
* All rights reserved.</center></h2>
21+
*
22+
* This software component is licensed by ST under Apache License, Version 2.0,
23+
* the "License"; You may not use this file except in compliance with the
24+
* License. You may obtain a copy of the License at:
25+
* opensource.org/licenses/Apache-2.0
26+
*
27+
******************************************************************************
28+
*/
29+
30+
/** @addtogroup CMSIS
31+
* @{
32+
*/
33+
34+
/** @addtogroup stm32l5xx
35+
* @{
36+
*/
37+
38+
#ifndef STM32L5xx_H
39+
#define STM32L5xx_H
40+
41+
#ifdef __cplusplus
42+
extern "C" {
43+
#endif /* __cplusplus */
44+
45+
/** @addtogroup Library_configuration_section
46+
* @{
47+
*/
48+
49+
/**
50+
* @brief STM32 Family
51+
*/
52+
#if !defined (STM32L5)
53+
#define STM32L5
54+
#endif /* STM32L5 */
55+
56+
/* Uncomment the line below according to the target STM32L5 device used in your
57+
application
58+
*/
59+
60+
#if !defined (STM32L552xx) && !defined (STM32L562xx)
61+
/* #define STM32L552xx */ /*!< STM32L552xx Devices */
62+
/* #define STM32L562xx */ /*!< STM32L562xx Devices */
63+
#endif
64+
65+
/* Tip: To avoid modifying this file each time you need to switch between these
66+
devices, you can define the device in your toolchain compiler preprocessor.
67+
*/
68+
#if !defined (USE_HAL_DRIVER)
69+
/**
70+
* @brief Comment the line below if you will not use the peripherals drivers.
71+
In this case, these drivers will not be included and the application code will
72+
be based on direct access to peripherals registers
73+
*/
74+
/*#define USE_HAL_DRIVER */
75+
#endif /* USE_HAL_DRIVER */
76+
77+
/**
78+
* @brief CMSIS Device version number
79+
*/
80+
#define __STM32L5_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
81+
#define __STM32L5_CMSIS_VERSION_SUB1 (0x00U) /*!< [23:16] sub1 version */
82+
#define __STM32L5_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
83+
#define __STM32L5_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
84+
#define __STM32L5_CMSIS_VERSION ((__STM32L5_CMSIS_VERSION_MAIN << 24U)\
85+
|(__STM32L5_CMSIS_VERSION_SUB1 << 16U)\
86+
|(__STM32L5_CMSIS_VERSION_SUB2 << 8U )\
87+
|(__STM32L5_CMSIS_VERSION_RC))
88+
89+
/**
90+
* @}
91+
*/
92+
93+
/** @addtogroup Device_Included
94+
* @{
95+
*/
96+
97+
#if defined(STM32L552xx)
98+
#include "stm32l552xx.h"
99+
#elif defined(STM32L562xx)
100+
#include "stm32l562xx.h"
101+
#else
102+
#error "Please select first the target STM32L5xx device used in your application (in stm32l5xx.h file)"
103+
#endif
104+
105+
/**
106+
* @}
107+
*/
108+
109+
/** @addtogroup Exported_types
110+
* @{
111+
*/
112+
typedef enum
113+
{
114+
RESET = 0,
115+
SET = !RESET
116+
} FlagStatus, ITStatus;
117+
118+
typedef enum
119+
{
120+
DISABLE = 0,
121+
ENABLE = !DISABLE
122+
} FunctionalState;
123+
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
124+
125+
typedef enum
126+
{
127+
SUCCESS = 0,
128+
ERROR = !SUCCESS
129+
} ErrorStatus;
130+
131+
/**
132+
* @}
133+
*/
134+
135+
136+
/** @addtogroup Exported_macros
137+
* @{
138+
*/
139+
#define SET_BIT(REG, BIT) ((REG) |= (BIT))
140+
141+
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
142+
143+
#define READ_BIT(REG, BIT) ((REG) & (BIT))
144+
145+
#define CLEAR_REG(REG) ((REG) = (0x0))
146+
147+
#define WRITE_REG(REG, VAL) ((REG) = (VAL))
148+
149+
#define READ_REG(REG) ((REG))
150+
151+
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
152+
153+
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
154+
155+
156+
/**
157+
* @}
158+
*/
159+
160+
#if defined (USE_HAL_DRIVER)
161+
#include "stm32l5xx_hal.h"
162+
#endif /* USE_HAL_DRIVER */
163+
164+
#ifdef __cplusplus
165+
}
166+
#endif /* __cplusplus */
167+
168+
#endif /* STM32L5xx_H */
169+
/**
170+
* @}
171+
*/
172+
173+
/**
174+
* @}
175+
*/
176+
177+
178+
179+
180+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/**
2+
******************************************************************************
3+
* @file system_stm32l5xx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS Cortex-M33 Device System Source File for STM32L5xx devices.
6+
******************************************************************************
7+
* @attention
8+
*
9+
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
10+
* All rights reserved.</center></h2>
11+
*
12+
* This software component is licensed by ST under Apache License, Version 2.0,
13+
* the "License"; You may not use this file except in compliance with the
14+
* License. You may obtain a copy of the License at:
15+
* opensource.org/licenses/Apache-2.0
16+
*
17+
******************************************************************************
18+
*/
19+
20+
/** @addtogroup CMSIS
21+
* @{
22+
*/
23+
24+
/** @addtogroup STM32L5xx_system
25+
* @{
26+
*/
27+
28+
#ifndef SYSTEM_STM32L5XX_H
29+
#define SYSTEM_STM32L5XX_H
30+
31+
#ifdef __cplusplus
32+
extern "C" {
33+
#endif
34+
35+
/** @addtogroup STM32L5xx_System_Includes
36+
* @{
37+
*/
38+
#include <stdint.h>
39+
/**
40+
* @}
41+
*/
42+
43+
/** @addtogroup STM32L5xx_System_Exported_Variables
44+
* @{
45+
*/
46+
/* The SystemCoreClock variable is updated in three ways:
47+
1) by calling CMSIS function SystemCoreClockUpdate()
48+
2) by calling HAL API function HAL_RCC_GetSysClockFreq()
49+
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
50+
Note: If you use this function to configure the system clock; then there
51+
is no need to call the 2 first functions listed above, since SystemCoreClock
52+
variable is updated automatically.
53+
*/
54+
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
55+
56+
extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */
57+
extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */
58+
extern const uint32_t MSIRangeTable[16]; /*!< MSI ranges table values */
59+
60+
/**
61+
* @}
62+
*/
63+
64+
/** @addtogroup STM32L5xx_System_Exported_Functions
65+
* @{
66+
*/
67+
68+
/**
69+
\brief Setup the microcontroller system.
70+
71+
Initialize the System and update the SystemCoreClock variable.
72+
*/
73+
extern void SystemInit (void);
74+
75+
76+
/**
77+
\brief Update SystemCoreClock variable.
78+
79+
Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
80+
*/
81+
extern void SystemCoreClockUpdate (void);
82+
83+
84+
/**
85+
\brief Update SystemCoreClock variable from secure application and return its value
86+
when security is implemented in the system (Non-secure callable function).
87+
88+
Returns the SystemCoreClock value with current core Clock retrieved from cpu registers.
89+
*/
90+
extern uint32_t SECURE_SystemCoreClockUpdate(void);
91+
92+
/**
93+
* @}
94+
*/
95+
96+
#ifdef __cplusplus
97+
}
98+
#endif
99+
100+
#endif /* SYSTEM_STM32L5XX_H */
101+
102+
/**
103+
* @}
104+
*/
105+
106+
/**
107+
* @}
108+
*/
109+
110+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)