|
75 | 75 | /** @addtogroup STM32WB0x_System_Private_Defines |
76 | 76 | * @{ |
77 | 77 | */ |
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 */ |
85 | 78 |
|
86 | 79 | /* Note: Following vector table addresses must be defined in line with linker |
87 | 80 | 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 */ |
| 81 | +#if !defined(VECT_TAB_OFFSET) |
| 82 | +#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. |
| 83 | + This value must be a multiple of 0x100. */ |
| 84 | +#endif /* VECT_TAB_OFFSET */ |
92 | 85 |
|
93 | | -#if defined(USER_VECT_TAB_ADDRESS) |
94 | 86 | /*!< Uncomment the following line if you need to relocate your vector Table |
95 | 87 | in SRAM else user remap will be done in FLASH. */ |
96 | 88 | /* #define VECT_TAB_SRAM */ |
| 89 | + |
| 90 | +#if !defined(VECT_TAB_BASE_ADDRESS) |
97 | 91 | #if defined(VECT_TAB_SRAM) |
98 | 92 | #define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field. |
99 | 93 | This value must be a multiple of 0x100. */ |
100 | | -#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. |
101 | | - This value must be a multiple of 0x100. */ |
| 94 | + |
102 | 95 | #else |
103 | 96 | #define VECT_TAB_BASE_ADDRESS NVM_BASE /*!< Vector Table base address field. |
104 | 97 | This value must be a multiple of 0x100. */ |
105 | | -#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. |
106 | | - This value must be a multiple of 0x100. */ |
107 | 98 | #endif /* VECT_TAB_SRAM */ |
108 | | -#endif /* USER_VECT_TAB_ADDRESS */ |
| 99 | +#endif /* VECT_TAB_BASE_ADDRESS */ |
109 | 100 |
|
110 | 101 | /******************************************************************************/ |
111 | 102 |
|
@@ -211,11 +202,7 @@ void SystemInit(void) |
211 | 202 | } |
212 | 203 |
|
213 | 204 | /* Configure the Vector Table location */ |
214 | | -#if defined(USER_VECT_TAB_ADDRESS) |
215 | 205 | SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation */ |
216 | | -#else |
217 | | - SCB->VTOR = (uint32_t) (__vector_table); |
218 | | -#endif /* USER_VECT_TAB_ADDRESS */ |
219 | 206 |
|
220 | 207 | /* Store in RAM the AppBase information */ |
221 | 208 | RAM_VR.AppBase = (uint32_t) SCB->VTOR; |
|
0 commit comments