Hi Janos,

I have also used AlarmHybridMicro32C component to get "pulse" values. As you
said I have saved all alarm fire events at pulse variable and sent it
through
TimeSyncAMSend.send(...) . However, again I always get hude clock drifts and
cannot estimate relative hw clock rate of the reference node...

Do you think that I must evaluate my clock synchronization protocol on
another platform which has a stable 1MHZ or MHZ external clock other than
DCO? Because as we see the values that I measure are like waves... Really
changing all the time.. No any stability... The clock drift is not bounded
by 100 ppm as reported for many platforms when we use DCO. It is much more
than that : 1000ppm 900 ppm or more as I get.

What do you suggest Janos?

Really thanks for your valuable helps up to now..

Sinan


10 Ağustos 2010 23:03 tarihinde Janos Sallai <[email protected]>yazdı:

> Sinan,
>
> > I achieved 0x500000 microsecond periodicity by such a way:
> >
> > - I set a milli timer of (of 0x1400 milliseconds)
> > - I store the local time at the first fire ıf the timer at a variable
> called
> > "pulse"
> > - At each timeout of the timer, I add 0x500000 to the "pulse" variable
> > - And I give "pulse" as a parameter to TimeSyncAMSend.send(...)
> This approach assumes that the micro clock is ticking _exactly_ at
> 1048576Hz. The problem is that the frequency of the DCO clock is very
> imprecise and it does have a significant drift as well. It's not
> unseen that you even lose the UART connection to a node because of the
> excessive drift. I'm concerned that this approach will not work.
>
> Why don't you try saving the local time not only in the first but in
> all subsequent timer firings, and compare it to the "expected" time
> (or pulse, as you call it). I bet you'll be seeing huge differences
> already there.
>
> > For the timestamping issue, as I said before I was not using your cc2420
> > stack. I am using the stack at the current tinyos-2.x repository. I have
> > made there a minor change at the CC2420TransmitC and CC2420TransmitP
> files:
> >
> > configuration CC2420TransmitC {
> > ...
> > ...
> > }
> >
> > implementation {
> >
> >   ...
> >   ...
> >   components AlarmHybridMicro32C;
> >   CC2420TransmitP.LTime -> AlarmHybridMicro32C;
> >
> > }
> >
> > module CC2420TransmitP @safe() {
> >   ...
> >    uses interface Alarm<TMicro, uint32_t> as LTime;
> > }
> >
> > implementation {
> >
> >  ...
> >
> > // this method converts a 16-bit timestamp into a 32-bit one
> >   inline uint32_t getTime32(uint16_t captured_time)
> >   {
> >     uint32_t now = call LTime.getNow();
> >
> >     // the captured_time is always in the past
> >     return now - (uint16_t)(now - captured_time);
> >   }
> >
> >   async event void LTime.fired() {
> >
> >   }
> >
> > }
> >
> > Do you think there may be some problem here? Since the captured timestamp
> is
> > 16 bits, the conversion to 32 bits is needed. Am I doing something wrong?
> This seems correct.
>
> Janos
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to