Hello! I''m using cc2530. According to some materials, timer2's period is 320us.I found some codes in zstack(osalTimeUpdate())
elapsedMSec += MAXCALCTICKS * 8 / 25;
remUsTicks += MAXCALCTICKS * 8 % 25;
}
// update converted number with remaining ticks from loop and the
// accumulated remainder from loop
tmp = (ticks320us * 8) + remUsTicks;
// Convert the 320 us ticks into milliseconds and a remainder
elapsedMSec += tmp / 25;
remUsTicks = tmp % 25;
my question is:
1.why do we have to *8 and /25? it seems 320*8/25=102,4(us) not 1ms.
2.where is the Initialization of timer2,i didn't find it in zstack.