Question
Delay function in ms how?
Posted on November 22, 2011 at 14:14
Hi,
I need a delay(uint) function for my stm32f103ze project. My IDE is KEIL with STM32 Std.Periph. v3.5.0 I found a snipped in a KEIL example but I don't understand it and I dont know if its correct. volatile unsigned long TimeTick; /*------------------------------------------------------------------------------ Delay function delays number of tick Systicks (happens every 10 ms) *------------------------------------------------------------------------------*/ void Delay (unsigned long tick) { unsigned long timetick; timetick = TimeTick; while ((TimeTick - timetick) < tick); } Do you guys would help me please to find a solution? with regards alex