2013-06-01 05:45 AM
the problem is when i make Delay(1000); it must delay 1second
but it make delay about 3second not 1second . it was 3time slower than the real time volatile uint32_t msTicks; void SysTick_Handler(void) { msTicks++; } void Delay (uint32_t dlyTicks) { uint32_t curTicks; curTicks = msTicks; while ((msTicks - curTicks) < dlyTicks); } SystemCoreClockUpdate(); /* Get Core Clock Frequency */ if (SysTick_Config(SystemCoreClock / 1000)) { /* SysTick 1 msec interrupts */ while (1); /* Capture error */ }2013-06-01 07:36 AM
At a guess, I'd say your HSE_VALUE and/or settings in system_stm32f4xx.c are for an external 25 MHz crystal, and a design (like the F4-Disco) using an 8 MHz crystal. Thus the 3x difference.