Bita Sobhani

Timer Callback problem - MC1321X

Discussion created by Bita Sobhani on Oct 29, 2008
Latest reply on Oct 29, 2008 by Bita Sobhani

Hi all
I am working on Mc1321x.
I want to insert a dalay of for example 10 seconds inside the code. I did it as below:

#define mDelayTime_c     TmrSeconds(10)
.
.
.
TimeFlag=0;
TMR_StartSingleShotTimer(DelayTimerId,mDelayTime_c,DelayTimerCallBack);
while(TimeFlag==0){}
TimeFlag=0;
.
.
.

void DelayTimerCallBack
  (
  tmrTimerID_t  timerId
  )
{
  (void) timerId;
 
  TimeFlag=1; 
 
}

All variables are defined as global.
But this code does not work. The problem is that the while loop does not permit timer callback to occur.
what should I do.

Thanks a lot
 

Added p/n to subject.



Message Edited by NLFSJ on 2008-10-29 09:43 AM

Outcomes