Question
Delay Function Without SysTick_Handler Interrupt
Posted on May 27, 2013 at 15:58
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 ?