68#if !defined (HSE_VALUE)
69 #define HSE_VALUE ((uint32_t)25000000)
73#if !defined (HSI_VALUE)
74 #define HSI_VALUE ((uint32_t)16000000)
98#define VECT_TAB_OFFSET 0x00
127 const uint8_t
AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
156 #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
157 SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2));
161 RCC->CR |= (uint32_t)0x00000001;
164 RCC->CFGR = 0x00000000;
167 RCC->CR &= (uint32_t)0xFEF6FFFF;
170 RCC->PLLCFGR = 0x24003010;
173 RCC->CR &= (uint32_t)0xFFFBFFFF;
176 RCC->CIR = 0x00000000;
180 SCB->VTOR = RAMDTCM_BASE | VECT_TAB_OFFSET;
182 SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET;
224 uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
227 tmp = RCC->CFGR & RCC_CFGR_SWS;
242 pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22;
243 pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
248 pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
253 pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
256 pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2;
void SystemInit(void)
Setup the microcontroller system Initialize the Embedded Flash Interface, the PLL and update the Syst...
void SystemCoreClockUpdate(void)
Update SystemCoreClock variable according to Clock Register Values. The SystemCoreClock variable cont...
const uint8_t APBPrescTable[8]
const uint8_t AHBPrescTable[16]