This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2530 - timer2 - prescaler



Hello,

is it possible to prescale the Timer 2 like you can do for Timer 1? Instead of creating getting a clock tick every 1/32Mhz ==about 31.25 ns, I want an accuracy about 1µs, so that the timer2 can represent with its 40bit and a prescaler of 32 a timeline upto 32*1/32000000*2^(40) = about 12days (1099511,628 seconds).

Thanks in advance

 

  • No, this is not possible. You can view Timer 2 either as a 40-bit timer without prescaling or as a 24-bit timer with arbitrarily programmable prescaler. But regardless, the maximum time it can represent is 34360 s, or 9.5 hours. This timer is intended as a timer for handling radio protocols, and as such, that period is long enough by far.

    If you want to extend the timer, you can set an interrupt on the overflow counter period, and use that interrupt to step a counter variable. This interrupt will be very rare, and as such it will have minimum impact on your system performance.