AnsweredAssumed Answered

SystemCoreClock Reading incorrect value?

Question asked by hello188 on Oct 25, 2013
Latest reply on Oct 28, 2013 by Clive One
Hi, I am working with STM32F401 discovery board.
I set up the system_stm32f4xx.c file so that the system clock becomes 84MHz(I used Excel based stm32 clock generator tool to get PLL values).

void Delay(uint32_t dlyTicks){
 msTicks = 0;
 while(msTicks<dlyTicks);
}

SystemInit();
 SystemCoreClockUpdate();//Update variable SystemCoreClock
//SysTick_Config(SystemCoreClock/1000);
 SysTick_Config(84000);

If i do switch to the code that is commented out above, I get in accuracte timing for delay.

The problem is that SystemCoreClock is read as 262500000. I don't understand why. Shouldn't it read 84000000 or 10500000?

The un-commented code works fine and the SysTick seems to be operating at 84MHz clock.

When I generated system_stm32f4xx.c file, I set up the Excel Wizard so that Systick runs at 10.5MHz. Why is it running at 84MHz? and how can I change it correctly??

Thank you.

Outcomes