AnsweredAssumed Answered

Timer_sleep error?

Question asked by ravishankar on Jun 30, 2016

: I'm trying to run a project in Eclipse that takes input from a weight sensor and sends it to an online cloud/interface. However, sometimes when I run the code it gets stuck in the timer_sleep function. The function looks like this:

 

void timer_sleep (timer_ticks_t ticks)

{

   timer_delayCount = ticks;

   // Busy wait until the SysTick decrements the counter to zero.

   while (timer_delayCount != 0u)

      ;

}

 

The code gets stuck in the while(timer_delayCount != 0u) loop. Any suggestions on what the problem could be or how I can fix/get around it?

Outcomes