AnsweredAssumed Answered

Delay Function Without SysTick_Handler Interrupt

Question asked by EYIGEL.Levent on May 27, 2013
Latest reply on May 28, 2013 by knik
Hello ,
I want to try use a function that is without  SysTick_Handler Interrupt :
I wrote this function  :

void DelayUs(int us)
{
unsigned int cnt;

while(us-- >0)
{
   cnt = SysTick_GetCounter(); // get systick counter, ticking each 500nS
   while( (SysTick_GetCounter()-cnt) < 2); // repeat till 2 ticks
}
}

but cnt value is zero , i can't see any value from SysTick_GetCounter() ;
How can i solve this problem ?
Does anyone have any advice  ?

Outcomes