|
82 | 82 | /** @addtogroup STM32U3xx_System_Private_Defines |
83 | 83 | * @{ |
84 | 84 | */ |
85 | | -#if !defined (HSE_VALUE) |
86 | | - #define HSE_VALUE 32000000U /*!< Value of the External oscillator in Hz */ |
87 | | -#endif /* HSE_VALUE */ |
88 | | - |
89 | | -#if !defined (HSI_VALUE) |
90 | | - #define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ |
91 | | -#endif /* HSI_VALUE */ |
92 | | - |
93 | | -#if !defined (MSIRC0_VALUE) |
94 | | - #define MSIRC0_VALUE 96000000U /*!< Value of the Internal MSI RC0 oscillator in Hz*/ |
95 | | -#endif /* MSI_VALUE */ |
96 | | - |
97 | | -#if !defined (MSIRC1_VALUE) |
98 | | - #define MSIRC1_VALUE 24000000U /*!< Value of the Internal MSI RC1 oscillator in Hz*/ |
99 | | -#endif /* MSI_VALUE */ |
100 | 85 |
|
101 | 86 | /* Note: Following vector table addresses must be defined in line with linker |
102 | 87 | configuration. */ |
103 | | -/*!< Uncomment the following line if you need to relocate the vector table |
104 | | - anywhere in Flash or Sram, else the vector table is kept at the automatic |
105 | | - remap of boot address selected */ |
106 | | -/*#define USER_VECT_TAB_ADDRESS */ |
107 | | - |
108 | | -#if defined(USER_VECT_TAB_ADDRESS) |
109 | 88 | /*!< Uncomment the following line if you need to relocate your vector Table |
110 | 89 | in Sram else user remap will be done in Flash. */ |
111 | 90 | /*#define VECT_TAB_SRAM */ |
| 91 | + |
| 92 | +#ifndef VECT_TAB_OFFSET |
| 93 | +#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. |
| 94 | + This value must be a multiple of 0x200. */ |
| 95 | +#endif /* VECT_TAB_OFFSET */ |
| 96 | + |
| 97 | +#ifndef VECT_TAB_BASE_ADDRESS |
112 | 98 | #if defined(VECT_TAB_SRAM) |
113 | 99 | #define VECT_TAB_BASE_ADDRESS SRAM1_BASE /*!< Vector Table base address field. |
114 | 100 | This value must be a multiple of 0x200. */ |
115 | | -#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. |
116 | | - This value must be a multiple of 0x200. */ |
117 | 101 | #else |
118 | 102 | #define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field. |
119 | 103 | This value must be a multiple of 0x200. */ |
120 | | -#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. |
121 | | - This value must be a multiple of 0x200. */ |
| 104 | + |
122 | 105 | #endif /* VECT_TAB_SRAM */ |
123 | | -#endif /* USER_VECT_TAB_ADDRESS */ |
| 106 | +#endif /* VECT_TAB_BASE_ADDRESS */ |
124 | 107 |
|
125 | 108 | /******************************************************************************/ |
126 | 109 |
|
@@ -179,9 +162,7 @@ void SystemInit(void) |
179 | 162 | #endif |
180 | 163 |
|
181 | 164 | /* Configure the Vector Table location -------------------------------------*/ |
182 | | -#if defined(USER_VECT_TAB_ADDRESS) |
183 | 165 | SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation */ |
184 | | -#endif /* USER_VECT_TAB_ADDRESS */ |
185 | 166 | } |
186 | 167 |
|
187 | 168 | /** |
|
0 commit comments