[Tinyos-help] telos crystal and timers

Eric Decker cire831 at gmail.com
Tue Jun 17 23:47:40 PDT 2008


On Tue, Jun 17, 2008 at 11:25 PM, Shomnat Mitra <shomnat at gmail.com> wrote:

> Thanks for the reply.
>
> One more related question.
>
> I used the LocalTimeMicroC component in Tinyos1.x, and wired the LocalTime
> interface to my application, to measure the time difference between the
> sending of a packet and receiving an ACK(using GenericComm ).
>
> I just did:
>
> sendTime = call LocalTime.read(); // just before sending
>
> and
>
> receiveTime = call LocalTime.read(); // upon receiving the ack packet
>
> and computed
>
> timeDiff = receiveTime - sendTime
>
> This is giving me values like: 14,857
>
> So is this value in exact Microseconds? If it is - then I think I am
> getting decent values: 14.8 ms - time to send a packet and receive its ack.


That is how I would read it.

In T2, I'd use TMilli and the call looks like call LocalTime.get().  Do you
really need uS resolution?

eric


>
>
> Somnath Mitra
>
>
>
> On Wed, Jun 18, 2008 at 12:57 AM, Eric Decker <cire831 at gmail.com> wrote:
>
>>
>>
>> On Tue, Jun 17, 2008 at 8:35 PM, Shomnat Mitra <shomnat at gmail.com> wrote:
>>
>>> Hello ,
>>>
>>> The telosb has a 32768 Hz crystal.
>>>
>>> So the lowest precision of time that it can measure is :
>>>
>>> 1/ 32768 seconds = 30.517us
>>
>>
>> That is the underlying clock running timerB which is used to provide
>> TMilli.
>>
>>>
>>>
>>> So when we use a Timer<TMicro> interface , is this precision we get ?
>>
>>
>> TMicro is actually based on the main system clock running TimerA.  It
>> clocks at 1MHz
>> and the 32K timer is used to calibrate it.  This is the timing source used
>> for TMicro.  You
>> really do get close to 1us ticks.
>>
>> eric
>>
>>
>>>
>>>
>>> What about LocalTime.get() 's precision ?
>>>
>>> Thanks in advance ,
>>> Somnath Mitra
>>>
>>> _______________________________________________
>>> Tinyos-help mailing list
>>> Tinyos-help at millennium.berkeley.edu
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>
>>
>>
>> --
>> Eric B. Decker
>> Senior (over 50 :-) Researcher
>> Autonomous Systems Lab
>> Jack Baskin School of Engineering
>> UCSC
>>
>
>


-- 
Eric B. Decker
Senior (over 50 :-) Researcher
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080617/694f8c75/attachment.htm 


More information about the Tinyos-help mailing list