Skip to content

Commit f1d1432

Browse files
committed
system: WL: update STM32WLxx system
Remove duplicate clock definition. Enhance VECT_TAB_OFFSET management. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 3b2a2ee commit f1d1432

File tree

1 file changed

+7
-28
lines changed

1 file changed

+7
-28
lines changed

system/STM32WLxx/system_stm32wlxx.c

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -85,26 +85,6 @@
8585

8686
#include "stm32wlxx.h"
8787

88-
#if !defined (HSE_VALUE)
89-
#define HSE_VALUE (32000000UL) /*!< Value of the External oscillator in Hz */
90-
#endif /* HSE_VALUE */
91-
92-
#if !defined (MSI_VALUE)
93-
#define MSI_VALUE (4000000UL) /*!< Value of the Internal oscillator in Hz*/
94-
#endif /* MSI_VALUE */
95-
96-
#if !defined (HSI_VALUE)
97-
#define HSI_VALUE (16000000UL) /*!< Value of the Internal oscillator in Hz*/
98-
#endif /* HSI_VALUE */
99-
100-
#if !defined (LSI_VALUE)
101-
#define LSI_VALUE (32000UL) /*!< Value of LSI in Hz*/
102-
#endif /* LSI_VALUE */
103-
104-
#if !defined (LSE_VALUE)
105-
#define LSE_VALUE (32768UL) /*!< Value of LSE in Hz*/
106-
#endif /* LSE_VALUE */
107-
10888
/**
10989
* @}
11090
*/
@@ -121,6 +101,13 @@
121101
* @{
122102
*/
123103

104+
#ifndef VECT_TAB_OFFSET
105+
#define VECT_TAB_OFFSET 0x00008000U /*!< Vector Table base offset field.
106+
This value must be a multiple of 0x100. */
107+
#else
108+
#define USER_VECT_TAB_ADDRESS
109+
#endif
110+
124111
/* Note: Following vector table addresses must be defined in line with linker
125112
configuration. */
126113
/*!< Uncomment the following line if you need to relocate CPU1 CM4 and/or CPU2
@@ -135,13 +122,9 @@
135122
#if defined(VECT_TAB_SRAM)
136123
#define VECT_TAB_BASE_ADDRESS SRAM2_BASE /*!< Vector Table base address field.
137124
This value must be a multiple of 0x100. */
138-
#define VECT_TAB_OFFSET 0x00008000U /*!< Vector Table base offset field.
139-
This value must be a multiple of 0x100. */
140125
#else
141126
#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
142127
This value must be a multiple of 0x100. */
143-
#define VECT_TAB_OFFSET 0x00020000U /*!< Vector Table base offset field.
144-
This value must be a multiple of 0x100. */
145128
#endif
146129
#else /* CORE_CM4 */
147130
/*!< Uncomment this line for user vector table remap in Sram else user remap
@@ -150,13 +133,9 @@
150133
#if defined(VECT_TAB_SRAM)
151134
#define VECT_TAB_BASE_ADDRESS SRAM1_BASE /*!< Vector Table base address field.
152135
This value must be a multiple of 0x200. */
153-
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
154-
This value must be a multiple of 0x200. */
155136
#else
156137
#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
157138
This value must be a multiple of 0x200. */
158-
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
159-
This value must be a multiple of 0x200. */
160139
#endif
161140
#endif
162141
#endif

0 commit comments

Comments
 (0)