|
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 */ |
92 | 81 |
|
93 |
| -#if defined(USER_VECT_TAB_ADDRESS) |
94 | 82 | /*!< Uncomment the following line if you need to relocate your vector Table
|
95 | 83 | in SRAM else user remap will be done in FLASH. */
|
96 | 84 | /* #define VECT_TAB_SRAM */
|
| 85 | + |
| 86 | +#if !defined(VECT_TAB_BASE_ADDRESS) |
97 | 87 | #if defined(VECT_TAB_SRAM)
|
98 | 88 | #define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field.
|
99 | 89 | This value must be a multiple of 0x100. */
|
100 | 90 | #else
|
101 | 91 | #define VECT_TAB_BASE_ADDRESS NVM_BASE /*!< Vector Table base address field.
|
102 | 92 | This value must be a multiple of 0x100. */
|
103 | 93 | #endif /* VECT_TAB_SRAM */
|
| 94 | +#endif /* USER_VECT_TAB_ADDRESS */ |
104 | 95 |
|
105 | 96 | #if !defined(VECT_TAB_OFFSET)
|
106 | 97 | #define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table offset field.
|
107 | 98 | This value must be a multiple of 0x100. */
|
108 | 99 | #endif /* VECT_TAB_OFFSET */
|
109 | 100 |
|
110 |
| -#endif /* USER_VECT_TAB_ADDRESS */ |
| 101 | + |
111 | 102 |
|
112 | 103 | /******************************************************************************/
|
113 | 104 |
|
@@ -213,11 +204,7 @@ void SystemInit(void)
|
213 | 204 | }
|
214 | 205 |
|
215 | 206 | /* Configure the Vector Table location */
|
216 |
| -#if defined(USER_VECT_TAB_ADDRESS) |
217 | 207 | 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 */ |
221 | 208 |
|
222 | 209 | /* Store in RAM the AppBase information */
|
223 | 210 | RAM_VR.AppBase = (uint32_t) SCB->VTOR;
|
|
0 commit comments