Below is where each atmega clocks are used:
* Timer0: 32KHz Timebase for TinyOS Timer functions(components). Remains active during all sleep modes. * Timer1: CPUClk derived timebase for measuring send/receive time of radio packets (SFD) * Timer2: CPUClk derived timebase for "jiffy" timing - IEEE802.15.4 radio timing delays.
* Timer3: not used

If are willing to hack, then you can always hack into TimerM
and make it a 32khz timer since TimerM uses a underlying 32khz clock.

The 'SysTime' component uses Timer2, which is a CPU Clk
(sleeps when CPU sleeps) and it's freq is (I think) 7.xxMHz.
The problem is that, if you play around with Timer2,
the CC2420 stack on micaz might be disrupted.
:No problem on mica2, and it was designed for mica2 originally,
until micaz started to use Timer2 for CC2420 timing stuff...

I don't know about HPLTimer1/2 on micaz...
maybe there is something that resolves the conflict with cc2420?
But by just looking at their file names, I don't think they are for
public use... maybe they are used internally by cc2420 stack. In this
case, you should not touch them... or communication might not work.

Thanks

- jpaek


Tao Wu wrote:
Thanks a lot for the reply.
I have this question is because I need a high frequency timer, like 32KHz.
So far, the TimerM does not provide such granularity.
Actually, it is not very difficult, as long as understanding how to
write ISR in C.
I really appreciate your reply


On Nov 14, 2007 12:56 PM, Michael Schippling <[EMAIL PROTECTED]> wrote:
Near as I can tell the TimerM code uses timer0, via the Clock module.

Then under mica2 there is a SysTime module that uses Timer3.

And under micaz there are HPLTimer1 and HPLTimer2 modules,
plus a TimerJiffy that uses HPLTimer2.

The micaz code should work fine on mica2 as well, so you shouldn't
have to reinvent the wheel...and no, I don't know why it's only
available under micaz...

I also have a bit of, perhaps redundant, Timer3 code that may help
bootstrapping in:
     http://www.etantdonnes.com/Motes/AVR128timers.zip

MS


Tao Wu wrote:
Hi,

Currently, I am implementing a high frequency timer (like 32KHz). I
plan to use the 16 bits timer3 in ATmega128.
The question is that I am not very sure what timers TinyOS 1.X  has used so far.
I think the Timer component uses timer0, but I do not know what timers
other components might use.
Can anyone confirm the compatibility of timers?
Thank you very much.

Best Regards,
Tao
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

--

Jeongyeup Paek
Ph.D. student
Embedded Networks Laboratory
Department of Computer Science
University of Southern California
http://enl.usc.edu/~jpaek
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to