AnsweredAssumed Answered

systick_config(systemcoreclock / 1000) generate interrupt every 2ms ?

Question asked by arefaydi on Dec 18, 2014
Latest reply on Dec 19, 2014 by arefaydi
Hi all,

I use STM32L152 with discovery board and my compiler is KEIL. 
I know that if we use below code interrupt will occured every 1 ms. 

systick_config(systemcoreclock / 1000) ; // systemcoreclock set 32000000

But in my code every 2 ms .

This is my basic code :

/* Main while loop */
while(1)
     {
          if (system_time-led_blue_time>=1000) 
          {
               LED_BLUE_TOGGLE;
               led_blue_time=system_time;
          }

/* Interrupt */
void SysTick_Handler(void)
{
     system_time++;


Finally i see  2 seconds  led on and 2 seconds led off periodical instead of 1 seconds.

What is my wrong.

Thanks all. 

Outcomes