Hi Brano, thank you very much for your response. I'm going to try what you recommend me. I know that with a 32Khz timer it is not possible to get microsecond precision, but it's enough for me.
Regards, Carlos 2009/2/24 Branislav Kusy <[email protected]> > hi carlos, > > the reason why FTSP does not support T32khz is that there is currently no > HIL component providing T32khz time. however, the timestamping code on > cc2420 platforms supports T32khz. in particular, TimeSyncMessageC.nc > provides interfaces with both TMilli and T32khz precision. > > thus i'd suggest you to modify tos/lib/ftsp/TimeSyncC.nc and change Milli > for 32khz in the following 3 lines > ... > provides interface GlobalTime<TMilli>; > ... > components new TimeSyncP(TMilli); > ... > TimeSyncP.Send -> ActiveMessageC.TimeSyncAMSendMilli[AM_TIMESYNCMSG]; > ... > > then you need to provide T32khz LocalTime to TimeSyncP, however, > HilTimerT32khzC does not exist. you need to work around this using > Counter32khz32C and CounterToLocalTimeC, as in > tos/chips/cc2420/CC2420TimeSyncMessageC.nc > > btw. T32khz will not give you microsec precision - a jiffy is ~30us. > > brano > > Carlos Gil Soriano wrote: > >> Hi Marco, >> >> thanks for your prompt response. >> I mean, what I want to do as a first step is to verify that setting up >> FTSP with a microsecond scale is feasible. In order to do this, I have tried >> to modify TestFtsp with no success. >> Is it possible to modify TestFtsp so as to get microsecond precision? >> >> Yours, >> Carlos >> >> 2009/2/24 Marco Antonio Lopez Trinidad <[email protected] <mailto: >> [email protected]>> >> >> >> There is may be a natural precision overflow problem, whether you >> try to change >> from a usec to a msec timing with a unique timer. >> >> The solution can be that your program must drive two timers, one >> that performs >> at usec and the second at msec speed. Your program must check >> whether the first >> or the second timer must be used. >> >> ciao, >> --marco. >> >> > Hi Marco, >> > >> > I've tried with the 32 Khz Alarm, the problem is that when >> changing the >> > precision tag to 32khz instead of TMilli of the timers, I got >> compilation >> > problems. Then, checking TimeSyncC I see that GlobalTime timer ( i >> > understand that is the basic interface of FTSP) is defined with a >> fixed >> > precision of TMilli. >> > So, what I mean is if there is possible to easily change the >> precision of >> > the timers and, if it is possible, what precision tags could be >> used?. >> > >> > Regards, >> > Carlos >> > >> > >> > 2009/2/24 Marco Antonio Lopez Trinidad <[email protected] >> <mailto:[email protected]>> >> >> > >> > > Why do you not try with a 32 kHz alarm? >> > > >> > > --marco. >> > > >> > > > Hi, >> > > > >> > > > I'm evaluating the precision of FTSP on micaz platform. As the >> > > publications >> > > > says, the absolute error should be around a couple of >> microseconds. >> > > > First thing I've tried was the TestFtsp program. It works >> fine but I want >> > > to >> > > > check the limit of precision of FTSP and, because TestFtsp is >> based on >> > > > timers with milliseconds precision, I decided to change them >> for 32Khz >> > > > timers. However, several errors appeared and while checking >> through >> > > > TimeSyncC I've found that changing the precision of the >> timers is not a >> > > > straightforward task. >> > > > Has anybody tried to change the precision of the timers to >> 32Khz instead >> > > of >> > > > the default 1ms (TMilli)? >> > > > >> > > > Any help would be appreciated. >> > > > >> > > > Thanks, >> > > > Carlos >> > > > >> > > >> > > >> > > >> > > >> > >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
