Geoffrey Werner-Allen wrote:
> Hey Brano:
>
> I noticed that you've added a precision tag to the GlobalTime interface
> provided by TimeSyncC. All well and good. What is the TMilli tag (the
> only one supported!?) supposed to indicate? The granularity of the
> resulting value, or its *accuracy*? I.E., am I still getting a 32kHz
> timebase with get{Local,Global}Time?
it's the granularity of the clock. TMilli is required in HIL
(ActiveMessageC). the reason is that some platforms may only support
TMilli accuracy which would prevent them from complying with
timestamping TEP. optionally, platforms can provide any precision in
HAL. for example, TimeStamping is provided with both TMilli and T32khz
accuracy for cc2420 platforms (chips/cc2420/CC2420TimeSyncMessageC.nc).
FTSP only supports TMilli precision right now, because there is no HIL
component that would provide T32khz LocalTime.
you can find more info about timestamping/timesync in TEPs 132,133
http://tinyos.cvs.sourceforge.net/*checkout*/tinyos/tinyos-2.x/doc/html/tep132.html
http://tinyos.cvs.sourceforge.net/*checkout*/tinyos/tinyos-2.x/doc/html/tep133.html
> I would rather have a 32kHz timebase with some lesser accuracy than a
> TMilli timebase, since that in effect limits the degree to which I can
> evaluate the accuracy of neighboring nodes, right?
again, precision is the granularity. but i agree - it's essential to
have 32khz support for some applications (acoustic ranging or any sound
time of flight apps). the quick and dirty fix is to modify
ftsp/TimeSyncC.nc file, so that it wires T32khz instead of TMilli. in
particular:
replace all TMilli with T32khz
wire TimeSyncP.LocalTime to a component providing T32khz LocalTime
for example:
components Counter32khz32C, new CounterToLocalTimeC(T32khz);
CounterToLocalTimeC.Counter -> Counter32khz32C;
TimeSyncP.LocalTime -> CounterToLocalTimeC;
but this would only compile for platforms that implement Counter32khz32C
component (mica, msp430, and pxa27x do).
i'm cc-ing tos-help, in case anyone else is wondering about the same thing.
cheers,
brano
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help