Skip to content

Commit ce6ff0a

Browse files
authored
Merge pull request #14207 from JeanMarcR/STM32WL_JMR
Adding NUCLEO_WL55JC support
2 parents 6ed46ce + 6220ca5 commit ce6ff0a

File tree

253 files changed

+236689
-61
lines changed

Some content is hidden

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

253 files changed

+236689
-61
lines changed

targets/TARGET_STM/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ add_subdirectory(TARGET_STM32L1 EXCLUDE_FROM_ALL)
1515
add_subdirectory(TARGET_STM32L4 EXCLUDE_FROM_ALL)
1616
add_subdirectory(TARGET_STM32L5 EXCLUDE_FROM_ALL)
1717
add_subdirectory(TARGET_STM32WB EXCLUDE_FROM_ALL)
18+
add_subdirectory(TARGET_STM32WL EXCLUDE_FROM_ALL)
1819

1920
add_library(STM INTERFACE)
2021

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_subdirectory(TARGET_STM32WL55xC EXCLUDE_FROM_ALL)
5+
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
6+
7+
add_library(STM32WL INTERFACE)
8+
9+
target_sources(STM32WL
10+
INTERFACE
11+
analogin_device.c
12+
analogout_device.c
13+
flash_api.c
14+
gpio_irq_device.c
15+
pwmout_device.c
16+
serial_device.c
17+
spi_api.c
18+
)
19+
20+
target_include_directories(STM32WL
21+
INTERFACE
22+
.
23+
)
24+
25+
target_link_libraries(STM32WL INTERFACE STM STM32WLCube_FW)

targets/TARGET_STM/TARGET_STM32WL/STM32Cube_FW/CMSIS/stm32wl54xx.h

Lines changed: 11453 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32WL/STM32Cube_FW/CMSIS/stm32wl55xx.h

Lines changed: 11449 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32WL/STM32Cube_FW/CMSIS/stm32wle4xx.h

Lines changed: 9750 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32WL/STM32Cube_FW/CMSIS/stm32wle5xx.h

Lines changed: 9746 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
/**
2+
******************************************************************************
3+
* @file stm32wlxx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS STM32WLxx 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 STM32WLxx 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) 2020 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 stm32wlxx
35+
* @{
36+
*/
37+
38+
#ifndef __STM32WLxx_H
39+
#define __STM32WLxx_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 (STM32WL)
53+
#define STM32WL
54+
#endif /* STM32WL */
55+
56+
/* Uncomment the line below according to the target STM32WL device used in your
57+
application
58+
*/
59+
60+
#if !defined (STM32WL55xx) && !defined (STM32WL54xx) && !defined (STM32WLE5xx) && !defined (STM32WLE4xx)
61+
/* #define STM32WL55xx */ /*!< STM32WL55xx Devices */
62+
/* #define STM32WL54xx */ /*!< STM32WL54xx Devices */
63+
/* #define STM32WLE5xx */ /*!< STM32WLE5xx Devices */
64+
/* #define STM32WLE4xx */ /*!< STM32WLE4xx Devices */
65+
#endif
66+
67+
/* Tip: To avoid modifying this file each time you need to switch between these
68+
devices, you can define the device in your toolchain compiler preprocessor.
69+
*/
70+
#if !defined (USE_HAL_DRIVER)
71+
/**
72+
* @brief Comment the line below if you will not use the peripherals drivers.
73+
In this case, these drivers will not be included and the application code will
74+
be based on direct access to peripherals registers
75+
*/
76+
/*#define USE_HAL_DRIVER */
77+
#endif /* USE_HAL_DRIVER */
78+
79+
/**
80+
* @brief CMSIS Device version number
81+
*/
82+
#define __STM32WLxx_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
83+
#define __STM32WLxx_CMSIS_VERSION_SUB1 (0x00U) /*!< [23:16] sub1 version */
84+
#define __STM32WLxx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
85+
#define __STM32WLxx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
86+
#define __STM32WLxx_CMSIS_DEVICE_VERSION ((__STM32WLxx_CMSIS_VERSION_MAIN << 24)\
87+
|(__STM32WLxx_CMSIS_VERSION_SUB1 << 16)\
88+
|(__STM32WLxx_CMSIS_VERSION_SUB2 << 8 )\
89+
|(__STM32WLxx_CMSIS_VERSION_RC))
90+
91+
/**
92+
* @}
93+
*/
94+
95+
/** @addtogroup Device_Included
96+
* @{
97+
*/
98+
99+
#if defined(STM32WL55xx)
100+
#include "stm32wl55xx.h"
101+
#elif defined(STM32WLE5xx)
102+
#include "stm32wle5xx.h"
103+
#elif defined(STM32WL54xx)
104+
#include "stm32wl54xx.h"
105+
#elif defined(STM32WLE4xx)
106+
#include "stm32wle4xx.h"
107+
#else
108+
#error "Please select first the target STM32WLxx device used in your application, for instance xxx (in stm32wlxx.h file)"
109+
#endif
110+
111+
/**
112+
* @}
113+
*/
114+
115+
/** @addtogroup Exported_types
116+
* @{
117+
*/
118+
typedef enum
119+
{
120+
RESET = 0,
121+
SET = !RESET
122+
} FlagStatus, ITStatus;
123+
124+
typedef enum
125+
{
126+
DISABLE = 0,
127+
ENABLE = !DISABLE
128+
} FunctionalState;
129+
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
130+
131+
typedef enum
132+
{
133+
ERROR = 0,
134+
SUCCESS = !ERROR
135+
} ErrorStatus;
136+
137+
/**
138+
* @}
139+
*/
140+
141+
142+
/** @addtogroup Exported_macros
143+
* @{
144+
*/
145+
#define SET_BIT(REG, BIT) ((REG) |= (BIT))
146+
147+
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
148+
149+
#define READ_BIT(REG, BIT) ((REG) & (BIT))
150+
151+
#define CLEAR_REG(REG) ((REG) = (0x0))
152+
153+
#define WRITE_REG(REG, VAL) ((REG) = (VAL))
154+
155+
#define READ_REG(REG) ((REG))
156+
157+
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
158+
159+
#if defined(CORE_CM0PLUS)
160+
#else
161+
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
162+
#endif
163+
/**
164+
* @}
165+
*/
166+
167+
#if defined (USE_HAL_DRIVER)
168+
#include "stm32wlxx_hal.h"
169+
#endif /* USE_HAL_DRIVER */
170+
171+
#ifdef __cplusplus
172+
}
173+
#endif /* __cplusplus */
174+
175+
#endif /* __STM32WLxx_H */
176+
/**
177+
* @}
178+
*/
179+
180+
/**
181+
* @}
182+
*/
183+
184+
185+
186+
187+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/**
2+
******************************************************************************
3+
* @file system_stm32wlxx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS Cortex Device System Source File for STM32WLxx devices.
6+
******************************************************************************
7+
* @attention
8+
*
9+
* <h2><center>&copy; Copyright (c) 2020 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 stm32wlxx_system
25+
* @{
26+
*/
27+
28+
/**
29+
* @brief Define to prevent recursive inclusion
30+
*/
31+
#ifndef __SYSTEM_STM32WLXX_H
32+
#define __SYSTEM_STM32WLXX_H
33+
34+
#ifdef __cplusplus
35+
extern "C" {
36+
#endif
37+
38+
#include <stdint.h>
39+
40+
/** @addtogroup STM32WLxx_System_Includes
41+
* @{
42+
*/
43+
44+
/**
45+
* @}
46+
*/
47+
48+
49+
/** @addtogroup STM32WLxx_System_Exported_types
50+
* @{
51+
*/
52+
/* The SystemCoreClock variable is updated in three ways:
53+
1) from within HAL_Init()
54+
2) by calling CMSIS function SystemCoreClockUpdate()
55+
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
56+
*/
57+
58+
extern uint32_t SystemCoreClock; /*!< System Clock Frequency */
59+
60+
extern const uint32_t AHBPrescTable[16]; /*!< AHB prescalers table values */
61+
extern const uint32_t APBPrescTable[8]; /*!< APB prescalers table values */
62+
extern const uint32_t MSIRangeTable[16]; /*!< MSI ranges table values */
63+
64+
/**
65+
* @}
66+
*/
67+
68+
/** @addtogroup STM32WLxx_System_Exported_Constants
69+
* @{
70+
*/
71+
72+
/**
73+
* @}
74+
*/
75+
76+
/** @addtogroup STM32WLxx_System_Exported_Macros
77+
* @{
78+
*/
79+
80+
/**
81+
* @}
82+
*/
83+
84+
/** @addtogroup STM32WLxx_System_Exported_Functions
85+
* @{
86+
*/
87+
88+
extern void SystemInit(void);
89+
extern void SystemCoreClockUpdate(void);
90+
/**
91+
* @}
92+
*/
93+
94+
#ifdef __cplusplus
95+
}
96+
#endif
97+
98+
#endif /*__SYSTEM_STM32WLXX_H */
99+
100+
/**
101+
* @}
102+
*/
103+
104+
/**
105+
* @}
106+
*/
107+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)