Преглед на файлове

lpc43xx: don't set the Clock again in M0 core

M0 core is always booted by the M4 core. It means that if we are running
in M0, the clock is always configured.
Grissiom преди 10 години
родител
ревизия
090adcf4c0
променени са 1 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 5 3
      bsp/lpc43xx/Libraries/Device/NXP/LPC43xx/Source/Templates/system_LPC43xx.c

+ 5 - 3
bsp/lpc43xx/Libraries/Device/NXP/LPC43xx/Source/Templates/system_LPC43xx.c

@@ -869,6 +869,7 @@ void SystemCoreClockUpdate (void) {
  *----------------------------------------------------------------------------*/
 void SystemInit (void) {
 
+#ifdef BOOT_PROCESSOR
   #if (__FPU_USED == 1)
     SCB->CPACR |= ((3UL << 10*2) |                 /* set CP10 Full Access */
                    (3UL << 11*2)  );               /* set CP11 Full Access */
@@ -880,9 +881,10 @@ void SystemInit (void) {
   /* Configure PLL0 and PLL1, connect CPU clock to selected clock source */
   SetClock();
 
-  /* Update SystemCoreClock variable */
-  SystemCoreClockUpdate();
-
   /* Configure External Memory Controller */
   SystemInit_ExtMemCtl ();
+#endif
+
+  /* Update SystemCoreClock variable */
+  SystemCoreClockUpdate();
 }