File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 30
30
// This function is called after RAM initialization and before main.
31
31
void mbed_sdk_init ()
32
32
{
33
- // Update the SystemCoreClock variable.
34
- SystemCoreClockUpdate ();
35
- HAL_Init ();
36
-
37
33
#if TARGET_STM32F7
38
34
// The mbed_sdk_init can be called either during cold boot or during
39
35
// application boot after bootloader has been executed.
40
36
// In case the bootloader has already enabled the cache,
41
37
// is is needed to not enable it again.
42
- if (SCB -> CCR & (uint32_t )SCB_CCR_IC_Msk == 0 ) { // If ICache is disabled
38
+ if (( SCB -> CCR & (uint32_t )SCB_CCR_IC_Msk ) == 0 ) { // If ICache is disabled
43
39
SCB_EnableICache ();
44
40
}
45
- if (SCB -> CCR & (uint32_t )SCB_CCR_DC_Msk == 0 ) { // If DCache is disabled
41
+ if (( SCB -> CCR & (uint32_t )SCB_CCR_DC_Msk ) == 0 ) { // If DCache is disabled
46
42
SCB_EnableDCache ();
47
43
}
48
44
#endif /* TARGET_STM32F7 */
49
45
46
+ // Update the SystemCoreClock variable.
47
+ SystemCoreClockUpdate ();
48
+ HAL_Init ();
49
+
50
50
/* Configure the System clock source, PLL Multiplier and Divider factors,
51
51
AHB/APBx prescalers and Flash settings */
52
52
SetSysClock ();
You can’t perform that action at this time.
0 commit comments