Rev 50 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 50 | Rev 61 | ||
|---|---|---|---|
| Line 73... | Line 73... | ||
| 73 | 73 | ||
| 74 | /*!< Uncomment the following line if you need to use external SRAM mounted |
74 | /*!< Uncomment the following line if you need to use external SRAM mounted |
| 75 | on STM32L152D_EVAL board as data memory */ |
75 | on STM32L152D_EVAL board as data memory */ |
| 76 | /* #define DATA_IN_ExtSRAM */ |
76 | /* #define DATA_IN_ExtSRAM */ |
| 77 | 77 | ||
| - | 78 | /* Note: Following vector table addresses must be defined in line with linker |
|
| - | 79 | configuration. */ |
|
| 78 | /*!< Uncomment the following line if you need to relocate your vector Table in |
80 | /*!< Uncomment the following line if you need to relocate the vector table |
| - | 81 | anywhere in Flash or Sram, else the vector table is kept at the automatic |
|
| 79 | Internal SRAM. */ |
82 | remap of boot address selected */ |
| - | 83 | /* #define USER_VECT_TAB_ADDRESS */ |
|
| - | 84 | ||
| - | 85 | #if defined(USER_VECT_TAB_ADDRESS) |
|
| - | 86 | /*!< Uncomment the following line if you need to relocate your vector Table |
|
| - | 87 | in Sram else user remap will be done in Flash. */ |
|
| 80 | /* #define VECT_TAB_SRAM */ |
88 | /* #define VECT_TAB_SRAM */ |
| - | 89 | #if defined(VECT_TAB_SRAM) |
|
| - | 90 | #define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field. |
|
| - | 91 | This value must be a multiple of 0x200. */ |
|
| 81 | #define VECT_TAB_OFFSET 0x00U /*!< Vector Table base offset field. |
92 | #define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. |
| 82 | This value must be a multiple of 0x200. */ |
93 | This value must be a multiple of 0x200. */ |
| - | 94 | #else |
|
| - | 95 | #define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field. |
|
| - | 96 | This value must be a multiple of 0x200. */ |
|
| - | 97 | #define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. |
|
| - | 98 | This value must be a multiple of 0x200. */ |
|
| - | 99 | #endif /* VECT_TAB_SRAM */ |
|
| - | 100 | #endif /* USER_VECT_TAB_ADDRESS */ |
|
| - | 101 | ||
| - | 102 | /******************************************************************************/ |
|
| 83 | /** |
103 | /** |
| 84 | * @} |
104 | * @} |
| 85 | */ |
105 | */ |
| 86 | 106 | ||
| 87 | /** @addtogroup STM32L1xx_System_Private_Macros |
107 | /** @addtogroup STM32L1xx_System_Private_Macros |
| Line 141... | Line 161... | ||
| 141 | { |
161 | { |
| 142 | #ifdef DATA_IN_ExtSRAM |
162 | #ifdef DATA_IN_ExtSRAM |
| 143 | SystemInit_ExtMemCtl(); |
163 | SystemInit_ExtMemCtl(); |
| 144 | #endif /* DATA_IN_ExtSRAM */ |
164 | #endif /* DATA_IN_ExtSRAM */ |
| 145 | 165 | ||
| - | 166 | /* Configure the Vector Table location -------------------------------------*/ |
|
| 146 | #ifdef VECT_TAB_SRAM |
167 | #if defined(USER_VECT_TAB_ADDRESS) |
| 147 | SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */ |
168 | SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */ |
| 148 | #else |
- | |
| 149 | SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */ |
169 | #endif /* USER_VECT_TAB_ADDRESS */ |
| 150 | #endif |
- | |
| 151 | } |
170 | } |
| 152 | 171 | ||
| 153 | /** |
172 | /** |
| 154 | * @brief Update SystemCoreClock according to Clock Register Values |
173 | * @brief Update SystemCoreClock according to Clock Register Values |
| 155 | * The SystemCoreClock variable contains the core clock (HCLK), it can |
174 | * The SystemCoreClock variable contains the core clock (HCLK), it can |