File tree Expand file tree Collapse file tree 5 files changed +25
-16
lines changed
targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI Expand file tree Collapse file tree 5 files changed +25
-16
lines changed Original file line number Diff line number Diff line change 38
38
******************************************************************************
39
39
* @attention
40
40
*
41
- * <h2><center>© COPYRIGHT 2015 STMicroelectronics</center></h2>
41
+ * <h2><center>© COPYRIGHT 2017 STMicroelectronics</center></h2>
42
42
*
43
43
* Redistribution and use in source and binary forms, with or without modification,
44
44
* are permitted provided that the following conditions are met:
@@ -735,11 +735,13 @@ void SystemInit_ExtMemCtl(void)
735
735
/* No pull-up, pull-down for PGx pins */
736
736
GPIOG -> PUPDR = 0x00000000 ;
737
737
738
- /*-- FMC/FSMC Configuration --------------------------------------------------*/
738
+ /*-- FMC/FSMC Configuration --------------------------------------------------*/
739
739
/* Enable the FMC/FSMC interface clock */
740
740
RCC -> AHB3ENR |= 0x00000001 ;
741
-
742
- #if defined(STM32F427xx ) || defined(STM32F437xx ) || defined(STM32F429xx )|| defined(STM32F439xx )
741
+
742
+ #if defined(STM32F427xx ) || defined(STM32F437xx ) || defined(STM32F429xx ) || defined(STM32F439xx )
743
+ /* Delay after an RCC peripheral clock enabling */
744
+ tmp = READ_BIT (RCC -> AHB3ENR , RCC_AHB3ENR_FMCEN );
743
745
/* Configure and enable Bank1_SRAM2 */
744
746
FMC_Bank1 -> BTCR [2 ] = 0x00001011 ;
745
747
FMC_Bank1 -> BTCR [3 ] = 0x00000201 ;
Original file line number Diff line number Diff line change 38
38
******************************************************************************
39
39
* @attention
40
40
*
41
- * <h2><center>© COPYRIGHT 2016 STMicroelectronics</center></h2>
41
+ * <h2><center>© COPYRIGHT 2017 STMicroelectronics</center></h2>
42
42
*
43
43
* Redistribution and use in source and binary forms, with or without modification,
44
44
* are permitted provided that the following conditions are met:
@@ -188,10 +188,6 @@ void SetSysClock(void);
188
188
*/
189
189
void SystemInit (void )
190
190
{
191
- /* FPU settings ------------------------------------------------------------*/
192
- #if (__FPU_PRESENT == 1 ) && (__FPU_USED == 1 )
193
- SCB -> CPACR |= ((3UL << 10 * 2 )|(3UL << 11 * 2 )); /* set CP10 and CP11 Full Access */
194
- #endif
195
191
/* Reset the RCC clock configuration to the default reset state ------------*/
196
192
/* Set HSION bit */
197
193
RCC -> CR |= (uint32_t )0x00000001 ;
@@ -215,13 +211,6 @@ void SystemInit(void)
215
211
SystemInit_ExtMemCtl ();
216
212
#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */
217
213
218
- /* Configure the Vector Table location add offset address ------------------*/
219
- #ifdef VECT_TAB_SRAM
220
- SCB -> VTOR = SRAM_BASE | VECT_TAB_OFFSET ; /* Vector Table Relocation in Internal SRAM */
221
- #else
222
- SCB -> VTOR = NVIC_FLASH_VECTOR_ADDRESS ; /* Vector Table Relocation in Internal FLASH */
223
- #endif
224
-
225
214
/* Configure the Cube driver */
226
215
SystemCoreClock = 16000000 ; // At this stage the HSI is used as system clock
227
216
HAL_Init ();
Original file line number Diff line number Diff line change @@ -197,9 +197,15 @@ __Vectors_Size EQU __Vectors_End - __Vectors
197
197
; Reset handler
198
198
Reset_Handler PROC
199
199
EXPORT Reset_Handler [ WEAK ]
200
+ IMPORT SystemInitPre
201
+ IMPORT HAL_InitPre
200
202
IMPORT SystemInit
201
203
IMPORT __main
202
204
205
+ LDR R0 , =SystemInitPre
206
+ BLX R0
207
+ LDR R0 , =HAL_InitPre
208
+ BLX R0
203
209
LDR R0 , =SystemInit
204
210
BLX R0
205
211
LDR R0 , =__main
Original file line number Diff line number Diff line change @@ -170,9 +170,15 @@ __Vectors_Size EQU __Vectors_End - __Vectors
170
170
; Reset handler
171
171
Reset_Handler PROC
172
172
EXPORT Reset_Handler [ WEAK ]
173
+ IMPORT SystemInitPre
174
+ IMPORT HAL_InitPre
173
175
IMPORT SystemInit
174
176
IMPORT __main
175
177
178
+ LDR R0 , =SystemInitPre
179
+ BLX R0
180
+ LDR R0 , =HAL_InitPre
181
+ BLX R0
176
182
LDR R0 , =SystemInit
177
183
BLX R0
178
184
LDR R0 , =__main
Original file line number Diff line number Diff line change 63
63
SECTION .intvec:CODE:NOROOT( 2 )
64
64
65
65
EXTERN __iar_program_start
66
+ EXTERN SystemInitPre
67
+ EXTERN HAL_InitPre
66
68
EXTERN SystemInit
67
69
PUBLIC __vector_table
68
70
@@ -188,6 +190,10 @@ __vector_table
188
190
SECTION .text:CODE:REORDER:NOROOT( 2 )
189
191
Reset_Handler
190
192
193
+ LDR R0 , =SystemInitPre
194
+ BLX R0
195
+ LDR R0 , =HAL_InitPre
196
+ BLX R0
191
197
LDR R0 , =SystemInit
192
198
BLX R0
193
199
LDR R0 , =__iar_program_start
You can’t perform that action at this time.
0 commit comments