Skip to content

Commit 71a554b

Browse files
committed
system(WBA): update STM32WBAxx system
Remove duplicate clock definition. Allow VECT_TAB_OFFSET redefinition. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 5d91123 commit 71a554b

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

system/STM32WBAxx/system_stm32wbaxx.c

+9-16
Original file line numberDiff line numberDiff line change
@@ -96,37 +96,32 @@
9696
/** @addtogroup STM32WBAxx_System_Private_Defines
9797
* @{
9898
*/
99-
#if !defined (HSE_VALUE)
100-
#define HSE_VALUE (32000000U) /*!< Value of the External oscillator in Hz */
101-
#endif /* HSE_VALUE */
102-
103-
#if !defined (HSI_VALUE)
104-
#define HSI_VALUE (16000000U) /*!< Value of the Internal oscillator in Hz*/
105-
#endif /* HSI_VALUE */
10699

107100
/* Note: Following vector table addresses must be defined in line with linker
108101
configuration. */
109102
/*!< Uncomment the following line if you need to relocate the vector table
110103
anywhere in Flash or Sram, else the vector table is kept at the automatic
111104
remap of boot address selected */
112-
/* #define USER_VECT_TAB_ADDRESS */
105+
/* #define VECT_TAB_BASE_ADDRESS 0x08000000 */
113106

114-
#if defined(USER_VECT_TAB_ADDRESS)
115107
/*!< Uncomment the following line if you need to relocate your vector Table
116108
in Sram else user remap will be done in Flash. */
117109
/* #define VECT_TAB_SRAM */
110+
111+
#ifndef VECT_TAB_OFFSET
112+
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
113+
This value must be a multiple of 0x200. */
114+
#endif
115+
116+
#ifndef VECT_TAB_BASE_ADDRESS
118117
#if defined(VECT_TAB_SRAM)
119118
#define VECT_TAB_BASE_ADDRESS SRAM1_BASE /*!< Vector Table base address field.
120119
This value must be a multiple of 0x200. */
121-
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
122-
This value must be a multiple of 0x200. */
123120
#else
124121
#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
125122
This value must be a multiple of 0x200. */
126-
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
127-
This value must be a multiple of 0x200. */
128123
#endif /* VECT_TAB_SRAM */
129-
#endif /* USER_VECT_TAB_ADDRESS */
124+
#endif /* VECT_TAB_BASE_ADDRESS */
130125

131126
/******************************************************************************/
132127

@@ -193,9 +188,7 @@ void SystemInit(void)
193188
#endif
194189

195190
/* Configure the Vector Table location -------------------------------------*/
196-
#if defined(USER_VECT_TAB_ADDRESS)
197191
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation */
198-
#endif /* USER_VECT_TAB_ADDRESS */
199192

200193
#if defined(STM32WBAXX_SI_CUT1_0)
201194
/* Work-around for ADC peripheral issue possibly impacting system

0 commit comments

Comments
 (0)