142 #define VECT_TAB_OFFSET 0x00 174 __I uint8_t
AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
185 #ifdef DATA_IN_ExtSRAM 186 static void SystemInit_ExtMemCtl(
void);
208 #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) 209 SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2));
214 RCC->CR |= (uint32_t)0x00000001;
217 RCC->CFGR = 0x00000000;
220 RCC->CR &= (uint32_t)0xFEF6FFFF;
223 RCC->PLLCFGR = 0x24003010;
226 RCC->CR &= (uint32_t)0xFFFBFFFF;
229 RCC->CIR = 0x00000000;
231 #ifdef DATA_IN_ExtSRAM 232 SystemInit_ExtMemCtl();
287 uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
346 __IO uint32_t StartUpCounter = 0, HSEStatus = 0;
360 HSEStatus = (uint32_t)0x01;
364 HSEStatus = (uint32_t)0x00;
367 if (HSEStatus == (uint32_t)0x01)
383 RCC->PLLCFGR =
PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) |
419 #ifdef DATA_IN_ExtSRAM 428 void SystemInit_ExtMemCtl(
void)
451 RCC->AHB1ENR = 0x00000078;
454 GPIOD->AFR[0] = 0x00cc00cc;
455 GPIOD->AFR[1] = 0xcc0ccccc;
457 GPIOD->MODER = 0xaaaa0a0a;
459 GPIOD->OSPEEDR = 0xffff0f0f;
461 GPIOD->OTYPER = 0x00000000;
463 GPIOD->PUPDR = 0x00000000;
466 GPIOE->AFR[0] = 0xc00cc0cc;
467 GPIOE->AFR[1] = 0xcccccccc;
469 GPIOE->MODER = 0xaaaa828a;
471 GPIOE->OSPEEDR = 0xffffc3cf;
473 GPIOE->OTYPER = 0x00000000;
475 GPIOE->PUPDR = 0x00000000;
478 GPIOF->AFR[0] = 0x00cccccc;
479 GPIOF->AFR[1] = 0xcccc0000;
481 GPIOF->MODER = 0xaa000aaa;
483 GPIOF->OSPEEDR = 0xff000fff;
485 GPIOF->OTYPER = 0x00000000;
487 GPIOF->PUPDR = 0x00000000;
490 GPIOG->AFR[0] = 0x00cccccc;
491 GPIOG->AFR[1] = 0x000000c0;
493 GPIOG->MODER = 0x00080aaa;
495 GPIOG->OSPEEDR = 0x000c0fff;
497 GPIOG->OTYPER = 0x00000000;
499 GPIOG->PUPDR = 0x00000000;
503 RCC->AHB3ENR = 0x00000001;
#define RCC_PLLCFGR_PLLSRC_HSE
void SystemCoreClockUpdate(void)
Update SystemCoreClock variable according to Clock Register Values. The SystemCoreClock variable cont...
#define RCC_APB1ENR_PWREN
CMSIS Cortex-M4 Device Peripheral Access Layer Header File. This file contains all the peripheral reg...
#define HSE_STARTUP_TIMEOUT
Comment the line below if you will not use the peripherals drivers. In this case, these drivers will ...
#define RCC_PLLCFGR_PLLSRC
#define RCC_CFGR_HPRE_DIV1
#define RCC_CFGR_PPRE2_DIV2
__I uint8_t AHBPrescTable[16]
#define HSE_VALUE
Comment the line below if you will not use the peripherals drivers. In this case, these drivers will ...
void SystemInit(void)
Setup the microcontroller system Initialize the Embedded Flash Interface, the PLL and update the Syst...
#define FLASH_ACR_LATENCY_5WS
static void SetSysClock(void)
Configures the System clock source, PLL Multiplier and Divider factors, AHB/APBx prescalers and Flash...
#define RCC_CFGR_PPRE1_DIV4