AnsweredAssumed Answered

systick always 3 times what it should be

Question asked by mccarty.michael on Jun 18, 2013
Latest reply on Jun 18, 2013 by Clive One
I've tested the example systick app and it worked, but my (keil) app will not work. I'm just trying to blink a light on a 2 sec interval, super frustrating.
the project settings have the system clock at 25mhz. I'm using stm32f4 eval board.

// in that system.c file
#if !defined  (HSE_VALUE) 
  #define HSE_VALUE    ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
#endif /* HSE_VALUE */


/**
 * @brief In the following line adjust the External High Speed oscillator (HSE) Startup 
   Timeout value 
   */
#if !defined  (HSE_STARTUP_TIMEOUT) 
  #define HSE_STARTUP_TIMEOUT    ((uint16_t)0x0500)   /*!< Time out for HSE start up */
#endif /* HSE_STARTUP_TIMEOUT */   


#if !defined  (HSI_VALUE)   
  #define HSI_VALUE    ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/
#endif /* HSI_VALUE */  


// in startup
               case 0x01:
                    if (SysTick_Config(SystemCoreClock / 1000))
                    
                    /* Capture error */ 
                         while (1);
                    }
                    nodeTimeID = data[j++];
               break;

// elsewhere 
               while(1)
               {         
                    GPIOD->BSRRL = GPIO_Pin_14;     // hi 
                    Delay(2000);
                    GPIOD->BSRRH = GPIO_Pin_14;     // lo
                    Delay(2000);     
               }

Outcomes