|
74 | 74 | /** @addtogroup STM32WL3x_System_Private_Defines |
75 | 75 | * @{ |
76 | 76 | */ |
77 | | -#if !defined (HSE_VALUE) |
78 | | -#defineHSE_VALUE (48000000U)/*!< Value of the External oscillator in Hz */ |
79 | | -#endif/* HSE_VALUE */ |
80 | | - |
81 | | -#if !defined (HSI_VALUE) |
82 | | -#defineHSI_VALUE (64000000U)/*!< Value of the Internal oscillator in Hz*/ |
83 | | -#endif/* HSI_VALUE */ |
84 | 77 |
|
85 | 78 | /* Note: Following vector table addresses must be defined in line with linker |
86 | 79 | configuration. */ |
87 | | -/*!< Uncomment the following line if you need to relocate the vector table |
88 | | - anywhere in Flash or Sram, else the vector table is kept at the automatic |
89 | | - remap of boot address selected */ |
90 | | -/* #define USER_VECT_TAB_ADDRESS */ |
| 80 | +/*!< Uncomment the following line and change the address |
| 81 | + if you need to relocate your vector Table at a custom base address (+ VECT_TAB_OFFSET) */ |
| 82 | +/* #define VECT_TAB_BASE_ADDRESS 0x08000000 */ |
91 | 83 |
|
92 | | -#if defined(USER_VECT_TAB_ADDRESS) |
| 84 | +#if !defined(VECT_TAB_OFFSET) |
| 85 | +#defineVECT_TAB_OFFSET 0x00000000U/*!< Vector Table base offset field. |
| 86 | + This value must be a multiple of 0x100. */ |
| 87 | +#endif/* VECT_TAB_OFFSET */ |
| 88 | +#if !defined(VECT_TAB_BASE_ADDRESS) |
93 | 89 | /*!< Uncomment the following line if you need to relocate your vector Table |
94 | 90 | in SRAM else user remap will be done in FLASH. */ |
95 | 91 | /* #define VECT_TAB_SRAM */ |
96 | 92 | #if defined(VECT_TAB_SRAM) |
97 | 93 | #defineVECT_TAB_BASE_ADDRESS SRAM_BASE/*!< Vector Table base address field. |
98 | 94 | This value must be a multiple of 0x100. */ |
99 | | -#defineVECT_TAB_OFFSET 0x00000000U/*!< Vector Table base offset field. |
100 | | - This value must be a multiple of 0x100. */ |
101 | 95 | #else |
102 | 96 | #defineVECT_TAB_BASE_ADDRESS FLASH_BASE/*!< Vector Table base address field. |
103 | 97 | This value must be a multiple of 0x100. */ |
104 | | -#defineVECT_TAB_OFFSET 0x00000000U/*!< Vector Table base offset field. |
105 | | - This value must be a multiple of 0x100. */ |
106 | 98 | #endif/* VECT_TAB_SRAM */ |
107 | | -#endif/* USER_VECT_TAB_ADDRESS */ |
108 | | - |
| 99 | +#endif/* VECT_TAB_BASE_ADDRESS */ |
109 | 100 | /******************************************************************************/ |
110 | 101 |
|
111 | 102 | /*!< HW TRIMMING Defines */ |
@@ -209,11 +200,7 @@ void SystemInit(void) |
209 | 200 | } |
210 | 201 |
|
211 | 202 | /* Configure the Vector Table location */ |
212 | | -#if defined(USER_VECT_TAB_ADDRESS) |
213 | 203 | SCB->VTOR=VECT_TAB_BASE_ADDRESS |VECT_TAB_OFFSET;/* Vector Table Relocation */ |
214 | | -#else |
215 | | -SCB->VTOR= (uint32_t) (__vector_table); |
216 | | -#endif/* USER_VECT_TAB_ADDRESS */ |
217 | 204 |
|
218 | 205 | /* Store in RAM the AppBase information */ |
219 | 206 | RAM_VR.AppBase= (uint32_t)SCB->VTOR; |
|