它的底层代码吗?
void SystemInit(void)
{
/* FPU settings
* ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL << 10 * 2) | (3UL << 11 * 2)); /* set CP10 and CP11 Full Access */
#endif
/* Reset the RCC clock configuration to the default reset state(for debug purpose) */
/* Set MSIEN bit */
RCC->CTRLSTS |= (uint32_t)0x00000004;
/* Reset SW, HPRE, PPRE1, PPRE2 and MCO bits */
RCC->CFG &= (uint32_t)0xF8FFC000;
/* Reset HSEON, CLKSSEN and PLLEN bits */
RCC->CTRL &= (uint32_t)0xFEF6FFFF;
/* Reset HSEBYP bit */
RCC->CTRL &= (uint32_t)0xFFFBFFFF;
/* Reset PLLSRC, PLLXTPRE, PLLMUL, MCOPRES and USBPRES bits */
RCC->CFG &= (uint32_t)0x0700FFFF;
/* Reset CFG2 register */
RCC->CFG2 = 0x00000000;
/* Reset CFG3 register */
RCC->CFG3 = 0x00000000;
/* Reset RDCTRL register */
RCC->RDCTRL = 0x00000000;
/* Reset PLLHSIPRE register */
RCC->PLLHSIPRE = 0x00000000;
/* Disable all interrupts and clear pending bits */
RCC->CLKINT = 0x04BF8000;
/* Enable ex mode */
RCC->APB1PCLKEN |= RCC_APB1PCLKEN_PWREN;
RCC->APB1PCLKEN &= (uint32_t)(~RCC_APB1PCLKEN_PWREN);
/* Enable ICACHE and Prefetch Buffer */
FLASH->AC |= (uint32_t)(FLASH_AC_ICAHEN | FLASH_AC_PRFTBFEN);
/* Checks whether the Low Voltage Mode status is SET or RESET */
if((FLASH->AC & FLASH_AC_LVMF) != RESET)
{
/* FLASH Low Voltage Mode Disable */
FLASH->AC &= (uint32_t)(~FLASH_AC_LVMEN);
}
#ifdef DATA_IN_ExtSRAM
SystemInit_ExtMemCtl();
#endif /* DATA_IN_ExtSRAM */
/* Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers */
/* Configure the Flash Latency cycles and enable prefetch buffer */
SetSysClock();
#ifdef VECT_TAB_SRAM
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
#else
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
#endif
}
|