Skip to content

Commit 9c4c951

Browse files
committed
system(wb0): update STM32WB0x system
Remove duplicate clock definition. Allow VECT_TAB_OFFSET redefinition. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 0f8fdca commit 9c4c951

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

system/STM32WB0x/system_stm32wb0x.c

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,39 +75,30 @@
7575
/** @addtogroup STM32WB0x_System_Private_Defines
7676
* @{
7777
*/
78-
#if !defined (HSE_VALUE)
79-
#define HSE_VALUE (32000000U) /*!< Value of the External oscillator in Hz */
80-
#endif /* HSE_VALUE */
81-
82-
#if !defined (HSI_VALUE)
83-
#define HSI_VALUE (64000000U) /*!< Value of the Internal oscillator in Hz*/
84-
#endif /* HSI_VALUE */
8578

8679
/* Note: Following vector table addresses must be defined in line with linker
8780
configuration. */
88-
/*!< Uncomment the following line if you need to relocate the vector table
89-
anywhere in Flash or Sram, else the vector table is kept at the automatic
90-
remap of boot address selected */
91-
/* #define USER_VECT_TAB_ADDRESS */
9281

93-
#if defined(USER_VECT_TAB_ADDRESS)
9482
/*!< Uncomment the following line if you need to relocate your vector Table
9583
in SRAM else user remap will be done in FLASH. */
9684
/* #define VECT_TAB_SRAM */
85+
86+
#if !defined(VECT_TAB_BASE_ADDRESS)
9787
#if defined(VECT_TAB_SRAM)
9888
#define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field.
9989
This value must be a multiple of 0x100. */
10090
#else
10191
#define VECT_TAB_BASE_ADDRESS NVM_BASE /*!< Vector Table base address field.
10292
This value must be a multiple of 0x100. */
10393
#endif /* VECT_TAB_SRAM */
94+
#endif /* USER_VECT_TAB_ADDRESS */
10495

10596
#if !defined(VECT_TAB_OFFSET)
10697
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table offset field.
10798
This value must be a multiple of 0x100. */
10899
#endif /* VECT_TAB_OFFSET */
109100

110-
#endif /* USER_VECT_TAB_ADDRESS */
101+
111102

112103
/******************************************************************************/
113104

@@ -213,11 +204,7 @@ void SystemInit(void)
213204
}
214205

215206
/* Configure the Vector Table location */
216-
#if defined(USER_VECT_TAB_ADDRESS)
217207
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation */
218-
#else
219-
SCB->VTOR = (uint32_t) (__vector_table);
220-
#endif /* USER_VECT_TAB_ADDRESS */
221208

222209
/* Store in RAM the AppBase information */
223210
RAM_VR.AppBase = (uint32_t) SCB->VTOR;

0 commit comments

Comments
 (0)