[Tinyos-help] Timer firing late (IRIS platform). Is this a bug?

2015-03-05 Thread Roadstar Runner
I have  a total of  8 timers in my test app.
3 timers are periodic and fire every 7,500 and 500ms.
Fourth  timer is configured to fire (one shot)  based on certain parameters
on the app. Remining timers are never used.

Occasionally when i configure to the  fourth fire (one shot)  in 8ms, it
fires after more than 25 ms.
I toggled a line and noticed that TimerFrom.fired() in VirtualizeTimerC.nc
does not fire at all for the 25ms duration. SInce my smallest period is
7ms, i should never go longer than 7ms without TimerFrom firing.
I inserted a break point in VirtualizeTimerC.nc::updateFromTimer() to break
execution if ever a value greater than 7ms is passed to
TimerFrom.startOneShotAt() and even that never got caught, meaning that
updateFromTimer() is not the source of the problem.
I delved a little further and toggled a line every time Compare.fired() in
 Atm1281AlarmAsyncP.nc fires and saw that it does not fire for those 25 ms.
My understanding is that the compare register in  Atm1281AlarmAsyncP.nc is
not being loaded with the correct value under some circumstances.
Please advise
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] timer capture in telosb

2014-02-06 Thread Trusit Shah
I want to read frequency between 1Khz to 3Khz using telosb mote. For
reading this i am using gpio timer capture interface GpioCapture. I am
using Timer A1 as the capture pin.

I am calling this event in boot.booted()

 event void Boot.booted()
 {
  call GpioCapture.captureRisingEdge();
 }

but the   async event void Capture.captured( uint16_t time ); is never
triggered.

Is there any other initialization i have to make or some other
interfaces are there to work on such problem.

Even if any other method is there to find freq between 1Khz to 3Khz
please help me on that.

regards

trusit shah
Project Assistant
EEE Department
BITS PILANI GOA CAMPUS
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Timer Help Required

2014-02-05 Thread Sulaiman Rais
I am trying to send a gaussian signal (70khz) from my telosb mote.
Note: I have confiqured Oscilloscope to send data serially rather tha over 
radio to overcome buffer problem (i am doing things step by step) 
a) I changed the adc clock to ADC12OSC (works fine)
b) i changed the timer clock to TMicro and this error pops ups

/opt/tinyos-2.1.2/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc:68:4: warning: 
#warning Accessing TimerA for ADC12
In component `OscilloscopeAppC':
OscilloscopeAppC.nc:30: no match
make: *** [exe0] Error 1

Thanks in advance 
Regards 
Sulaiman Rais
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer not fired

2013-11-02 Thread Mohd Adib Sarijari
Good to hear that you had found a solution. I think besides logging such
that you also could use the LED on the platform.
On Nov 2, 2013 3:25 PM, "Xiaohui Liu"  wrote:

> Hi,
>
> By log I mean a serial message sent from a mote to a PC. I'm using telosb
> and T2.1.1. Log fails because of a bug in my code.
>
> Sent from my iPhone
>
> On Nov 1, 2013, at 6:15 PM, Eric Decker  wrote:
>
>
>
>
> On Fri, Nov 1, 2013 at 2:00 PM, Xiaohui Liu  wrote:
>
>> Hi Micha,
>>
>> How do you know if the timer fails to fire?
>>
>> I experienced the same problem before. Whenever the timer fires, a log is
>> sent to the UART. If no log is received when a timer is supposed to fire,
>> the timer is regarded to fail to fire. This turns out wrong because no log
>> can be also caused by UART failure, which is the case.
>>
>
> what is a "log"?
>
> What platform are you talking about and what version of the software?
>
>
>>
>> -Xiaohui
>>
>>
>>
>> On Friday, August 9, 2013, Ádám Erdélyi wrote:
>>
>>> Hi Micha,
>>>
>>> could you show us the wiring code for the timer, how you initialize the
>>> timers and how you handle the firing event? Does it fire when started by
>>> other functions? (e.g. a simple Timer.start) Did you use the unique()
>>> function at the beginning?
>>>
>>> Cheers,
>>> Adam
>>> On Aug 8, 2013 3:02 PM, "Micha Rappaport" 
>>> wrote:
>>>
 Hello,

 I am using multiple instances of the TimerMilliC component on a telosB
 mote. When I use the timer.startOneShot() command, the timer does not
 always fire. I checked the timer.isRunning() command which returns TRUE!

 Next I checked the times now, t0 and dt which look all promising:
 This works:
 now: 13530, t0: 13529, dt: 2500
 This does not:
 now: 21513, to: 21512, dt: 2500

 Any ideas where else the problem could lie?

 Thanks,
 Micha
 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

>>>
>>
>> --
>> -Xiaohui Liu
>> TelosB
>> TinyOS 2.1.2
>> www.cs.wayne.edu/xliu/
>>
>>
>> ___
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
>
>
> ___
> 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

Re: [Tinyos-help] Timer not fired

2013-11-02 Thread Xiaohui Liu
Hi,

By log I mean a serial message sent from a mote to a PC. I'm using telosb
and T2.1.1. Log fails because of a bug in my code.

Sent from my iPhone

On Nov 1, 2013, at 6:15 PM, Eric Decker  wrote:




On Fri, Nov 1, 2013 at 2:00 PM, Xiaohui Liu  wrote:

> Hi Micha,
>
> How do you know if the timer fails to fire?
>
> I experienced the same problem before. Whenever the timer fires, a log is
> sent to the UART. If no log is received when a timer is supposed to fire,
> the timer is regarded to fail to fire. This turns out wrong because no log
> can be also caused by UART failure, which is the case.
>

what is a "log"?

What platform are you talking about and what version of the software?


>
> -Xiaohui
>
>
>
> On Friday, August 9, 2013, Ádám Erdélyi wrote:
>
>> Hi Micha,
>>
>> could you show us the wiring code for the timer, how you initialize the
>> timers and how you handle the firing event? Does it fire when started by
>> other functions? (e.g. a simple Timer.start) Did you use the unique()
>> function at the beginning?
>>
>> Cheers,
>> Adam
>> On Aug 8, 2013 3:02 PM, "Micha Rappaport"  wrote:
>>
>>> Hello,
>>>
>>> I am using multiple instances of the TimerMilliC component on a telosB
>>> mote. When I use the timer.startOneShot() command, the timer does not
>>> always fire. I checked the timer.isRunning() command which returns TRUE!
>>>
>>> Next I checked the times now, t0 and dt which look all promising:
>>> This works:
>>> now: 13530, t0: 13529, dt: 2500
>>> This does not:
>>> now: 21513, to: 21512, dt: 2500
>>>
>>> Any ideas where else the problem could lie?
>>>
>>> Thanks,
>>> Micha
>>> ___
>>> Tinyos-help mailing list
>>> Tinyos-help@millennium.berkeley.edu
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>
>
> --
> -Xiaohui Liu
> TelosB
> TinyOS 2.1.2
> www.cs.wayne.edu/xliu/
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer not fired

2013-11-01 Thread Eric Decker
On Fri, Nov 1, 2013 at 2:00 PM, Xiaohui Liu  wrote:

> Hi Micha,
>
> How do you know if the timer fails to fire?
>
> I experienced the same problem before. Whenever the timer fires, a log is
> sent to the UART. If no log is received when a timer is supposed to fire,
> the timer is regarded to fail to fire. This turns out wrong because no log
> can be also caused by UART failure, which is the case.
>

what is a "log"?

What platform are you talking about and what version of the software?


>
> -Xiaohui
>
>
>
> On Friday, August 9, 2013, Ádám Erdélyi wrote:
>
>> Hi Micha,
>>
>> could you show us the wiring code for the timer, how you initialize the
>> timers and how you handle the firing event? Does it fire when started by
>> other functions? (e.g. a simple Timer.start) Did you use the unique()
>> function at the beginning?
>>
>> Cheers,
>> Adam
>> On Aug 8, 2013 3:02 PM, "Micha Rappaport"  wrote:
>>
>>> Hello,
>>>
>>> I am using multiple instances of the TimerMilliC component on a telosB
>>> mote. When I use the timer.startOneShot() command, the timer does not
>>> always fire. I checked the timer.isRunning() command which returns TRUE!
>>>
>>> Next I checked the times now, t0 and dt which look all promising:
>>> This works:
>>> now: 13530, t0: 13529, dt: 2500
>>> This does not:
>>> now: 21513, to: 21512, dt: 2500
>>>
>>> Any ideas where else the problem could lie?
>>>
>>> Thanks,
>>> Micha
>>> ___
>>> Tinyos-help mailing list
>>> Tinyos-help@millennium.berkeley.edu
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>
>
> --
> -Xiaohui Liu
> TelosB
> TinyOS 2.1.2
> www.cs.wayne.edu/xliu/
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer not fired

2013-11-01 Thread Xiaohui Liu
Hi Micha,

How do you know if the timer fails to fire?

I experienced the same problem before. Whenever the timer fires, a log is
sent to the UART. If no log is received when a timer is supposed to fire,
the timer is regarded to fail to fire. This turns out wrong because no log
can be also caused by UART failure, which is the case.

-Xiaohui



On Friday, August 9, 2013, Ádám Erdélyi wrote:

> Hi Micha,
>
> could you show us the wiring code for the timer, how you initialize the
> timers and how you handle the firing event? Does it fire when started by
> other functions? (e.g. a simple Timer.start) Did you use the unique()
> function at the beginning?
>
> Cheers,
> Adam
> On Aug 8, 2013 3:02 PM, "Micha Rappaport" 
> >
> wrote:
>
>> Hello,
>>
>> I am using multiple instances of the TimerMilliC component on a telosB
>> mote. When I use the timer.startOneShot() command, the timer does not
>> always fire. I checked the timer.isRunning() command which returns TRUE!
>>
>> Next I checked the times now, t0 and dt which look all promising:
>> This works:
>> now: 13530, t0: 13529, dt: 2500
>> This does not:
>> now: 21513, to: 21512, dt: 2500
>>
>> Any ideas where else the problem could lie?
>>
>> Thanks,
>> Micha
>> ___
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu > 'Tinyos-help@millennium.berkeley.edu');>
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>

-- 
-Xiaohui Liu
TelosB
TinyOS 2.1.2
www.cs.wayne.edu/xliu/
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer not fired

2013-08-08 Thread Ádám Erdélyi
Hi Micha,

could you show us the wiring code for the timer, how you initialize the
timers and how you handle the firing event? Does it fire when started by
other functions? (e.g. a simple Timer.start) Did you use the unique()
function at the beginning?

Cheers,
Adam
On Aug 8, 2013 3:02 PM, "Micha Rappaport"  wrote:

> Hello,
>
> I am using multiple instances of the TimerMilliC component on a telosB
> mote. When I use the timer.startOneShot() command, the timer does not
> always fire. I checked the timer.isRunning() command which returns TRUE!
>
> Next I checked the times now, t0 and dt which look all promising:
> This works:
> now: 13530, t0: 13529, dt: 2500
> This does not:
> now: 21513, to: 21512, dt: 2500
>
> Any ideas where else the problem could lie?
>
> Thanks,
> Micha
> ___
> 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

[Tinyos-help] Timer not fired

2013-08-08 Thread Micha Rappaport
Hello,

I am using multiple instances of the TimerMilliC component on a telosB
mote. When I use the timer.startOneShot() command, the timer does not
always fire. I checked the timer.isRunning() command which returns TRUE!

Next I checked the times now, t0 and dt which look all promising:
This works:
now: 13530, t0: 13529, dt: 2500
This does not:
now: 21513, to: 21512, dt: 2500

Any ideas where else the problem could lie?

Thanks,
Micha
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer error

2012-12-21 Thread Eric Decker
On Fri, Dec 21, 2012 at 2:15 AM, mansooreh mollaie wrote:

> Hi,
> So thanks for your reply!
> I use Tinyos 2.1.1!
> I add this code to TinyschedulerC:
>

Why on earth are you adding code to TinyScheduler?


>  components new TimerMilliC as Timer0
>  Sched.Timer0 -> Timer0
> and this code to schedule file:
>  uses interface Timer as Timer0
> I call Timer0.getNow() but when I compile I receive below error!
> I don't change it, just I add timer and I like to use Timer function in
> it!!
> Help me please! so thanks
>

Well you are doing something really weird with TinyScheduler.   That is why
the compiler is bitching.

I suggest you work through the tutorials until you better understand how
the system is put together before doing strange stuff.

see http://docs.tinyos.net





>
>   --
> *From:* Eric Decker 
> *To:* mansooreh mollaie 
> *Sent:* Friday, December 21, 2012 12:17 PM
> *Subject:* Re: [Tinyos-help] Timer error
>
> first you are using very old code.
>
> you should consider upgrading to tinyos 2.1.2
>
>
> What did you change?   This certainly used to compile.   You should start
> with what you changed.
>
> On Fri, Dec 21, 2012 at 12:31 AM, mansooreh mollaie 
> wrote:
>
> Hi all,
> I like to use Timer in tossim scheduler but it error like this:
>
> /opt/tinyos-2.1.0/tos/lib/timer/AlarmToTimerC.nc:63: scheduler depends on
> a task
> /opt/tinyos-2.1.0/tos/lib/timer/AlarmToTimerC.nc:63: The -fnesc_scheduler
> flag should specify a module
> /opt/tinyos-2.1.0/tos/lib/timer/AlarmToTimerC.nc:63: (the module with the  
> scheduling
> code, even if the scheduler is a configuration)
> /opt/tinyos-2.1.0/tos/lib/timer/VirtualizeTimerC.nc:60: scheduler depends
> on a task
>
> I use HilTimerMilliC! how can I fix this!
>
> I searched it but no answer!
>
> help me please! so thanks
>
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
>
>
>
>


-- 
Eric B. Decker
Senior (over 50 :-) Researcher
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer error

2012-12-21 Thread mansooreh mollaie
Hi,
So thanks for your reply!
I use Tinyos 2.1.1!
I add this code to TinyschedulerC:
 components new TimerMilliC as Timer0
 Sched.Timer0 -> Timer0
and this code to schedule file:
 uses interface Timer as Timer0
I call Timer0.getNow() but when I compile I receive below error!
I don't change it, just I add timer and I like to use Timer function in it!!
Help me please! so thanks



>
> From: Eric Decker 
>To: mansooreh mollaie  
>Sent: Friday, December 21, 2012 12:17 PM
>Subject: Re: [Tinyos-help] Timer error
> 
>
>first you are using very old code.
>
>
>you should consider upgrading to tinyos 2.1.2
>
>
>
>
>What did you change?   This certainly used to compile.   You should start with 
>what you changed.
>
>
>On Fri, Dec 21, 2012 at 12:31 AM, mansooreh mollaie  
>wrote:
>
>Hi all,
>>I like to use Timer in tossim scheduler but it error like this:
>>
>>
>>/opt/tinyos-2.1.0/tos/lib/timer/AlarmToTimerC.nc:63: scheduler depends on 
>>a task 
>>/opt/tinyos-2.1.0/tos/lib/timer/AlarmToTimerC.nc:63: The -fnesc_scheduler 
>>flag should specify a module 
>>/opt/tinyos-2.1.0/tos/lib/timer/AlarmToTimerC.nc:63: (the module with the  
>>scheduling code, even if the scheduler is a configuration)
>>/opt/tinyos-2.1.0/tos/lib/timer/VirtualizeTimerC.nc:60: scheduler depends on 
>>a task
>>I use HilTimerMilliC! how can I fix this!
>>I searched it but no answer!
>>help me please! so thanks
>>
>>
>>___
>>Tinyos-help mailing list
>>Tinyos-help@millennium.berkeley.edu
>>https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
>
>-- 
>Eric B. Decker
>Senior (over 50 :-) Researcher
>
>
>
>___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer error

2012-12-21 Thread mansooreh mollaie
Hi all,
I like to use Timer in tossim scheduler but it error like this:

/opt/tinyos-2.1.0/tos/lib/timer/AlarmToTimerC.nc:63: scheduler depends on 
a task 
/opt/tinyos-2.1.0/tos/lib/timer/AlarmToTimerC.nc:63: The -fnesc_scheduler 
flag should specify a module 
/opt/tinyos-2.1.0/tos/lib/timer/AlarmToTimerC.nc:63: (the module with the  
scheduling code, even if the scheduler is a configuration)
/opt/tinyos-2.1.0/tos/lib/timer/VirtualizeTimerC.nc:60: scheduler depends on 
a task
I use HilTimerMilliC! how can I fix this!
I searched it but no answer!
help me please! so thanks
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer Granularity on Telosb

2012-09-30 Thread Eric Decker
Here is how I would approach the problem

I've been doing industry development for 30+ years.   Equally split between
old (mini-computer days) cpu bring up, design, system software and embedded
systems   (early router development at cisco, essentially embedded
systems).

First, I would instrument in some way.

I currently use the TI JTAG FET pod connected to gdb and I use that for all
my main debugging.  That gives me internal visibility of the machine state.
  mspdebug continues to get better.   They've recently added watch points
but I haven't used them yet.

For your problem, I would add a simple trace mechanism that writes to a
circular buffer in memory.  This of course assumes that you have access to
machine state through the above.  This trace mechanism then logs arriving
at certain points in the code and at what time.   I use the uSec ticker
(which assumes the machine doesn't go to sleep).


There is no substitue in my opinion in being able to see what is actually
going on.

for example,  a bunch of i2c drivers have been written but to my knowledge
(expect perhaps for what Steve Ayers has done) no one has actually observed
what the i2c bus has actually behaved like.   So I've rewritten the i2c
driver and have hooked up to the i2c bus a logic analyzer so I can actually
see what the bus is doing.

That is how I would approach the problem



On Sun, Sep 30, 2012 at 11:47 AM, wasif masood  wrote:

>
> Dear Eric,
>
> I am experiencing a very strange behavior which, in my opinion, is not
> possible. I am using this AlarmMicro16C component and I am observing
> that it almost take around 6000 ticks each time the call goes from my
> Application component into the AlarmMicro16C component, when measured using
> Alarm.getNow() command, now some delay is most likely since I am using
> printf commands, but a delay of around 6000 ticks just passed between the
> calls when followed from the application component, where the AlarmMicro16C
> component is delcared to the AlarmMicro16C itself.
>
> I really need some experienced advice here coz I am deep stucked in the
> problems now I never anticipated!
>
>
> On Sun, Sep 30, 2012 at 6:00 AM, Eric Decker  wrote:
>
>>
>> I strongly suspect none of the implementations have been tested for
>> corner cases.
>>
>>
>> On Sat, Sep 29, 2012 at 8:43 AM, wasif masood  wrote:
>>
>>>
>>> Dear Janos,
>>>
>>> There is a strange behaviour I am experiencing with AlarmMicro16C. From
>>> the tinyos general documentation, it is pretty clear that start command
>>> starts the timer from current time to dt, now since we know
>>> that AlarmMicro16C can has a maximum 65535 value so if one intend to give
>>> this value i.e. start(65535), logically it should run uptil 65535 ticks,
>>> but the catch I saw in the implementation is something different, there it
>>> is something like
>>> call Msp430Compare.setEvent( now+remaining ); which means that if "now"
>>> is even 1, now+remaining time will overshot the uint16_t limit so it will
>>> reset the timer to 1. This all means that dt can not be greater than
>>> 65535-now, otherwise now+remaining will become greater than 65535 limit and
>>> the new alarm value would be the overflow value rather the "remaining"
>>> value.
>>>
>>> So According to my understanding, dt should mean that how long you want
>>> the timer/alarm should run, it should not have any dependency over the
>>> current time.  Is my understanding correct, and if soo, how this current
>>> implementation can be changed to compensate for the desire behaviour?
>>>
>>>
>>> Regards,
>>> Wasif!
>>>
>>>
>>> On Tue, Sep 25, 2012 at 5:05 PM, Janos Sallai <
>>> sal...@isis.vanderbilt.edu> wrote:
>>>
 Wasif:

 tos/chips/msp430/timer/AlarmMicro16C.nc is what you're looking for.
 Please note that the us counter is driven by the DCO, which stops when
 the MCU goes to sleep. You will have to prevent the MCU from sleeping
 by implementing McuPowerOverride.lowestState().

 Janos

 On Tue, Sep 25, 2012 at 2:37 AM, wasif masood 
 wrote:
 >
 > Thanks Eric, I have been through a alot of these posts. So far, I
 think, the
 > solution  I am looking for, is not answered in any of them. Either
 there
 > isTMicro packet timestamping being discussed or the TMicro counters
 are
 > explained just to track the time elasped between two events. But I am
 > interested in an Alarm, of TMicro, cable of signaling interrupts
 > periodically, with the granurality of 1 us. So far, the closet I got
 is
 > Alarm32Khz, where I tick ~ 30us, is there any way to wire the Alarm
 to get a
 > granurality of 1us per Tick FOR TELOSB only?
 >
 >
 > On Tue, Sep 25, 2012 at 12:53 AM, Eric Decker 
 wrote:
 >>
 >>
 >> You want Tmicro.
 >>
 >> Search via
 >> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/for 
 >> tmicro.
 >>
 >> This topic has been discussed previou

Re: [Tinyos-help] Timer Granularity on Telosb

2012-09-30 Thread wasif masood
Dear Eric,

I am experiencing a very strange behavior which, in my opinion, is not
possible. I am using this AlarmMicro16C component and I am observing
that it almost take around 6000 ticks each time the call goes from my
Application component into the AlarmMicro16C component, when measured using
Alarm.getNow() command, now some delay is most likely since I am using
printf commands, but a delay of around 6000 ticks just passed between the
calls when followed from the application component, where the AlarmMicro16C
component is delcared to the AlarmMicro16C itself.

I really need some experienced advice here coz I am deep stucked in the
problems now I never anticipated!


On Sun, Sep 30, 2012 at 6:00 AM, Eric Decker  wrote:

>
> I strongly suspect none of the implementations have been tested for corner
> cases.
>
>
> On Sat, Sep 29, 2012 at 8:43 AM, wasif masood  wrote:
>
>>
>> Dear Janos,
>>
>> There is a strange behaviour I am experiencing with AlarmMicro16C. From
>> the tinyos general documentation, it is pretty clear that start command
>> starts the timer from current time to dt, now since we know
>> that AlarmMicro16C can has a maximum 65535 value so if one intend to give
>> this value i.e. start(65535), logically it should run uptil 65535 ticks,
>> but the catch I saw in the implementation is something different, there it
>> is something like
>> call Msp430Compare.setEvent( now+remaining ); which means that if "now"
>> is even 1, now+remaining time will overshot the uint16_t limit so it will
>> reset the timer to 1. This all means that dt can not be greater than
>> 65535-now, otherwise now+remaining will become greater than 65535 limit and
>> the new alarm value would be the overflow value rather the "remaining"
>> value.
>>
>> So According to my understanding, dt should mean that how long you want
>> the timer/alarm should run, it should not have any dependency over the
>> current time.  Is my understanding correct, and if soo, how this current
>> implementation can be changed to compensate for the desire behaviour?
>>
>>
>> Regards,
>> Wasif!
>>
>>
>> On Tue, Sep 25, 2012 at 5:05 PM, Janos Sallai > > wrote:
>>
>>> Wasif:
>>>
>>> tos/chips/msp430/timer/AlarmMicro16C.nc is what you're looking for.
>>> Please note that the us counter is driven by the DCO, which stops when
>>> the MCU goes to sleep. You will have to prevent the MCU from sleeping
>>> by implementing McuPowerOverride.lowestState().
>>>
>>> Janos
>>>
>>> On Tue, Sep 25, 2012 at 2:37 AM, wasif masood 
>>> wrote:
>>> >
>>> > Thanks Eric, I have been through a alot of these posts. So far, I
>>> think, the
>>> > solution  I am looking for, is not answered in any of them. Either
>>> there
>>> > isTMicro packet timestamping being discussed or the TMicro counters are
>>> > explained just to track the time elasped between two events. But I am
>>> > interested in an Alarm, of TMicro, cable of signaling interrupts
>>> > periodically, with the granurality of 1 us. So far, the closet I got is
>>> > Alarm32Khz, where I tick ~ 30us, is there any way to wire the Alarm to
>>> get a
>>> > granurality of 1us per Tick FOR TELOSB only?
>>> >
>>> >
>>> > On Tue, Sep 25, 2012 at 12:53 AM, Eric Decker 
>>> wrote:
>>> >>
>>> >>
>>> >> You want Tmicro.
>>> >>
>>> >> Search via
>>> >> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/ for
>>> tmicro.
>>> >>
>>> >> This topic has been discussed previously.
>>> >>
>>> >>
>>> >>
>>> >> On Mon, Sep 24, 2012 at 5:39 AM, wasif masood 
>>> wrote:
>>> >>>
>>> >>>
>>> >>>
>>> >>> Hi All,
>>> >>>
>>> >>> A quick question, is there a timer with granularity of 1us. more than
>>> >>> Alarm, where I tick~30us?  for Telosb.
>>> >>>
>>> >>> VG,
>>> >>> Wasif Masood
>>> >>>
>>> >>>
>>> >>> ___
>>> >>> Tinyos-help mailing list
>>> >>> Tinyos-help@millennium.berkeley.edu
>>> >>>
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Eric B. Decker
>>> >> Senior (over 50 :-) Researcher
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Wasif Masood
>>> >
>>> >
>>> > ___
>>> > Tinyos-help mailing list
>>> > Tinyos-help@millennium.berkeley.edu
>>> >
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>
>>
>>
>> --
>> Wasif Masood
>>
>>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
>
>
>


-- 
Wasif Masood
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer Granularity on Telosb

2012-09-29 Thread Eric Decker
I strongly suspect none of the implementations have been tested for corner
cases.

On Sat, Sep 29, 2012 at 8:43 AM, wasif masood  wrote:

>
> Dear Janos,
>
> There is a strange behaviour I am experiencing with AlarmMicro16C. From
> the tinyos general documentation, it is pretty clear that start command
> starts the timer from current time to dt, now since we know
> that AlarmMicro16C can has a maximum 65535 value so if one intend to give
> this value i.e. start(65535), logically it should run uptil 65535 ticks,
> but the catch I saw in the implementation is something different, there it
> is something like
> call Msp430Compare.setEvent( now+remaining ); which means that if "now" is
> even 1, now+remaining time will overshot the uint16_t limit so it will
> reset the timer to 1. This all means that dt can not be greater than
> 65535-now, otherwise now+remaining will become greater than 65535 limit and
> the new alarm value would be the overflow value rather the "remaining"
> value.
>
> So According to my understanding, dt should mean that how long you want
> the timer/alarm should run, it should not have any dependency over the
> current time.  Is my understanding correct, and if soo, how this current
> implementation can be changed to compensate for the desire behaviour?
>
>
> Regards,
> Wasif!
>
>
> On Tue, Sep 25, 2012 at 5:05 PM, Janos Sallai 
> wrote:
>
>> Wasif:
>>
>> tos/chips/msp430/timer/AlarmMicro16C.nc is what you're looking for.
>> Please note that the us counter is driven by the DCO, which stops when
>> the MCU goes to sleep. You will have to prevent the MCU from sleeping
>> by implementing McuPowerOverride.lowestState().
>>
>> Janos
>>
>> On Tue, Sep 25, 2012 at 2:37 AM, wasif masood  wrote:
>> >
>> > Thanks Eric, I have been through a alot of these posts. So far, I
>> think, the
>> > solution  I am looking for, is not answered in any of them. Either there
>> > isTMicro packet timestamping being discussed or the TMicro counters are
>> > explained just to track the time elasped between two events. But I am
>> > interested in an Alarm, of TMicro, cable of signaling interrupts
>> > periodically, with the granurality of 1 us. So far, the closet I got is
>> > Alarm32Khz, where I tick ~ 30us, is there any way to wire the Alarm to
>> get a
>> > granurality of 1us per Tick FOR TELOSB only?
>> >
>> >
>> > On Tue, Sep 25, 2012 at 12:53 AM, Eric Decker 
>> wrote:
>> >>
>> >>
>> >> You want Tmicro.
>> >>
>> >> Search via
>> >> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/ for
>> tmicro.
>> >>
>> >> This topic has been discussed previously.
>> >>
>> >>
>> >>
>> >> On Mon, Sep 24, 2012 at 5:39 AM, wasif masood 
>> wrote:
>> >>>
>> >>>
>> >>>
>> >>> Hi All,
>> >>>
>> >>> A quick question, is there a timer with granularity of 1us. more than
>> >>> Alarm, where I tick~30us?  for Telosb.
>> >>>
>> >>> VG,
>> >>> Wasif Masood
>> >>>
>> >>>
>> >>> ___
>> >>> Tinyos-help mailing list
>> >>> Tinyos-help@millennium.berkeley.edu
>> >>>
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Eric B. Decker
>> >> Senior (over 50 :-) Researcher
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Wasif Masood
>> >
>> >
>> > ___
>> > Tinyos-help mailing list
>> > Tinyos-help@millennium.berkeley.edu
>> >
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
>
> --
> Wasif Masood
>
>


-- 
Eric B. Decker
Senior (over 50 :-) Researcher
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer Granularity on Telosb

2012-09-29 Thread wasif masood
in my opinion, it should be just
call Msp430Compare.setEvent( remaining );


On Sat, Sep 29, 2012 at 5:43 PM, wasif masood  wrote:

>
> Dear Janos,
>
> There is a strange behaviour I am experiencing with AlarmMicro16C. From
> the tinyos general documentation, it is pretty clear that start command
> starts the timer from current time to dt, now since we know
> that AlarmMicro16C can has a maximum 65535 value so if one intend to give
> this value i.e. start(65535), logically it should run uptil 65535 ticks,
> but the catch I saw in the implementation is something different, there it
> is something like
> call Msp430Compare.setEvent( now+remaining ); which means that if "now" is
> even 1, now+remaining time will overshot the uint16_t limit so it will
> reset the timer to 1. This all means that dt can not be greater than
> 65535-now, otherwise now+remaining will become greater than 65535 limit and
> the new alarm value would be the overflow value rather the "remaining"
> value.
>
> So According to my understanding, dt should mean that how long you want
> the timer/alarm should run, it should not have any dependency over the
> current time.  Is my understanding correct, and if soo, how this current
> implementation can be changed to compensate for the desire behaviour?
>
>
> Regards,
> Wasif!
>
>
> On Tue, Sep 25, 2012 at 5:05 PM, Janos Sallai 
> wrote:
>
>> Wasif:
>>
>> tos/chips/msp430/timer/AlarmMicro16C.nc is what you're looking for.
>> Please note that the us counter is driven by the DCO, which stops when
>> the MCU goes to sleep. You will have to prevent the MCU from sleeping
>> by implementing McuPowerOverride.lowestState().
>>
>> Janos
>>
>> On Tue, Sep 25, 2012 at 2:37 AM, wasif masood  wrote:
>> >
>> > Thanks Eric, I have been through a alot of these posts. So far, I
>> think, the
>> > solution  I am looking for, is not answered in any of them. Either there
>> > isTMicro packet timestamping being discussed or the TMicro counters are
>> > explained just to track the time elasped between two events. But I am
>> > interested in an Alarm, of TMicro, cable of signaling interrupts
>> > periodically, with the granurality of 1 us. So far, the closet I got is
>> > Alarm32Khz, where I tick ~ 30us, is there any way to wire the Alarm to
>> get a
>> > granurality of 1us per Tick FOR TELOSB only?
>> >
>> >
>> > On Tue, Sep 25, 2012 at 12:53 AM, Eric Decker 
>> wrote:
>> >>
>> >>
>> >> You want Tmicro.
>> >>
>> >> Search via
>> >> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/ for
>> tmicro.
>> >>
>> >> This topic has been discussed previously.
>> >>
>> >>
>> >>
>> >> On Mon, Sep 24, 2012 at 5:39 AM, wasif masood 
>> wrote:
>> >>>
>> >>>
>> >>>
>> >>> Hi All,
>> >>>
>> >>> A quick question, is there a timer with granularity of 1us. more than
>> >>> Alarm, where I tick~30us?  for Telosb.
>> >>>
>> >>> VG,
>> >>> Wasif Masood
>> >>>
>> >>>
>> >>> ___
>> >>> Tinyos-help mailing list
>> >>> Tinyos-help@millennium.berkeley.edu
>> >>>
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Eric B. Decker
>> >> Senior (over 50 :-) Researcher
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Wasif Masood
>> >
>> >
>> > ___
>> > Tinyos-help mailing list
>> > Tinyos-help@millennium.berkeley.edu
>> >
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
>
> --
> Wasif Masood
>
>


-- 
Wasif Masood
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer Granularity on Telosb

2012-09-29 Thread wasif masood
Dear Janos,

There is a strange behaviour I am experiencing with AlarmMicro16C. From the
tinyos general documentation, it is pretty clear that start command starts
the timer from current time to dt, now since we know that AlarmMicro16C can
has a maximum 65535 value so if one intend to give this value i.e.
start(65535), logically it should run uptil 65535 ticks, but the catch I
saw in the implementation is something different, there it is something
like
call Msp430Compare.setEvent( now+remaining ); which means that if "now" is
even 1, now+remaining time will overshot the uint16_t limit so it will
reset the timer to 1. This all means that dt can not be greater than
65535-now, otherwise now+remaining will become greater than 65535 limit and
the new alarm value would be the overflow value rather the "remaining"
value.

So According to my understanding, dt should mean that how long you want the
timer/alarm should run, it should not have any dependency over the current
time.  Is my understanding correct, and if soo, how this current
implementation can be changed to compensate for the desire behaviour?


Regards,
Wasif!

On Tue, Sep 25, 2012 at 5:05 PM, Janos Sallai wrote:

> Wasif:
>
> tos/chips/msp430/timer/AlarmMicro16C.nc is what you're looking for.
> Please note that the us counter is driven by the DCO, which stops when
> the MCU goes to sleep. You will have to prevent the MCU from sleeping
> by implementing McuPowerOverride.lowestState().
>
> Janos
>
> On Tue, Sep 25, 2012 at 2:37 AM, wasif masood  wrote:
> >
> > Thanks Eric, I have been through a alot of these posts. So far, I think,
> the
> > solution  I am looking for, is not answered in any of them. Either there
> > isTMicro packet timestamping being discussed or the TMicro counters are
> > explained just to track the time elasped between two events. But I am
> > interested in an Alarm, of TMicro, cable of signaling interrupts
> > periodically, with the granurality of 1 us. So far, the closet I got is
> > Alarm32Khz, where I tick ~ 30us, is there any way to wire the Alarm to
> get a
> > granurality of 1us per Tick FOR TELOSB only?
> >
> >
> > On Tue, Sep 25, 2012 at 12:53 AM, Eric Decker  wrote:
> >>
> >>
> >> You want Tmicro.
> >>
> >> Search via
> >> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/ for
> tmicro.
> >>
> >> This topic has been discussed previously.
> >>
> >>
> >>
> >> On Mon, Sep 24, 2012 at 5:39 AM, wasif masood 
> wrote:
> >>>
> >>>
> >>>
> >>> Hi All,
> >>>
> >>> A quick question, is there a timer with granularity of 1us. more than
> >>> Alarm, where I tick~30us?  for Telosb.
> >>>
> >>> VG,
> >>> Wasif Masood
> >>>
> >>>
> >>> ___
> >>> Tinyos-help mailing list
> >>> Tinyos-help@millennium.berkeley.edu
> >>>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >>
> >>
> >>
> >>
> >> --
> >> Eric B. Decker
> >> Senior (over 50 :-) Researcher
> >>
> >>
> >
> >
> >
> > --
> > Wasif Masood
> >
> >
> > ___
> > Tinyos-help mailing list
> > Tinyos-help@millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Wasif Masood
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer Granularity on Telosb

2012-09-26 Thread wasif masood
thanks fellows, that was really helpful.

VG


On Wed, Sep 26, 2012 at 3:05 AM, Eric Decker  wrote:

> Or better yet make sure that when the MCU comes back from sleep that
> something
> reasonable is put into the Micro timing h/w.
>
>
> On Tue, Sep 25, 2012 at 8:05 AM, Janos Sallai 
> wrote:
>
>> Wasif:
>>
>> tos/chips/msp430/timer/AlarmMicro16C.nc is what you're looking for.
>> Please note that the us counter is driven by the DCO, which stops when
>> the MCU goes to sleep. You will have to prevent the MCU from sleeping
>> by implementing McuPowerOverride.lowestState().
>>
>> Janos
>>
>> On Tue, Sep 25, 2012 at 2:37 AM, wasif masood  wrote:
>> >
>> > Thanks Eric, I have been through a alot of these posts. So far, I
>> think, the
>> > solution  I am looking for, is not answered in any of them. Either there
>> > isTMicro packet timestamping being discussed or the TMicro counters are
>> > explained just to track the time elasped between two events. But I am
>> > interested in an Alarm, of TMicro, cable of signaling interrupts
>> > periodically, with the granurality of 1 us. So far, the closet I got is
>> > Alarm32Khz, where I tick ~ 30us, is there any way to wire the Alarm to
>> get a
>> > granurality of 1us per Tick FOR TELOSB only?
>> >
>> >
>> > On Tue, Sep 25, 2012 at 12:53 AM, Eric Decker 
>> wrote:
>> >>
>> >>
>> >> You want Tmicro.
>> >>
>> >> Search via
>> >> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/ for
>> tmicro.
>> >>
>> >> This topic has been discussed previously.
>> >>
>> >>
>> >>
>> >> On Mon, Sep 24, 2012 at 5:39 AM, wasif masood 
>> wrote:
>> >>>
>> >>>
>> >>>
>> >>> Hi All,
>> >>>
>> >>> A quick question, is there a timer with granularity of 1us. more than
>> >>> Alarm, where I tick~30us?  for Telosb.
>> >>>
>> >>> VG,
>> >>> Wasif Masood
>> >>>
>> >>>
>> >>> ___
>> >>> Tinyos-help mailing list
>> >>> Tinyos-help@millennium.berkeley.edu
>> >>>
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Eric B. Decker
>> >> Senior (over 50 :-) Researcher
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Wasif Masood
>> >
>> >
>> > ___
>> > Tinyos-help mailing list
>> > Tinyos-help@millennium.berkeley.edu
>> >
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
>
>
>


-- 
Wasif Masood
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer Granularity on Telosb

2012-09-25 Thread Eric Decker
Or better yet make sure that when the MCU comes back from sleep that
something
reasonable is put into the Micro timing h/w.


On Tue, Sep 25, 2012 at 8:05 AM, Janos Sallai wrote:

> Wasif:
>
> tos/chips/msp430/timer/AlarmMicro16C.nc is what you're looking for.
> Please note that the us counter is driven by the DCO, which stops when
> the MCU goes to sleep. You will have to prevent the MCU from sleeping
> by implementing McuPowerOverride.lowestState().
>
> Janos
>
> On Tue, Sep 25, 2012 at 2:37 AM, wasif masood  wrote:
> >
> > Thanks Eric, I have been through a alot of these posts. So far, I think,
> the
> > solution  I am looking for, is not answered in any of them. Either there
> > isTMicro packet timestamping being discussed or the TMicro counters are
> > explained just to track the time elasped between two events. But I am
> > interested in an Alarm, of TMicro, cable of signaling interrupts
> > periodically, with the granurality of 1 us. So far, the closet I got is
> > Alarm32Khz, where I tick ~ 30us, is there any way to wire the Alarm to
> get a
> > granurality of 1us per Tick FOR TELOSB only?
> >
> >
> > On Tue, Sep 25, 2012 at 12:53 AM, Eric Decker  wrote:
> >>
> >>
> >> You want Tmicro.
> >>
> >> Search via
> >> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/ for
> tmicro.
> >>
> >> This topic has been discussed previously.
> >>
> >>
> >>
> >> On Mon, Sep 24, 2012 at 5:39 AM, wasif masood 
> wrote:
> >>>
> >>>
> >>>
> >>> Hi All,
> >>>
> >>> A quick question, is there a timer with granularity of 1us. more than
> >>> Alarm, where I tick~30us?  for Telosb.
> >>>
> >>> VG,
> >>> Wasif Masood
> >>>
> >>>
> >>> ___
> >>> Tinyos-help mailing list
> >>> Tinyos-help@millennium.berkeley.edu
> >>>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >>
> >>
> >>
> >>
> >> --
> >> Eric B. Decker
> >> Senior (over 50 :-) Researcher
> >>
> >>
> >
> >
> >
> > --
> > Wasif Masood
> >
> >
> > ___
> > Tinyos-help mailing list
> > Tinyos-help@millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer Granularity on Telosb

2012-09-25 Thread Janos Sallai
Wasif:

tos/chips/msp430/timer/AlarmMicro16C.nc is what you're looking for.
Please note that the us counter is driven by the DCO, which stops when
the MCU goes to sleep. You will have to prevent the MCU from sleeping
by implementing McuPowerOverride.lowestState().

Janos

On Tue, Sep 25, 2012 at 2:37 AM, wasif masood  wrote:
>
> Thanks Eric, I have been through a alot of these posts. So far, I think, the
> solution  I am looking for, is not answered in any of them. Either there
> isTMicro packet timestamping being discussed or the TMicro counters are
> explained just to track the time elasped between two events. But I am
> interested in an Alarm, of TMicro, cable of signaling interrupts
> periodically, with the granurality of 1 us. So far, the closet I got is
> Alarm32Khz, where I tick ~ 30us, is there any way to wire the Alarm to get a
> granurality of 1us per Tick FOR TELOSB only?
>
>
> On Tue, Sep 25, 2012 at 12:53 AM, Eric Decker  wrote:
>>
>>
>> You want Tmicro.
>>
>> Search via
>> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/ for tmicro.
>>
>> This topic has been discussed previously.
>>
>>
>>
>> On Mon, Sep 24, 2012 at 5:39 AM, wasif masood  wrote:
>>>
>>>
>>>
>>> Hi All,
>>>
>>> A quick question, is there a timer with granularity of 1us. more than
>>> Alarm, where I tick~30us?  for Telosb.
>>>
>>> VG,
>>> Wasif Masood
>>>
>>>
>>> ___
>>> Tinyos-help mailing list
>>> Tinyos-help@millennium.berkeley.edu
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>>
>>
>>
>> --
>> Eric B. Decker
>> Senior (over 50 :-) Researcher
>>
>>
>
>
>
> --
> Wasif Masood
>
>
> ___
> 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


Re: [Tinyos-help] Timer Granularity on Telosb

2012-09-25 Thread wasif masood
Thanks Eric, I have been through a alot of these posts. So far, I think,
the solution  I am looking for, is not answered in any of them. Either
there isTMicro packet timestamping being discussed or the TMicro counters
are explained just to track the time elasped between two events. But I am
interested in an Alarm, of TMicro, cable of signaling interrupts
periodically, with the granurality of 1 us. So far, the closet I got is
Alarm32Khz, where I tick ~ 30us, is there any way to wire the Alarm to get
a granurality of 1us per Tick FOR TELOSB only?


On Tue, Sep 25, 2012 at 12:53 AM, Eric Decker  wrote:

>
> You want Tmicro.
>
> Search via
> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/ for
> tmicro.
>
> This topic has been discussed previously.
>
>
>
> On Mon, Sep 24, 2012 at 5:39 AM, wasif masood  wrote:
>
>>
>>
>> Hi All,
>>
>> A quick question, is there a timer with granularity of 1us. more than
>> Alarm, where I tick~30us?  for Telosb.
>>
>> VG,
>> Wasif Masood
>>
>>
>> ___
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
>
>
>


-- 
Wasif Masood
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer Granularity on Telosb

2012-09-24 Thread Eric Decker
You want Tmicro.

Search via http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/ for
tmicro.

This topic has been discussed previously.



On Mon, Sep 24, 2012 at 5:39 AM, wasif masood  wrote:

>
>
> Hi All,
>
> A quick question, is there a timer with granularity of 1us. more than
> Alarm, where I tick~30us?  for Telosb.
>
> VG,
> Wasif Masood
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer Granularity on Telosb

2012-09-24 Thread wasif masood
Hi All,

A quick question, is there a timer with granularity of 1us. more than
Alarm, where I tick~30us?  for Telosb.

VG,
Wasif Masood
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer 3 registers and IRIS mote

2011-11-14 Thread Janos Sallai
Hafid,

Most probably, the MCU goes to sleep and the timer is not ticking. To
prevent the MCU from sleeping, implement the McuPowerOverride
interface and wire it to McuSleepC.

Janos

On Wed, Nov 9, 2011 at 10:05 PM, hafid oussaadi  wrote:
> Hello everybody,
> I wrote a  small program to generate a 16 KHz PWM signal on OC3A which
> corresponds to pin 26 on the IRIS 51 pins connector. Assuming that fclk_I/O
> = 7.3728 MHz ,  I use  CTC mode  with OCR3A as TOP value.
> PRR1 &=~(1 << 3); // enable Timer 3
> TCCR3B |= (1<<3)|(1<<0); // prescaler=1
> OCR3A=0xE0;  // top value
> TCCR3A=0x40 ;// CTC mode with OCR3A as TOP value
> TCCR3A &= ~(1 << 6); // stop the signal
> I don`t get anything as output. What`s wrong with this code?
> BTW, I am using  TimerMillic  to generate this signal for 10 seconds
> Regards
> Hafid
>
> ___
> 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


[Tinyos-help] Timer 3 registers and IRIS mote

2011-11-14 Thread hafid oussaadi

Hello everybody,
I wrote a  small program to generate a 16 KHz PWM signal on OC3A which 
corresponds to pin 26 on the IRIS 51 pins connector. Assuming that 
fclk_I/O = 7.3728 MHz ,  I use  CTC mode  with OCR3A as TOP value. 
PRR1 &=~(1 << 3); // enable Timer 3
TCCR3B |= (1<<3)|(1<<0); // prescaler=1 
OCR3A=0xE0;  // top value
TCCR3A=0x40 ;// CTC mode with OCR3A as TOP value
TCCR3A &= ~(1 << 6); // stop the signal
I don`t get anything as output. What`s wrong with this code?
BTW, I am using  TimerMillic  to generate this signal for 10 seconds
Regards 
Hafid 
  ___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer failure related to program size

2011-03-18 Thread Joe Dvorak
Thanks for the quick explanation. That makes perfect sense. I was looking at
the 128k/512k number on the micaz datasheet instead of the 4k from the ATMEL
datasheet.

Thanks again.

Joe

On Fri, Mar 18, 2011 at 12:40 PM, Philip Levis  wrote:

>
> On Mar 18, 2011, at 10:08 AM, Joe Dvorak wrote:
>
> > Hello,
> >
> >
> > I ran into a problem where the timer fails to fire based on the size of
> variables defined in my program. The program has several timers and data
> arrays to store the results before transmitting. My program runs great with
> data arrays of a certain size, but an increase of just a few extra bytes
> causes the timers to stop working. There is no error while compiling. I have
> to download to the mote to test this behavior. With data arrays of 688
> samples, the program runs normally. With data arrays of 692 samples, the
> program downloads, starts, and StdControl.init() and StdControl.start() both
> run. However, the timer that is started in these functions never fires and
> the mote does nothing further. To cause this behavior, I only change the
> length of the data arrays.
> >
> >
> > I am using a micaz mote with an MDA300 sensorboard from Crossbow/Memsic
> for sampling. The program is based on the XSensorMDA300 program that is in
> the …/contrib/xbow/apps/XSensorMDA300 directory of Tinyos 1.1. The program
> is compiled for Tinyos 1.1.
> >
> >
> > Size results for a working program:
> >
> > ROM:  19378
> >
> > RAM:   4053
> >
> >
> > Size results for a non-working program:
> >
> > ROM:  19378
> >
> > RAM:   4069
> >
> >
> > Any help or insight into the problem would be greatly appreciated. I
> would like to understand the issue better so I can determine the best way to
> work around the issue.
>
> The device has 4092 bytes of RAM. With the larger variables your programs
> writes to them is corrupting the stack, which shares that 4092 bytes with
> your data.
>
> Phil
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer failure related to program size

2011-03-18 Thread Philip Levis

On Mar 18, 2011, at 10:08 AM, Joe Dvorak wrote:

> Hello,
> 
>  
> I ran into a problem where the timer fails to fire based on the size of 
> variables defined in my program. The program has several timers and data 
> arrays to store the results before transmitting. My program runs great with 
> data arrays of a certain size, but an increase of just a few extra bytes 
> causes the timers to stop working. There is no error while compiling. I have 
> to download to the mote to test this behavior. With data arrays of 688 
> samples, the program runs normally. With data arrays of 692 samples, the 
> program downloads, starts, and StdControl.init() and StdControl.start() both 
> run. However, the timer that is started in these functions never fires and 
> the mote does nothing further. To cause this behavior, I only change the 
> length of the data arrays.
> 
>  
> I am using a micaz mote with an MDA300 sensorboard from Crossbow/Memsic for 
> sampling. The program is based on the XSensorMDA300 program that is in the 
> …/contrib/xbow/apps/XSensorMDA300 directory of Tinyos 1.1. The program is 
> compiled for Tinyos 1.1.
> 
>  
> Size results for a working program:
> 
> ROM:  19378
> 
> RAM:   4053
> 
>  
> Size results for a non-working program:
> 
> ROM:  19378
> 
> RAM:   4069
> 
>  
> Any help or insight into the problem would be greatly appreciated. I would 
> like to understand the issue better so I can determine the best way to work 
> around the issue.

The device has 4092 bytes of RAM. With the larger variables your programs 
writes to them is corrupting the stack, which shares that 4092 bytes with your 
data.

Phil
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Timer failure related to program size

2011-03-18 Thread Joe Dvorak
Hello,



I ran into a problem where the timer fails to fire based on the size of
variables defined in my program. The program has several timers and data
arrays to store the results before transmitting. My program runs great with
data arrays of a certain size, but an increase of just a few extra bytes
causes the timers to stop working. There is no error while compiling. I have
to download to the mote to test this behavior. With data arrays of 688
samples, the program runs normally. With data arrays of 692 samples, the
program downloads, starts, and StdControl.init() and StdControl.start() both
run. However, the timer that is started in these functions never fires and
the mote does nothing further. To cause this behavior, I only change the
length of the data arrays.



I am using a micaz mote with an MDA300 sensorboard from Crossbow/Memsic for
sampling. The program is based on the XSensorMDA300 program that is in the
…/contrib/xbow/apps/XSensorMDA300 directory of Tinyos 1.1. The program is
compiled for Tinyos 1.1.



Size results for a working program:

ROM:  19378

RAM:   4053



Size results for a non-working program:

ROM:  19378

RAM:   4069



Any help or insight into the problem would be greatly appreciated. I would
like to understand the issue better so I can determine the best way to work
around the issue.



Thanks,



Joe Dvorak
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] timer-functionality within lcd-driver needed / bigAVR6 / atmega128

2010-11-24 Thread Tobias Rossbach
Hi,

> i can't use the TimerMilli - interface directly i guess because this
> functionality is reserved for the
> application itself. i think it would be possible to instantiate a
> timer TMilli in the application
> and wire it down to the lcd-driver, but then the driver wouldn be
> application-independent.

It's possible to use TimerMilli in hardware drivers ... just take a look 
at SensirionSHT1x implementation in 
tinyos-2.x/tos/chips/sht11/SensirionSht11LogicP.nc.

Tobias

-- 
Besuchen Sie uns auf Europas führender Fachmesse für elektrische 
Automatisierung
- der SPS / IPC / DRIVES 2010 -
in Nürnberg vom 23. bis 25. November 2010 am Gemeinschaftsstand
'Open Source Meets Industry' am Stand 308 in Halle 8.

Dipl.-Ing. Tobias Rossbach
Research Associate, Dept. System Design

IMMS Institut für Mikroelektronik- und Mechatronik-Systeme
Ehrenbergstrasse 27
D - 98693 Ilmenau

Tel.  : +49 (3677) 6955-78
Fax   : +49 (3677) 6955-15
E-Mail: tobias.rossb...@imms.de
WWW   : http://www.imms.de/

Geschäftsführer: Prof. Dr. Ralf Sommer -  Dipl.-Ing. Hans-Joachim Kelm
Aufsichtsratsvorsitzender: Dr. Jörg Prinzhausen
Sitz: Ilmenau - Rechtsform: Gesellschaft mit beschränkter Haftung
Registergericht: Amtsgericht Jena HRB 303807

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren
sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

This e-mail contains confidential and/or privileged information.
If you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the material in
this e-mail is strictly forbidden.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] timer-functionality within lcd-driver needed / bigAVR6 / atmega128

2010-11-22 Thread Harald Glanzer
hi,

i'm wondering what's the proper way in tinyos when timing is needed
within a driver.

my concrete problem is a driver for a lcd / everytime a command or data is sent
to the lcd-chip, i need to wait for some time. therefor, i want to use
a timer in singleshot-mode.

i can't use the TimerMilli - interface directly i guess because this
functionality is reserved for the
application itself. i think it would be possible to instantiate a
timer TMilli in the application
and wire it down to the lcd-driver, but then the driver wouldn be
application-independent.

hw-timer2 of the mcu is available as far as i have seen - but what interface
should i use for it?

regards,
harald glanzer
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer

2010-08-20 Thread jostargal
Hi !
I've used the following two components:
Alarm32khz32C() (as Alarm32k)
AlarmToTimerC(T32khz) (as AlarmToTimer)
You need these interfaces:
Timer InitAnd wirings:
ExampleC.Timer -> AlarmToTimer;ExampleC.Init -> Alarm32k;AlarmToTimer.Alarm -> 
Alarm32k;To start the alarm (and consequently the timer) you can use "call 
Init.init();"
Afterwards, you can use e.g. "call Timer.startPeriodic(3000U);"


- Mensaje original -
De: ranal fernando 
Fecha: Jueves, Agosto 19, 2010 10:58 pm
Asunto: [Tinyos-help] Timer
A: tinyos-help@millennium.berkeley.edu

> 
> hi all,
> 
> is there a way to use Timer interface with T32khz 
> precision?  i tried it with TMilliC  it gave some 
> errors. i think TMilliC is only for TMilli precision
> 
> is there another component  that i need to wire to use 
> T32khz precision? used VirtualizeTimerC but did not work.
> 
> thanks
> 
> 
> ranal
>    

╔══╗
║José A. Tarifa Galisteo
║
║  Estudiante Ingeniería de Telecomunicación
║  Escuela Superior de Ingenieros - U. Sevilla
║  http://alumno.us.es/j/jostargal/
╚══╝
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer

2010-08-19 Thread ranal fernando

hi all,

is there a way to use Timer interface with T32khz precision?  i tried it with 
TMilliC  it gave some errors. i think TMilliC is only for TMilli precision

is there another component  that i need to wire to use T32khz precision? used 
VirtualizeTimerC but did not work.

thanks


ranal
  ___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer and Printf problem

2010-07-28 Thread dhb2124
Hello,

I am right now trying to implement a program that stores about 1700  
integers in an array, and once that array is full, a one shot timer is  
started and when the fired event occurs, the elements in the array are  
printed to the screen using printf and a for loop. I am trying to  
print out all 1700 elements in one for loop during one timer fired  
event. Initially I came across the problem that perhaps because the  
buffer size for printf is initialized to 250, it could only print out  
250 bits at a time. With that assumption I then tried making a program  
that in the Boot.booted() event, it would put 1700 integers in the  
array and then start a one shot timer. When the fired event occured,  
it would
print 250 bits from the array, and then once it finished printing  
those it would restart the one shot timer, so that it would print out  
the 1700 bits by triggering the one shot timer fired event 6 or 7  
times. However, even when I did this I came across a problem. If I set  
my timer to anything lower then 80 milliseconds, it would not print  
out all 1700 bits. Instead it would stop somewhere short of that, even  
though I have it only print 250 bits at a time. I can't seem to figure  
out what the problem is, and any help would be greatly appreciated. I  
attached the code to the bottom of this page:

#include "Timer.h"
#include "printf.h"

module NewFastTxUltraC
{
   uses interface Timer as Timer0;
   uses interface Boot;
   uses interface Random;
   uses interface GeneralIO as PortE6;
}

implementation
{
uint16_t a;
uint16_t i = 0;
uint16_t k = 0;
bool stop = 0;
uint16_t values[1700];

event void Boot.booted()
   {
call PortE6.makeOutput();
 for(i = 0; i < 1700; i++)
{
a = call Random.rand16();
if(a & 0x01)
values[i] = 1;
else
values[i] = 0;
}
call Timer0.startOneShot(50);

   }


event void Timer0.fired()
{
i = k*250;
k++;
for(i; (i < k*250) && (i < 1700); i++)
{
printf("%u",values[i]);
printfflush();
if(i == 1700)
{
call Timer0.stop();
stop = 1;
return;
}
}
if(!stop)
call Timer0.startOneShot(50);
}

}

Thanks,
David Blumenfeld

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer startOneShot & startPeriodic

2010-07-15 Thread Deeksha Rao Sahib
If you say call Timer4.startOneShot(dt), then oher timers are not disturbed.
But, if Timer4 is already running and you call Timer4.startOneShot(dt),
then only Timer4 will be stopped and started in OneShot mode.



>
> Hi,
>
> Does calling StartOneShot command on a timer stop any other timer stop
> from working?
>
> ex.
>
> I have three timer that are working
>  call Timer1.startPeriodic(1000);
>  call Timer2.startPeriodic(2000);
>  call Timer3.startPeriodic(5000);
>
> if I launch a fourth timer, Timer4,in "one shot" mode , what happens to my
> periodic timers
>
> thanks in advance,
> regards by Salvo
>
>
> _
> Tanti account di posta? Unisci tutto sotto Hotmail
> http://www.windowslive.it/hotmail/GestisciAltriAccount.aspx
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


--Deeksha

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer startOneShot & startPeriodic

2010-07-15 Thread Salvatore Signorello



Date: Wed, 14 Jul 2010 20:55:06 -0700
Subject: Re: [Tinyos-help] Timer startOneShot & startPeriodic
From: cire...@gmail.com
To: todo_dur...@hotmail.com
CC: tinyos-help@millennium.berkeley.edu
 
I think so, cause I probably misread TEP 102 pag 4 " startOneShot(dt): cancel 
any previous running timer and set to fire in dt time units from the time of 
invocation. The timer etc etc"

I've appreciated your help,
thanks


On Wed, Jul 14, 2010 at 8:54 AM, Salvatore Signorello  
wrote:






Hi,

Does calling StartOneShot command on a timer stop any other timer stop from 
working?

no why would you think that it would? 

ex.

I have three timer that are working
 call Timer1.startPeriodic(1000);
 call Timer2.startPeriodic(2000);
 call Timer3.startPeriodic(5000);

if I launch a fourth timer, Timer4,in "one shot" mode , what happens to my 
periodic timers


nothing.  They are different instantiations.
eric 

thanks in advance,
regards by Salvo
 
  
Personalizza il tuo Messenger con nuove e divertenti emoticon

___

Tinyos-help mailing list

Tinyos-help@millennium.berkeley.edu

https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



-- 
Eric B. Decker
Senior (over 50 :-) Researcher


  
_
Il tuo mondo MSN a portata di clic. Scarica IE8 per MSN
http://events.it.msn.com/internet-explorer-8___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer startOneShot & startPeriodic

2010-07-14 Thread Eric Decker
On Wed, Jul 14, 2010 at 8:54 AM, Salvatore Signorello <
todo_dur...@hotmail.com> wrote:

>  Hi,
>
> Does calling StartOneShot command on a timer stop any other timer stop from
> working?
>

no why would you think that it would?


>
> ex.
>
> I have three timer that are working
>  call Timer1.startPeriodic(1000);
>  call Timer2.startPeriodic(2000);
>  call Timer3.startPeriodic(5000);
>
> if I launch a fourth timer, Timer4,in "one shot" mode , what happens to my
> periodic timers
>

nothing.  They are different instantiations.

eric


>
> thanks in advance,
> regards by Salvo
>
>
> --
> Personalizza il tuo Messenger con nuove e divertenti 
> emoticon
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer startOneShot & startPeriodic

2010-07-14 Thread Salvatore Signorello

Hi,

Does calling StartOneShot command on a timer stop any other timer stop from 
working?

ex.

I have three timer that are working
 call Timer1.startPeriodic(1000);
 call Timer2.startPeriodic(2000);
 call Timer3.startPeriodic(5000);

if I launch a fourth timer, Timer4,in "one shot" mode , what happens to my 
periodic timers

thanks in advance,
regards by Salvo
 
  
_
Tanti account di posta? Unisci tutto sotto Hotmail
http://www.windowslive.it/hotmail/GestisciAltriAccount.aspx___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer interface for mica2 mote

2010-07-10 Thread Michael Schippling
In TOS 1.x look for TimerM.nc and TimerJiffyAsyncM.nc
for 1ms and 32us timers, respectively. Jiffy is only
in the micaz tree but can be copied wholesale to mica2.
I'm sure there are simulacra in T2 but I don't use it.
MS



dhb2...@columbia.edu wrote:
> I have a question about using a timer for the mica2 mote. I see in the  
> timer.h file that there are options to use a 32KHz and Microsecond  
> timer, but I do not see any components that support these and hence I  
> am not sure how to implement either of these timers for the mica2  
> mote. Any help on this topic would be greatly appreciated.
> 
> -David Blumenfeld
> ___
> 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


[Tinyos-help] Timer interface for mica2 mote

2010-07-09 Thread dhb2124
I have a question about using a timer for the mica2 mote. I see in the  
timer.h file that there are options to use a 32KHz and Microsecond  
timer, but I do not see any components that support these and hence I  
am not sure how to implement either of these timers for the mica2  
mote. Any help on this topic would be greatly appreciated.

-David Blumenfeld
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer not fire in TOSSIM

2010-06-18 Thread avinash chaurasia
if you are using tossim then please send us ur python code file also may be
that have some thing.
Thanks
Avinash Kumar Chaurasia
Department of Computer Science
IIT Kanpur, India


On Sat, Jun 19, 2010 at 12:37 AM, Xiaohui Liu  wrote:

> Hi,
>
> Could you please give me some hints on what "code fails" means and what
> could be the causes of the code failure during run-time? It's neither due to
> segmentation fault or divided by zero based on my observation. The program
> exits normally. I really appreciate your help.
>
>
> On Fri, Jun 18, 2010 at 11:13 AM, Kartik Siddhabathula <
> siddhabathulakar...@yahoo.com> wrote:
>
>> Hi Liu,
>>
>> Your timer one shot of 1000 ms won't fire if your code fails during
>> run-time in the packet send code.
>> Just check if your successfully sending a packet or not by having a look
>> at the packet send and send done code.
>>
>> Hope this helps!
>>
>> Kartik.
>>
>>
>> --- On *Fri, 6/18/10, Xiaohui Liu * wrote:
>>
>>
>> From: Xiaohui Liu 
>> Subject: Re: [Tinyos-help] Timer not fire in TOSSIM
>> To: "Kartik Siddhabathula" 
>> Cc: "Tinyos-Help" 
>> Date: Friday, June 18, 2010, 9:38 AM
>>
>>
>> Hi,
>>
>> event void Boot.booted() {
>> call Timer.startOneShot(2000);
>> }
>>
>> event void Timer.fired() {
>> send a packet here
>> call Timer.startOneShot(1000);
>> }
>>
>> On Fri, Jun 18, 2010 at 12:35 AM, Kartik Siddhabathula <
>> siddhabathulakar...@yahoo.com<http://mc/compose?to=siddhabathulakar...@yahoo.com>
>> > wrote:
>>
>>> Hi Liu,
>>>
>>> It will be better if you give some code snippet.
>>>
>>> Thanks,
>>> Kartik
>>>
>>> --- On *Thu, 6/17/10, Xiaohui Liu 
>>> http://mc/compose?to=whu...@gmail.com>
>>> >* wrote:
>>>
>>>
>>> From: Xiaohui Liu http://mc/compose?to=whu...@gmail.com>
>>> >
>>> Subject: [Tinyos-help] Timer not fire in TOSSIM
>>> To: "Tinyos-Help" 
>>> http://mc/compose?to=tinyos-h...@millennium.berkeley.edu>
>>> >
>>> Date: Thursday, June 17, 2010, 11:02 PM
>>>
>>>
>>> Hi,
>>>
>>> I set a timer by calling Timer.startOneShot(1000), but it seems the timer
>>> never fires. The simulation does normally terminate in finite time, so there
>>> is no infinite loop. Can anyone give me some hint on what might be causing
>>> the problem? Thanks.
>>>
>>> --
>>> -Xiaohui Liu
>>>
>>> -Inline Attachment Follows-
>>>
>>> ___
>>> Tinyos-help mailing list
>>> Tinyos-help@millennium.berkeley.edu<http://mc/compose?to=tinyos-h...@millennium.berkeley.edu>
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>>
>>>
>>
>>
>> --
>> -Xiaohui Liu
>>
>>
>>
>
>
> --
> -Xiaohui Liu
>
> ___
> 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

Re: [Tinyos-help] Timer not fire in TOSSIM

2010-06-18 Thread Xiaohui Liu
Hi,

Could you please give me some hints on what "code fails" means and what
could be the causes of the code failure during run-time? It's neither due to
segmentation fault or divided by zero based on my observation. The program
exits normally. I really appreciate your help.

On Fri, Jun 18, 2010 at 11:13 AM, Kartik Siddhabathula <
siddhabathulakar...@yahoo.com> wrote:

> Hi Liu,
>
> Your timer one shot of 1000 ms won't fire if your code fails during
> run-time in the packet send code.
> Just check if your successfully sending a packet or not by having a look at
> the packet send and send done code.
>
> Hope this helps!
>
> Kartik.
>
>
> --- On *Fri, 6/18/10, Xiaohui Liu * wrote:
>
>
> From: Xiaohui Liu 
> Subject: Re: [Tinyos-help] Timer not fire in TOSSIM
> To: "Kartik Siddhabathula" 
> Cc: "Tinyos-Help" 
> Date: Friday, June 18, 2010, 9:38 AM
>
>
> Hi,
>
> event void Boot.booted() {
> call Timer.startOneShot(2000);
> }
>
> event void Timer.fired() {
> send a packet here
> call Timer.startOneShot(1000);
> }
>
> On Fri, Jun 18, 2010 at 12:35 AM, Kartik Siddhabathula <
> siddhabathulakar...@yahoo.com<http://mc/compose?to=siddhabathulakar...@yahoo.com>
> > wrote:
>
>> Hi Liu,
>>
>> It will be better if you give some code snippet.
>>
>> Thanks,
>> Kartik
>>
>> --- On *Thu, 6/17/10, Xiaohui Liu 
>> http://mc/compose?to=whu...@gmail.com>
>> >* wrote:
>>
>>
>> From: Xiaohui Liu http://mc/compose?to=whu...@gmail.com>
>> >
>> Subject: [Tinyos-help] Timer not fire in TOSSIM
>> To: "Tinyos-Help" 
>> http://mc/compose?to=tinyos-h...@millennium.berkeley.edu>
>> >
>> Date: Thursday, June 17, 2010, 11:02 PM
>>
>>
>> Hi,
>>
>> I set a timer by calling Timer.startOneShot(1000), but it seems the timer
>> never fires. The simulation does normally terminate in finite time, so there
>> is no infinite loop. Can anyone give me some hint on what might be causing
>> the problem? Thanks.
>>
>> --
>> -Xiaohui Liu
>>
>> -Inline Attachment Follows-
>>
>> ___
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu<http://mc/compose?to=tinyos-h...@millennium.berkeley.edu>
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>>
>>
>
>
> --
> -Xiaohui Liu
>
>
>


-- 
-Xiaohui Liu
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer not fire in TOSSIM

2010-06-18 Thread Kartik Siddhabathula
Hi Liu,

Your timer one shot of 1000 ms won't fire if your code fails during run-time in 
the packet send code. 
Just check if your successfully sending a packet or not by having a look at the 
packet send and send done code.

Hope this helps!

Kartik.

--- On Fri, 6/18/10, Xiaohui Liu  wrote:

From: Xiaohui Liu 
Subject: Re: [Tinyos-help] Timer not fire in TOSSIM
To: "Kartik Siddhabathula" 
Cc: "Tinyos-Help" 
Date: Friday, June 18, 2010, 9:38 AM

Hi,
event void Boot.booted() {    call Timer.startOneShot(2000);}
event void Timer.fired() {    send a packet here    call 
Timer.startOneShot(1000);
}

On Fri, Jun 18, 2010 at 12:35 AM, Kartik Siddhabathula 
 wrote:

Hi Liu,

It will be better if you give some code snippet.

Thanks,
Kartik

--- On Thu, 6/17/10, Xiaohui Liu  wrote:


From: Xiaohui Liu 
Subject: [Tinyos-help] Timer not fire in TOSSIM

To: "Tinyos-Help" 
Date: Thursday, June 17, 2010, 11:02 PM

Hi,

I set a timer by calling Timer.startOneShot(1000), but it seems the timer never 
fires. The simulation does normally terminate in finite time, so there is no 
infinite loop. Can anyone give me some hint on what might be causing the 
problem? Thanks.



-- 
-Xiaohui Liu



-Inline Attachment Follows-

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu

https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



  


-- 
-Xiaohui Liu





  ___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer not fire in TOSSIM

2010-06-18 Thread Xiaohui Liu
Hi,

event void Boot.booted() {
call Timer.startOneShot(2000);
}

event void Timer.fired() {
send a packet here
call Timer.startOneShot(1000);
}

On Fri, Jun 18, 2010 at 12:35 AM, Kartik Siddhabathula <
siddhabathulakar...@yahoo.com> wrote:

> Hi Liu,
>
> It will be better if you give some code snippet.
>
> Thanks,
> Kartik
>
> --- On *Thu, 6/17/10, Xiaohui Liu * wrote:
>
>
> From: Xiaohui Liu 
> Subject: [Tinyos-help] Timer not fire in TOSSIM
> To: "Tinyos-Help" 
> Date: Thursday, June 17, 2010, 11:02 PM
>
>
> Hi,
>
> I set a timer by calling Timer.startOneShot(1000), but it seems the timer
> never fires. The simulation does normally terminate in finite time, so there
> is no infinite loop. Can anyone give me some hint on what might be causing
> the problem? Thanks.
>
> --
> -Xiaohui Liu
>
> -Inline Attachment Follows-
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu<http://mc/compose?to=tinyos-h...@millennium.berkeley.edu>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
>


-- 
-Xiaohui Liu
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer not fire in TOSSIM

2010-06-17 Thread Xiaohui Liu
Hi,

I set a timer by calling Timer.startOneShot(1000), but it seems the timer
never fires. The simulation does normally terminate in finite time, so there
is no infinite loop. Can anyone give me some hint on what might be causing
the problem? Thanks.

-- 
-Xiaohui Liu
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer

2010-05-31 Thread Giuseppe Cardone
Hi,

please reply to the mailing list, not directly to me.

You may use TimerMilliC as Timer component. The command
startOneShot(uint32_t dt) accepts a 32 bit integer, so you can use it
to signal a time up to (2^32-1)/1024 seconds in the future, that is
69905 minutes or 1165 hours. Of course you can also signal smaller
amounts of time and use a simple counter to identify the desired
target time (for example you may count up to 60 with a timer that
shots every minute to measure an hour).

Regards.

--
Giuseppe Cardone


On Mon, May 31, 2010 at 10:38 AM, raoudha baklouti
 wrote:
>
> Hi
> I have juste saw the link, I think that I can use Timer only per second
> TMilli; // 1024 ticks per second
> T32khz; // 32768 ticks per second
> TMicro; // 1048576 ticks per second
> So I can't use Timer for one minute or one hour???
>
> Cordially,
>
> --- En date de : Lun 31.5.10, Giuseppe Cardone 
>  a écrit :
>
> De: Giuseppe Cardone 
> Objet: Re: [Tinyos-help] Timer
> À: "raoudha baklouti" 
> Cc: tinyos-help@millennium.berkeley.edu
> Date: Lundi 31 mai 2010, 10h02
>
> Hi,
>
> please refer to TEP102 , http://www.tinyos.net/tinyos-2.x/doc/html/tep102.html
>
> Regards
>
> --
> Giuseppe Cardone
>
>
>
> On Mon, May 31, 2010 at 9:15 AM, raoudha baklouti
>  wrote:
> > Spam detection software, running on the system 
> > "mail.Millennium.Berkeley.EDU", has
> > identified this incoming email as possible spam.  The original message
> > has been attached to this so you can view it (if it isn't spam) or label
> > similar future email.  If you have any questions, see
> > the administrator of that system for details.
> >
> > Content preview:  Hi all, TimerMillic() : gives a peiod of one millisecond.
> >  I want to know the other possibilities. Where can I found the explanation
> >  of different function that can I used with TinyOS? Cordially Hi all, 
> > TimerMillic()
> >   : gives a peiod of one millisecond. I want to know the other 
> > possibilities.
> >   Where can I found the explanation of different function that can I used 
> > with
> >   TinyOS? Cordially [...]
> >
> > Content analysis details:   (3.9 points, 3.3 required)
> >
> >  pts rule name              description
> >  -- 
> > --
> >  3.2 FH_DATE_PAST_20XX      The date is grossly in the future.
> >  0.0 HTML_MESSAGE           BODY: HTML included in message
> >  0.0 BAYES_50               BODY: Bayesian spam probability is 40 to 60%
> >                            [score: 0.5000]
> >  1.1 DNS_FROM_OPENWHOIS     RBL: Envelope sender listed in 
> > bl.open-whois.org.
> > -0.5 AWL                    AWL: From: address is in the auto white-list
> >
> > The original message was not completely plain text, and may be unsafe to
> > open with some email clients; in particular, it may contain a virus,
> > or confirm that your address can receive spam.  If you wish to view
> > it, it may be safer to save it to a file and open it with an editor.
> >
> >
> > ___
> > 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

Re: [Tinyos-help] Timer

2010-05-31 Thread Giuseppe Cardone
Hi,

please refer to TEP102 , http://www.tinyos.net/tinyos-2.x/doc/html/tep102.html

Regards

--
Giuseppe Cardone



On Mon, May 31, 2010 at 9:15 AM, raoudha baklouti
 wrote:
> Spam detection software, running on the system 
> "mail.Millennium.Berkeley.EDU", has
> identified this incoming email as possible spam.  The original message
> has been attached to this so you can view it (if it isn't spam) or label
> similar future email.  If you have any questions, see
> the administrator of that system for details.
>
> Content preview:  Hi all, TimerMillic() : gives a peiod of one millisecond.
>  I want to know the other possibilities. Where can I found the explanation
>  of different function that can I used with TinyOS? Cordially Hi all, 
> TimerMillic()
>   : gives a peiod of one millisecond. I want to know the other possibilities.
>   Where can I found the explanation of different function that can I used with
>   TinyOS? Cordially [...]
>
> Content analysis details:   (3.9 points, 3.3 required)
>
>  pts rule name              description
>  -- --
>  3.2 FH_DATE_PAST_20XX      The date is grossly in the future.
>  0.0 HTML_MESSAGE           BODY: HTML included in message
>  0.0 BAYES_50               BODY: Bayesian spam probability is 40 to 60%
>                            [score: 0.5000]
>  1.1 DNS_FROM_OPENWHOIS     RBL: Envelope sender listed in bl.open-whois.org.
> -0.5 AWL                    AWL: From: address is in the auto white-list
>
> The original message was not completely plain text, and may be unsafe to
> open with some email clients; in particular, it may contain a virus,
> or confirm that your address can receive spam.  If you wish to view
> it, it may be safer to save it to a file and open it with an editor.
>
>
> ___
> 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

[Tinyos-help] Timer

2010-05-31 Thread raoudha baklouti
Spam detection software, running on the system "mail.Millennium.Berkeley.EDU", 
has
identified this incoming email as possible spam.  The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email.  If you have any questions, see
the administrator of that system for details.

Content preview:  Hi all, TimerMillic() : gives a peiod of one millisecond.
  I want to know the other possibilities. Where can I found the explanation
  of different function that can I used with TinyOS? Cordially Hi all, 
TimerMillic()
   : gives a peiod of one millisecond. I want to know the other possibilities.
   Where can I found the explanation of different function that can I used with
   TinyOS? Cordially [...] 

Content analysis details:   (3.9 points, 3.3 required)

 pts rule name  description
 -- --
 3.2 FH_DATE_PAST_20XX  The date is grossly in the future.
 0.0 HTML_MESSAGE   BODY: HTML included in message
 0.0 BAYES_50   BODY: Bayesian spam probability is 40 to 60%
[score: 0.5000]
 1.1 DNS_FROM_OPENWHOIS RBL: Envelope sender listed in bl.open-whois.org.
-0.5 AWLAWL: From: address is in the auto white-list

The original message was not completely plain text, and may be unsafe to
open with some email clients; in particular, it may contain a virus,
or confirm that your address can receive spam.  If you wish to view
it, it may be safer to save it to a file and open it with an editor.

--- Begin Message ---
Hi all,
TimerMillic() : gives a peiod of one millisecond. 
I want to know the other possibilities.
Where can I found the explanation of different function that can I used with 
TinyOS?
Cordially



  --- End Message ---
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] timer and backoff

2010-05-24 Thread Deeksha Rao Sahib

> Hi All,
> I just moved from tinyos 1.x to 2.x. I read somewhere that tinyos 2.x has
> a
> built-in function for disabling csma and backoff while transmitting? Is it
> in CSMA control?

yes it is CSMA control... you can turn it off by making CcaOn = FALSE
>
> The second question I have is whether it is possible, while using a timer
> likeTmilli, to know at any time the amount of time left to the next
> firing.

Check out the functions of Timer interface
>
> Thanks
>
>
> --
> Bob
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


--Deeksha

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] timer and backoff

2010-05-21 Thread Roberto Pagliari
Hi All,
I just moved from tinyos 1.x to 2.x. I read somewhere that tinyos 2.x has a
built-in function for disabling csma and backoff while transmitting? Is it
in CSMA control?

The second question I have is whether it is possible, while using a timer
likeTmilli, to know at any time the amount of time left to the next firing.

Thanks


-- 
Bob
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] timer .getNow()

2010-04-22 Thread wafa jaballah
hi all,

I have a problem related to the current time in a mote.
More Specially, If a sender wants to send a packet , I want to mention the
time of receiving a packet.
printf ("message was received at time %u\n", call Timer.getNow())?

What I install  the code on a mote , I have :
 message was received at time 0.
This indicated that call Timer.getNow() gives me all the time the value 0.
What is the problem? although in simulation it works fine.

best regards,

-- 
Wafa Ben Jaballah
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer 32bit problem in Micaz

2010-03-26 Thread mgm ncm
Hi,

I am using tinyos 1.x and can able to use the timer to fire every 5 minutes
in micaz.I  typecasted (uint32_t) 30 to the timer component.

--MGM

On Thu, Mar 25, 2010 at 8:43 PM, Philip Levis  wrote:

>
> On Mar 25, 2010, at 3:15 AM, Vikram vik76 wrote:
>
> > Hello,
> > I am using Atmega128 based MicaZ motes.
> > I am not able to use a value more than uint32_t value for the timers
> > on MicaZ platform.
> > It accepts only uint16_t values which doesnt provide more that 65535
> > milliseconds.  or 65 seconds roughly.
> > I have a requirement for starting the timer periodically after 300
> seconds.
> > Can I achieve that?
> > Or can I change the precission tag from TMilli to a lower precision of
> seconds?
>
> Take a look at the set of library components in tos/lib/timer. You'll find
> one (or a combination of several) that fit your needs.
>
> Phil
> ___
> 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

Re: [Tinyos-help] Timer 32bit problem in Micaz

2010-03-25 Thread Philip Levis

On Mar 25, 2010, at 3:15 AM, Vikram vik76 wrote:

> Hello,
> I am using Atmega128 based MicaZ motes.
> I am not able to use a value more than uint32_t value for the timers
> on MicaZ platform.
> It accepts only uint16_t values which doesnt provide more that 65535
> milliseconds.  or 65 seconds roughly.
> I have a requirement for starting the timer periodically after 300 seconds.
> Can I achieve that?
> Or can I change the precission tag from TMilli to a lower precision of 
> seconds?

Take a look at the set of library components in tos/lib/timer. You'll find one 
(or a combination of several) that fit your needs.

Phil
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Timer 32bit problem in Micaz

2010-03-25 Thread Vikram vik76
Hello,
I am using Atmega128 based MicaZ motes.
I am not able to use a value more than uint32_t value for the timers
on MicaZ platform.
It accepts only uint16_t values which doesnt provide more that 65535
milliseconds.  or 65 seconds roughly.
I have a requirement for starting the timer periodically after 300 seconds.
Can I achieve that?
Or can I change the precission tag from TMilli to a lower precision of seconds?

Thanks
Vikram
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer precision problem during proting to platform

2010-03-17 Thread Eric Decker
There is some amount of confusion with regards to binary vs. decimal/metric
frequency.

On the telosb, TI msp430f1611, the main timer is run off the 32768 clock
generating 1mis (binary millisec, = 1/1024 secs).  And unless carefully
documented it is unclear what is being referred to when one sees 1MHZ in the
code.

To further confuse things, TI has brought out new chips like the ti
msp430f2618 that includes factory calibration values for dco (main cpu
clock) frequencies for running at 100, 400, 800, 1600 and
baud rate tables for various uart speeds etc.  It would be nice to be able
to make use of these tables when we program the ti peripherals.

I've been working on code in the msp430X area that deals with many of these
issues.

But this mixture of decimal and binary units while using the same
nomenclature is very confusing and also leads to programming errors.

I'd like to suggest that we adopt the nomenclature of binary units.  ie.
 binary millisecond,  mis,   decimal millisecond  ms,   binary megahertz
MIHZ or MiHZ, etc.

eric

On Wed, Mar 17, 2010 at 9:27 AM, Vlado Handziski
wrote:

> On Tue, Mar 16, 2010 at 23:50, Attila Strba  wrote:
>
>> Hi Vlado,
>> as far as I read the source and underestood the TEP's right the tag has no
>> influence on the transofrmation calculation right? It just makes sure the
>> timer conversion types does not get mixed ?
>>
>>
> Yes, but TMicro is a confusing name for something that is 1/16us.
>
>
>> The clock source is the 16MHz XTAL oscillator driving the miccrocontroller
>> so I guess metric. After 65535 tackts wraps around and 1 tick takes 1/16us.
>> To be honest I don't underestand how could be a microcontroller clock source
>> be "binary".
>>
>>
> What I mean is when you say 1MHz this can be 1 * 1000 * 1000 ticks per
> second or 1 * 1024 * 1024. When we say that the clock source has 1MHz in
> tinyos, it means the later. I.e. all units are binary, i.e. 1 second has
> 1024 binary milliseconds.
>
>
>> Any more idea where I could look for problems?
>>
>>
> No, sorry. I guess you will have to debug this with a scope and toggling a
> pin in the fire events of the alarms in the transform components.
>
> Vlado
>
>
>> thanx a lot for the help Vlado,
>>
>> greetings
>>
>> Attila
>>
>>
>>
>> --
>> *From:* Vlado Handziski 
>> *To:* Attila Strba 
>> *Cc:* tinyos-help@millennium.berkeley.edu
>> *Sent:* Tue, March 16, 2010 5:23:56 PM
>>
>> *Subject:* Re: [Tinyos-help] Timer precision problem during proting to
>> platform
>>
>> If you like to export a 16MHz timer, the TMicro precision tag is not
>> appropriate. You can use T16mhz (just like we have T32khz) for this
>> particular prescaler, or TOne, etc. like in the atm128 when the prescaler is
>> not fixed. Is this a binary 16MHz clock source or metric? TinyOS is always
>> using binary units. The transforms with the 14 bit-shift look correct to me.
>>
>> Vlado
>>
>>
>> On Tue, Mar 16, 2010 at 08:26, Attila Strba  wrote:
>>
>>> Hi Vlado,
>>> thanks for the mail it helped a lot. I implemented this the following way
>>> like described but the TimerMilli was doing random periodes. For example I
>>> tried to get a fire every 1ms and I got it for every 700us. I think my  HPL
>>> works fine, because if I use the HPL component as separate I can get correct
>>> fire events. But when I go through all the transformation it behaves
>>> strange.
>>>
>>> For sure I am doing something wrong. Just to make sure I underestand you
>>> right, could you please confirm my steps?
>>>
>>> *Steps:*
>>>
>>> - I create a HPL for the timer where 1 tick has 1/16=0,0625us
>>> - I provide an alarm, counter interface in HPL following way
>>>provides interface Counter< TMicro, uint16_t> as Counter
>>>provides interface Alarm< TMicro, uint16_t> as Alarm[
>>> uint8_t id ];
>>> - the counter signalises overflow in 4.096ms = (65536 ticks)
>>> - the alarm is implemented using the compare register, and the fire event
>>> is the compare match with the counter
>>> - I transform the counter to 32bit 1ms counter following way, 2^14 ticks
>>> = 16384 * 0.0625 = 1024 which is aprox. 1ms
>>>
>>> *CounterMilli32C.nc:*
>>> components CounterMicro16C as CounterFrom;
>>> components new
>>> TransformCounterC(TMilli,uint32_t,TMicro,uint16_t,14,uint32_t) as Transform;
>>>
>>>   Counter = 

Re: [Tinyos-help] Timer precision problem during proting to platform

2010-03-17 Thread Vlado Handziski
On Tue, Mar 16, 2010 at 23:50, Attila Strba  wrote:

> Hi Vlado,
> as far as I read the source and underestood the TEP's right the tag has no
> influence on the transofrmation calculation right? It just makes sure the
> timer conversion types does not get mixed ?
>
>
Yes, but TMicro is a confusing name for something that is 1/16us.


> The clock source is the 16MHz XTAL oscillator driving the miccrocontroller
> so I guess metric. After 65535 tackts wraps around and 1 tick takes 1/16us.
> To be honest I don't underestand how could be a microcontroller clock source
> be "binary".
>
>
What I mean is when you say 1MHz this can be 1 * 1000 * 1000 ticks per
second or 1 * 1024 * 1024. When we say that the clock source has 1MHz in
tinyos, it means the later. I.e. all units are binary, i.e. 1 second has
1024 binary milliseconds.


> Any more idea where I could look for problems?
>
>
No, sorry. I guess you will have to debug this with a scope and toggling a
pin in the fire events of the alarms in the transform components.

Vlado


> thanx a lot for the help Vlado,
>
> greetings
>
> Attila
>
>
>
> --
> *From:* Vlado Handziski 
> *To:* Attila Strba 
> *Cc:* tinyos-help@millennium.berkeley.edu
> *Sent:* Tue, March 16, 2010 5:23:56 PM
>
> *Subject:* Re: [Tinyos-help] Timer precision problem during proting to
> platform
>
> If you like to export a 16MHz timer, the TMicro precision tag is not
> appropriate. You can use T16mhz (just like we have T32khz) for this
> particular prescaler, or TOne, etc. like in the atm128 when the prescaler is
> not fixed. Is this a binary 16MHz clock source or metric? TinyOS is always
> using binary units. The transforms with the 14 bit-shift look correct to me.
>
> Vlado
>
>
> On Tue, Mar 16, 2010 at 08:26, Attila Strba  wrote:
>
>> Hi Vlado,
>> thanks for the mail it helped a lot. I implemented this the following way
>> like described but the TimerMilli was doing random periodes. For example I
>> tried to get a fire every 1ms and I got it for every 700us. I think my  HPL
>> works fine, because if I use the HPL component as separate I can get correct
>> fire events. But when I go through all the transformation it behaves
>> strange.
>>
>> For sure I am doing something wrong. Just to make sure I underestand you
>> right, could you please confirm my steps?
>>
>> *Steps:*
>>
>> - I create a HPL for the timer where 1 tick has 1/16=0,0625us
>> - I provide an alarm, counter interface in HPL following way
>>provides interface Counter< TMicro, uint16_t> as Counter
>>provides interface Alarm< TMicro, uint16_t> as Alarm[
>> uint8_t id ];
>> - the counter signalises overflow in 4.096ms = (65536 ticks)
>> - the alarm is implemented using the compare register, and the fire event
>> is the compare match with the counter
>> - I transform the counter to 32bit 1ms counter following way, 2^14 ticks =
>> 16384 * 0.0625 = 1024 which is aprox. 1ms
>>
>> *CounterMilli32C.nc:*
>> components CounterMicro16C as CounterFrom;
>> components new
>> TransformCounterC(TMilli,uint32_t,TMicro,uint16_t,14,uint32_t) as Transform;
>>
>>   Counter = Transform.Counter;
>>   Transform.CounterFrom -> CounterFrom;
>>
>> - I transform the alarm to 32bit 1ms counter following way, 14: 2^14 ticks
>> = 16384 * 0.0625 = 1024 which is aprox. 1ms
>> *AlarmMilli32C.nc:*
>>   components new AlarmMicro16C() as AlarmFrom;
>>   components CounterMilli32C as Counter;
>>   components new TransformAlarmC(TMilli,uint32_t,TMicro,uint16_t,14) as
>> Transform;
>>
>>Init = AlarmFrom;
>>Alarm = Transform;
>>Transform.AlarmFrom -> AlarmFrom;
>>Transform.Counter -> Counter;
>>
>> - I provide both AlarmMilli32C and CounterMilli32C to HilTimerMilliC.ncso I 
>> can use the TimerMilli interface for timing:
>> *HilTimerMilliC.nc:*
>> components new AlarmMilli32C();
>> components new AlarmToTimerC(TMilli);
>> components new VirtualizeTimerC(TMilli,uniqueCount(UQ_TIMER_MILLI));
>>
>> Init = AlarmMilli32C;
>> TimerMilli = VirtualizeTimerC;
>>
>> VirtualizeTimerC.TimerFrom -> AlarmToTimerC;
>> AlarmToTimerC.Alarm -> AlarmMilli32C;
>>
>> Thank you very much for the help,
>> greetings
>> Attila
>>
>> --
>> *From:* Vlado Handziski 
>> *To:* Attila Strba 
>> *Cc:* tinyos-help@millennium.berkeley.edu
>> *Sent:* Tue, March 16, 2010 3:46:07 AM
>> *Subject:* Re: [Tinyos-help] Timer preci

Re: [Tinyos-help] Timer precision problem during proting to platform

2010-03-16 Thread Attila Strba
Hi Vlado, 

as far as I read the source and underestood the TEP's right the tag has no 
influence on the transofrmation calculation right? It just makes sure the timer 
conversion types does not get mixed ?

The clock source is the 16MHz XTAL oscillator driving the miccrocontroller so I 
guess metric. After 65535 tackts wraps around and 1 tick takes 1/16us. To be 
honest I don't underestand how could be a microcontroller clock source be 
"binary". 

Any more idea where I could look for problems? 

thanx a lot for the help Vlado, 

greetings

Attila






From: Vlado Handziski 
To: Attila Strba 
Cc: tinyos-help@millennium.berkeley.edu
Sent: Tue, March 16, 2010 5:23:56 PM
Subject: Re: [Tinyos-help] Timer precision problem during proting to platform


If you like to export a 16MHz timer, the TMicro precision tag is not 
appropriate. You can use T16mhz (just like we have T32khz) for this particular 
prescaler, or TOne, etc. like in the atm128 when the prescaler is not fixed. Is 
this a binary 16MHz clock source or metric? TinyOS is always using binary 
units. The transforms with the 14 bit-shift look correct to me.

Vlado


On Tue, Mar 16, 2010 at 08:26, Attila Strba  wrote:

>
>Hi Vlado, 
>
>thanks for the mail it helped a lot. I implemented this the following way like 
>described but the TimerMilli was doing random periodes. For example I tried to 
>get a fire every 1ms and I got it for every 700us. I think my  HPL works fine, 
>because if I use the HPL component as separate I can get correct fire events. 
>But when I go through all the transformation it behaves strange. 
>
>
>For sure I am doing something wrong. Just to make sure I underestand you 
>right, could you please confirm my steps? 
>
>
>Steps:
>
>
>- I create a HPL for the timer where 1 tick has 1/16=0,0625us
>- I provide an alarm, counter interface in HPL following way 
>  
> provides interface Counter< TMicro, uint16_t> as Counter
>   provides interface Alarm< TMicro, uint16_t> as Alarm[ uint8_t 
> id ];
>- the counter signalises overflow in 4.096ms = (65536 ticks)
>- the alarm is implemented using the compare register, and the fire event is 
>the compare match with the counter
>- I transform the counter to 32bit 1ms counter following way, 2^14 ticks = 
>16384 * 0.0625 = 1024 which is aprox. 1ms
>
>
>CounterMilli32C.nc:
>components CounterMicro16C as CounterFrom;
>components new 
> TransformCounterC(TMilli,uint32_t,TMicro,uint16_t,14,uint32_t) as Transform;
>
>
>
>  Counter = Transform.Counter;
>
>  Transform.CounterFrom -> CounterFrom;
>
>
>
>- I transform the alarm to 32bit 1ms counter following way, 14: 2^14 ticks = 
>16384 * 0.0625 = 1024
> which is aprox. 1ms
>AlarmMilli32C.nc:
>  components new AlarmMicro16C() as AlarmFrom;
>  components CounterMilli32C as Counter;
>  components new TransformAlarmC(TMilli,uint32_t,TMicro,uint16_t,14) as 
> Transform;
>
>   Init = AlarmFrom;
>   Alarm = Transform;
>   Transform.AlarmFrom -> AlarmFrom;
>   Transform.Counter -> Counter;
>
>
>
>- I provide both AlarmMilli32C and CounterMilli32C to HilTimerMilliC.nc so I 
>can use the TimerMilli interface for timing:
>HilTimerMilliC.nc:
>components new AlarmMilli32C();
>components new AlarmToTimerC(TMilli);
>components new VirtualizeTimerC(TMilli,uniqueCount(UQ_TIMER_MILLI));
>
>Init = AlarmMilli32C;
>>
>  TimerMilli = VirtualizeTimerC;
>
>VirtualizeTimerC.TimerFrom -> AlarmToTimerC;
>AlarmToTimerC.Alarm -> AlarmMilli32C;
>
>
>
>Thank
> you very much for the help, 
>greetings
>Attila
>
>
>

From: Vlado Handziski 
>To: Attila Strba 
>Cc: tinyos-help@millennium.berkeley.edu
>Sent: Tue, March 16, 2010 3:46:07 AM
>Subject: Re: [Tinyos-help] Timer precision problem during proting to platform
>
>
>
>On Sun, Mar 14, 2010 at 23:50, Attila Strba  wrote:
>
>>>
>>
>>
>>Hi Guys,
>>
>>
>>>>I am trying to port the TinyOS to the Dolphin EO3000I chip from EnOcean and 
>>>>I have a poblem with the Timer precission.
>>
>>>>As I read from the TEP 102, it is written that the HLP timer interface 
>>>>should provide either 32kHz or 1ms or 1us tick precision. The Dolphin runs 
>>>>on 16MHz clock. The Timer0 I am trying to use is 16bit, uses the same clock 
>>>>source and it has the possibility to use either 2,4,8 prescaler. But that's 
>>>>all, so in best case using prescaler 8 I would get 0.5us pro 1 tick.
>>
>>
>>
>
>
>The TEP 102 is only specifying how the HIL _must_ look, and provides examples 
&g

Re: [Tinyos-help] Timer precision problem during proting to platform

2010-03-16 Thread Vlado Handziski
If you like to export a 16MHz timer, the TMicro precision tag is not
appropriate. You can use T16mhz (just like we have T32khz) for this
particular prescaler, or TOne, etc. like in the atm128 when the prescaler is
not fixed. Is this a binary 16MHz clock source or metric? TinyOS is always
using binary units. The transforms with the 14 bit-shift look correct to me.

Vlado


On Tue, Mar 16, 2010 at 08:26, Attila Strba  wrote:

> Hi Vlado,
> thanks for the mail it helped a lot. I implemented this the following way
> like described but the TimerMilli was doing random periodes. For example I
> tried to get a fire every 1ms and I got it for every 700us. I think my  HPL
> works fine, because if I use the HPL component as separate I can get correct
> fire events. But when I go through all the transformation it behaves
> strange.
>
> For sure I am doing something wrong. Just to make sure I underestand you
> right, could you please confirm my steps?
>
> *Steps:*
>
> - I create a HPL for the timer where 1 tick has 1/16=0,0625us
> - I provide an alarm, counter interface in HPL following way
>provides interface Counter< TMicro, uint16_t> as Counter
>provides interface Alarm< TMicro, uint16_t> as Alarm[
> uint8_t id ];
> - the counter signalises overflow in 4.096ms = (65536 ticks)
> - the alarm is implemented using the compare register, and the fire event
> is the compare match with the counter
> - I transform the counter to 32bit 1ms counter following way, 2^14 ticks =
> 16384 * 0.0625 = 1024 which is aprox. 1ms
>
> *CounterMilli32C.nc:*
> components CounterMicro16C as CounterFrom;
> components new
> TransformCounterC(TMilli,uint32_t,TMicro,uint16_t,14,uint32_t) as Transform;
>
>   Counter = Transform.Counter;
>   Transform.CounterFrom -> CounterFrom;
>
> - I transform the alarm to 32bit 1ms counter following way, 14: 2^14 ticks
> = 16384 * 0.0625 = 1024 which is aprox. 1ms
> *AlarmMilli32C.nc:*
>   components new AlarmMicro16C() as AlarmFrom;
>   components CounterMilli32C as Counter;
>   components new TransformAlarmC(TMilli,uint32_t,TMicro,uint16_t,14) as
> Transform;
>
>Init = AlarmFrom;
>Alarm = Transform;
>Transform.AlarmFrom -> AlarmFrom;
>Transform.Counter -> Counter;
>
> - I provide both AlarmMilli32C and CounterMilli32C to HilTimerMilliC.nc so
> I can use the TimerMilli interface for timing:
> *HilTimerMilliC.nc:*
> components new AlarmMilli32C();
> components new AlarmToTimerC(TMilli);
> components new VirtualizeTimerC(TMilli,uniqueCount(UQ_TIMER_MILLI));
>
> Init = AlarmMilli32C;
> TimerMilli = VirtualizeTimerC;
>
> VirtualizeTimerC.TimerFrom -> AlarmToTimerC;
> AlarmToTimerC.Alarm -> AlarmMilli32C;
>
> Thank you very much for the help,
> greetings
> Attila
>
> --
> *From:* Vlado Handziski 
> *To:* Attila Strba 
> *Cc:* tinyos-help@millennium.berkeley.edu
> *Sent:* Tue, March 16, 2010 3:46:07 AM
> *Subject:* Re: [Tinyos-help] Timer precision problem during proting to
> platform
>
> On Sun, Mar 14, 2010 at 23:50, Attila Strba  wrote:
>
>> Hi Guys,
>>
>>
>> I am trying to port the TinyOS to the Dolphin EO3000I chip from EnOcean
>> and I have a poblem with the Timer precission.
>>
>> As I read from the TEP 102, it is written that the HLP timer interface
>> should provide either 32kHz or 1ms or 1us tick precision. The Dolphin runs
>> on 16MHz clock. The Timer0 I am trying to use is 16bit, uses the same clock
>> source and it has the possibility to use either 2,4,8 prescaler. But that's
>> all, so in best case using prescaler 8 I would get 0.5us pro 1 tick.
>>
>>
>>
> The TEP 102 is only specifying how the HIL _must_ look, and provides
> examples how the lib/timer components can be used to build a flexible HAL
> layer. The HPL component interfaces are fully driven by the hardware
> characteristics, so you can do whatever you like there.
>
>
>> My question is what to do with this? I am far away from the values TEP102
>> considers. The transformation components are only for the width adjustment
>> right? (i.e. TransformAlarmC).
>> Or should I manually adjust the values I get through the HPL interface
>>  using constants (multiplication of the input values by 2) such way that I
>> get 1us interface?
>>
>>
> My suggestion is to expose the maximal precision on HPL and as
> Counters/Alarms on HAL level and then use TransformAlarmC which also
> transforms precision (to a lower one) to provide the HIL.
>
> Vlado
>
>
>
>> Any help is highly apritiated,
>>
>> greetings
>>
>> Attila
>>
>>
>>
>>
>> ___
>> 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

Re: [Tinyos-help] Timer precision problem during proting to platform

2010-03-16 Thread Attila Strba
Hi Vlado, 

thanks for the mail it helped a lot. I implemented this the following way like 
described but the TimerMilli was doing random periodes. For example I tried to 
get a fire every 1ms and I got it for every 700us. I think my  HPL works fine, 
because if I use the HPL component as separate I can get correct fire events. 
But when I go through all the transformation it behaves strange. 

For sure I am doing something wrong. Just to make sure I underestand you right, 
could you please confirm my steps? 

Steps:

- I create a HPL for the timer where 1 tick has 1/16=0,0625us
- I provide an alarm, counter interface in HPL following way 
   provides interface Counter< TMicro, uint16_t> as Counter
   provides interface Alarm< TMicro, uint16_t> as Alarm[ uint8_t id 
];
- the counter signalises overflow in 4.096ms = (65536 ticks)
- the alarm is implemented using the compare register, and the fire event is 
the compare match with the counter
- I transform the counter to 32bit 1ms counter following way, 2^14 ticks = 
16384 * 0.0625 = 1024 which is aprox. 1ms

CounterMilli32C.nc:
components CounterMicro16C as CounterFrom;
components new 
TransformCounterC(TMilli,uint32_t,TMicro,uint16_t,14,uint32_t) as Transform;


  Counter = Transform.Counter;

  Transform.CounterFrom -> CounterFrom;


- I transform the alarm to 32bit 1ms counter following way, 14: 2^14 ticks = 
16384 * 0.0625 = 1024 which is aprox. 1ms
AlarmMilli32C.nc:
  components new AlarmMicro16C() as AlarmFrom;
  components CounterMilli32C as Counter;
  components new TransformAlarmC(TMilli,uint32_t,TMicro,uint16_t,14) as 
Transform;

   Init = AlarmFrom;
   Alarm = Transform;
   Transform.AlarmFrom -> AlarmFrom;
   Transform.Counter -> Counter;


- I provide both AlarmMilli32C and CounterMilli32C to HilTimerMilliC.nc so I 
can use the TimerMilli interface for timing:
HilTimerMilliC.nc:
components new AlarmMilli32C();
components new AlarmToTimerC(TMilli);
components new VirtualizeTimerC(TMilli,uniqueCount(UQ_TIMER_MILLI));

Init = AlarmMilli32C;
TimerMilli = VirtualizeTimerC;

VirtualizeTimerC.TimerFrom -> AlarmToTimerC;
AlarmToTimerC.Alarm -> AlarmMilli32C;


Thank you very much for the help, 
greetings
Attila




From: Vlado Handziski 
To: Attila Strba 
Cc: tinyos-help@millennium.berkeley.edu
Sent: Tue, March 16, 2010 3:46:07 AM
Subject: Re: [Tinyos-help] Timer precision problem during proting to platform


On Sun, Mar 14, 2010 at 23:50, Attila Strba  wrote:

>
>Hi Guys,
>
>
>>I am trying to port the TinyOS to the Dolphin EO3000I chip from EnOcean and I 
>>have a poblem with the Timer precission.
>
>>As I read from the TEP 102, it is written that the HLP timer interface should 
>>provide either 32kHz or 1ms or 1us tick precision. The Dolphin runs on 16MHz 
>>clock. The Timer0 I am trying to use is 16bit, uses the same clock source and 
>>it has the possibility to use either 2,4,8 prescaler. But that's all, so in 
>>best case using prescaler 8 I would get 0.5us pro 1 tick.
>
>
>

The TEP 102 is only specifying how the HIL _must_ look, and provides examples 
how the lib/timer components can be used to build a flexible HAL layer. The HPL 
component interfaces are fully driven by the hardware characteristics, so you 
can do whatever you like there. 
 
>My question is what to do with this? I am far away from the values TEP102 
>considers. The transformation components are only for the width adjustment 
>right? (i.e. TransformAlarmC).
>>Or should I manually adjust the values I get through the HPL interface  using 
>>constants (multiplication of the input values by 2) such way that I get 1us 
>>interface?
>
>

My suggestion is to expose the maximal precision on HPL and as Counters/Alarms 
on HAL level and then use TransformAlarmC which also transforms precision (to a 
lower one) to provide the HIL.

Vlado

 
>Any help is highly apritiated,
>
>>greetings
>
>>Attila
>
>
>
>
>>___
>>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

Re: [Tinyos-help] Timer precision problem during proting to platform

2010-03-15 Thread Vlado Handziski
On Sun, Mar 14, 2010 at 23:50, Attila Strba  wrote:

> Hi Guys,
>
>
> I am trying to port the TinyOS to the Dolphin EO3000I chip from EnOcean and
> I have a poblem with the Timer precission.
>
> As I read from the TEP 102, it is written that the HLP timer interface
> should provide either 32kHz or 1ms or 1us tick precision. The Dolphin runs
> on 16MHz clock. The Timer0 I am trying to use is 16bit, uses the same clock
> source and it has the possibility to use either 2,4,8 prescaler. But that's
> all, so in best case using prescaler 8 I would get 0.5us pro 1 tick.
>
>
>
The TEP 102 is only specifying how the HIL _must_ look, and provides
examples how the lib/timer components can be used to build a flexible HAL
layer. The HPL component interfaces are fully driven by the hardware
characteristics, so you can do whatever you like there.


> My question is what to do with this? I am far away from the values TEP102
> considers. The transformation components are only for the width adjustment
> right? (i.e. TransformAlarmC).
> Or should I manually adjust the values I get through the HPL interface
>  using constants (multiplication of the input values by 2) such way that I
> get 1us interface?
>
>
My suggestion is to expose the maximal precision on HPL and as
Counters/Alarms on HAL level and then use TransformAlarmC which also
transforms precision (to a lower one) to provide the HIL.

Vlado



> Any help is highly apritiated,
>
> greetings
>
> Attila
>
>
>
>
> ___
> 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

[Tinyos-help] Timer precision problem during proting to platform

2010-03-14 Thread Attila Strba
Hi Guys, 


I am trying to port the TinyOS to the Dolphin EO3000I chip from EnOcean and I 
have a poblem with the Timer precission.

As I read from the TEP 102, it is written that the HLP timer interface should 
provide either 32kHz or 1ms or 1us tick precision. The Dolphin runs on 16MHz 
clock. The Timer0 I am trying to use is 16bit, uses the same clock source and 
it has the possibility to use either 2,4,8 prescaler. But that's all, so in 
best case using prescaler 8 I would get 0.5us pro 1 tick. 


My question is what to do with this? I am far away from the values TEP102 
considers. The transformation components are only for the width adjustment 
right? (i.e. TransformAlarmC). 
Or should I manually adjust the values I get through the HPL interface  using 
constants (multiplication of the input values by 2) such way that I get 1us 
interface?

Any help is highly apritiated,

greetings

Attila



  
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer

2009-11-28 Thread Faisal Aslam
Dear Giuseppe,

Reading this TEP will be very helpful. 
http://www.tinyos.net/tinyos-2.x/doc/html/tep102.html. BTW You can also 
create new timers yourself too.

best regards,

-- 
Faisal Aslam

University of Freiburg
http://cone.informatik.uni-freiburg.de/people/aslam/


Marcus Autenrieth wrote:
> Hi,
>
> Am Sat, 28 Nov 2009 15:35:58 +
> schrieb Giuseppe Aiello :
>
>   
>> i'd like to set the period of a timer to a floating value
>> like 5.5 ms. Is possible to do that?
>> 
> That depends on the architecture you are using. Some chips cannot do
> floating point computations. 
>
>   
>> the command startPeriodic(dt) 
>> takes as argument an uint32_t and so it cuts off the value to 5. Is
>> there a way to store a floating value in a uint32?
>> 
> Well, in C many things are possible, but most are deep dark magic, so
> prepare to be excommunicated if you give it a try ;-)
>
>   
>> Or use a timer with Microsec. resolution? I havent't found an 
>> implementation for the interface Timer. I'd like to use it 
>> with an atm128 microcontroller with tinyos 2.
>> 
> Then there possibly is none such timer. But, depending on your
> hardware, you might find a Timer operating in a suitable frequency.
> On the TelosB platform, for example, you have access to a 32kHz Timer.
>
> Cheers,...
> --
> Marcus.
>   
> 
>
> ___
> 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


Re: [Tinyos-help] Timer

2009-11-28 Thread Marcus Autenrieth
Hi,

Am Sat, 28 Nov 2009 15:35:58 +
schrieb Giuseppe Aiello :

> i'd like to set the period of a timer to a floating value
> like 5.5 ms. Is possible to do that?
That depends on the architecture you are using. Some chips cannot do
floating point computations. 

> the command startPeriodic(dt) 
> takes as argument an uint32_t and so it cuts off the value to 5. Is
> there a way to store a floating value in a uint32?
Well, in C many things are possible, but most are deep dark magic, so
prepare to be excommunicated if you give it a try ;-)

> Or use a timer with Microsec. resolution? I havent't found an 
> implementation for the interface Timer. I'd like to use it 
> with an atm128 microcontroller with tinyos 2.
Then there possibly is none such timer. But, depending on your
hardware, you might find a Timer operating in a suitable frequency.
On the TelosB platform, for example, you have access to a 32kHz Timer.

Cheers,...
--
Marcus.


signature.asc
Description: PGP signature
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer

2009-11-28 Thread Giuseppe Aiello
Hi all,
i'd like to set the period of a timer to a floating value like 5.5
ms. Is possible to do that? the command startPeriodic(dt) takes as argument
an uint32_t and so it cuts off the value to 5. Is there a way to store a
floating value in a uint32? Or use a timer with Microsec. resolution? I
havent't found an implementation for the interface Timer. I'd like
to use it with an atm128 microcontroller with tinyos 2.
Thanks to all.

Rgds
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer accuracy in MicaZ

2009-11-14 Thread Paul Johnson
I'm not exactly sure of that particular interface in TOS 1.x but, i 
remember that in TOS, the milli counter ticks 1024 times per second not 
1000, so this might account for some of the time difference.


-Paul
Mohammad S. Hashemian wrote:

Hi all,
 
In the application I'm working on, I need to know the exact time of a 
specific event, so I recorded the time turned on the mote, and I 
programmed the mote to put the time value in the packet as well (using 
Time.getLow32() and Time.getHigh32, Time is SimpleTime.Time 
interface), using this value and adding it to the base time (the time 
I turned the mote on) I should be able to compute the time which event 
occured.
The problem is that this time increases faster than it should. For 
example suppose the event is firing a timer in code which occur every 
4 seconds, and in the timer event handler, I put the time value and 
send it to the server PC. In such a test, the difference between time 
that server receives the packet and the computed time (time value in 
the packet + base time which I turned the mote on) is zero, but after 
15 minutes the reported time is 20 seconds ahead of the current time, 
and this value increases that for example in 2 days, the reported time 
by mote is 64 minutes ahead of the current time.
 
The procedure of computing time (recording the mote start time and 
adding the reported time to it) seems straight forward and correct, so 
the only problem I can think about is inaccuracy of clock in the mote. 
I tested this on couple of motes but all of them had the same problem, 
so do you think if the problem is in the way I implemented my test or 
it's just some inaccuracy in mote's clock?

BTW I use MicaZ motes with TOS 1.1
Thanks all,
Mohammad


___
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

[Tinyos-help] Timer accuracy in MicaZ

2009-11-14 Thread Mohammad S. Hashemian
Hi all,

In the application I'm working on, I need to know the exact time of a
specific event, so I recorded the time turned on the mote, and I programmed
the mote to put the time value in the packet as well (using Time.getLow32()
and Time.getHigh32, Time is SimpleTime.Time interface), using this value and
adding it to the base time (the time I turned the mote on) I should be able
to compute the time which event occured.
The problem is that this time increases faster than it should. For example
suppose the event is firing a timer in code which occur every 4 seconds, and
in the timer event handler, I put the time value and send it to the server
PC. In such a test, the difference between time that server receives the
packet and the computed time (time value in the packet + base time which I
turned the mote on) is zero, but after 15 minutes the reported time is 20
seconds ahead of the current time, and this value increases that for example
in 2 days, the reported time by mote is 64 minutes ahead of the current
time.

The procedure of computing time (recording the mote start time and adding
the reported time to it) seems straight forward and correct, so the only
problem I can think about is inaccuracy of clock in the mote. I tested this
on couple of motes but all of them had the same problem, so do you think if
the problem is in the way I implemented my test or it's just some inaccuracy
in mote's clock?
 BTW I use MicaZ motes with TOS 1.1
Thanks all,
Mohammad
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer - numbers of execution

2009-08-19 Thread Santiago Garcia Guillen
you can do that using a for/while loop and a variable that you update  
every time the timer is fired.

Sent using an iPod.



El 19/08/2009, a las 21:59, Daniel Souza Coelho   
escribió:

> Hi friends
>
> I'm begining studing NesC and I have 1 doubt about Timer interface:
>
> I know I can declare a Timer using one of these ways:
>
>Timer.start(TIMER_ONE_SHOT, 3000) - 1 execution
>
>Timer.start(TIMER_REPEAT, 3000) - loop infinite
>
> I wonder if there is a third way that would make the
> timer to run a number of times greater than 1 and less than
> infinity, for example, 2, 3, 4, 50 times. I've heard it's possible  
> using a counter, but I don't know how to do it.
> Could anybory help me?
> It's urgente
>
> Thanks vey much and apologize my english :)
> ___
> 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

[Tinyos-help] Timer - numbers of execution

2009-08-19 Thread Daniel Souza Coelho
Hi friends

I'm begining studing NesC and I have 1 doubt about Timer interface:

I know I can declare a Timer using one of these ways:

   Timer.start(TIMER_ONE_SHOT, 3000) - 1 execution

   Timer.start(TIMER_REPEAT, 3000) - loop infinite

I wonder if there is a third way that would make the
timer to run a number of times greater than 1 and less than
infinity, for example, 2, 3, 4, 50 times. I've heard it's possible using a
counter, but I don't know how to do it.
Could anybory help me?
It's urgente

Thanks vey much and apologize my english :)
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer sync with FTSP

2009-06-16 Thread Andres Vahter
Hi,

I think I understand FTSP basics and how sync messaging works, but I  
don't understand how to sync two timers.
I made a TestFTSP sandbox where event Receive.receives sync messages  
[0x3E] and sends data to BaseStation.

Timer1 should fire simultaneously on all motes - how to accomplish that?
Timer1 is started in Receive.receive event.
I think I should play with: call Timer1. startPeriodicAt(t0, PERIOD);
What should I choose for timerbase t0 to get it sync with globalTime?

I calculated correctionPeriod = (uint32_t)((globalTime - localTime) %  
PERIOD); what shows period difference between local and globaltime.


Any ideas how to get timers sync with globalTime?


Andres Vahter




#include "TestFtsp.h"
#include "RadioCountToLeds.h"

#define PERIOD  4096

module TestFtspC
{
 uses
 {
 interface GlobalTime;
 interface TimeSyncInfo;
 interface Receive;
 interface AMSend;
 interface Packet;
 interface Leds;
 interface PacketTimeStamp;
 interface Boot;
 interface SplitControl as RadioControl;
  interface Timer as Timer1;
  interface Timer as SyncShotTimer;
 }
}

implementation
{
 message_t msg;
 bool locked = FALSE;

 uint32_t localTimestamp;
 uint32_t globalTime;
 uint32_t localTime;
 uint32_t correctionPeriod;

 bool is_synced;
 bool timerlocked = TRUE;
 bool sync_ended = FALSE;

 event void Boot.booted() {
 call RadioControl.start();
  //call Timer1.startPeriodic(PERIOD);
 }

 event void Timer1.fired(){

call Leds.led2Toggle();

 }

 event void SyncShotTimer.fired(){

//call Timer1.startPeriodic(PERIOD);

 }


// Receive sync message [0x3E]
 event message_t* Receive.receive(message_t* msgPtr, void*  
payload, uint8_t len)
 {
 call Leds.led0Toggle();
 if (!locked && call PacketTimeStamp.isValid(msgPtr)) {
 radio_count_msg_t* rcm = (radio_count_msg_t*)call  
Packet.getPayload(msgPtr, sizeof(radio_count_msg_t));
 test_ftsp_msg_t* report = (test_ftsp_msg_t*)call  
Packet.getPayload(&msg, sizeof(test_ftsp_msg_t));

localTimestamp = call GlobalTime.getLocalTime();
//call  
PacketTimeStamp.timestamp(msgPtr);  
localTime = localTimestamp; 


 report->src_addr = TOS_NODE_ID;
 report->counter = rcm->counter;
 report->local_rx_timestamp = localTimestamp;

is_synced = call GlobalTime.local2Global(&localTimestamp);  
//call  
GlobalTime.getGlobalTime(&rxTimestamp);
globalTime = localTimestamp;// is_synced = call  
GlobalTime.local2Global(&localTimestamp); overwrites "localTimestamp"

report->is_synced  = is_synced;
 report->global_rx_timestamp = globalTime;  //call  
Timer1.getdt(); //localTimestamp;
 report->skew_times_100 = (uint32_t)call  
TimeSyncInfo.getSkew()*100UL;
 report->ftsp_root_addr = call TimeSyncInfo.getRootID();
 report->ftsp_seq = call TimeSyncInfo.getSeqNum();
 report->ftsp_table_entries = call  
TimeSyncInfo.getNumEntries();




correctionPeriod = (uint32_t)((globalTime - 
localTime) % PERIOD);   
//call GlobalTime.global2Local(&localTimestamp);


if(is_synced == 0){ // Node 
is synced with root
//timerlocked = FALSE;

if(sync_ended == FALSE){//
call 
Timer1.startPeriodicAt((localTime +  
correctionPeriod) ,PERIOD); // timer started
//call 
SyncShotTimer.startOneShot(correctionPeriod);
sync_ended = TRUE;
}
}
else
call Leds.led1Toggle(); // green LED


 if (call AMSend.send(AM_BROADCAST_ADDR, &msg,  
sizeof(test_ftsp_msg_t)) == SUCCESS) {
   locked = TRUE;
 

[Tinyos-help] Timer can't be started within receive()

2009-04-06 Thread Ittipong Khemapech
Hi,

This my be a very stupid question. I need a source to set its timing and
send the data after the control packet from base station has been received.
I start timer within Receive.receive() event but it didn't work. No data
packet has been sent back to the base station.

However, it works fine if the timer is called in
RadioTimeStamping.receivedSFD().

Please let me know what I've missed.

Many thanks,
Ittipong
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer taken for the transmission of a packet and disabling CRC

2008-09-23 Thread Dinesh Koya
Hi all

Can some one tell me how to calculate the time taken for the transmission of a 
packet. For an instance, if I am working with BlinkToRadio on one of my two 
tmotes and BaseStation on the other, I would like to calculate the time for the 
packet to reach the BaseStation from the BlinkToRadio Application mote. How can 
this be implemented at the BaseStation.

And another question is how can I disable CRC on the tmotes running 
BlinkToRadio and BaseStation Applications. What are the files to be changed, 
added and to be wired?

Thanks for any help

Regards
Dinesh



  Unlimited freedom, unlimited storage. Get it now, on 
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer interferes with another Timer?

2008-07-29 Thread Nicola Wegner
I have found a workaround for this one. I have put the
 call TimeoutTimer.startOneShot(5000);
into a task and posted it. In my case this works because the timer
does not have to be very accurate.

Maybe it has something to do with this bug in the tracker:
http://sourceforge.net/tracker/index.php?func=detail&aid=1572439&group_id=28656&atid=393934
I have not tried the suggested solution from there.

Perhaps this can help somebody ;)

Nicola

2008/6/18 Nicola Wegner <[EMAIL PROTECTED]>:
> Hi,
> it seems as my last message from 16th of June has not been send to the
> list members. At least a colleague of mine and myself did not receive
> it although it is listed on the web. Can anybody approve this?
> However here it is again:
>
>
> Hi,
>
> I am stuck with a strange problem. I have two modules M1 and M2 which
> contain a milliseconds timer each. After M1 has finished some
> processing and has stopped its timer it signals an event to a module
> at a higher level which then starts a function in M2. This function in
> M2 starts a timer which is immediately fired after setting it up with
> startPeriodic(..) or startOneShot(...), no matter what value I set as
> delay.
>
> I used LocalTime.get() from HilTimerMilliC to check when the second
> timer fires. When the first timer (in M1) fires once with a delay of
> 1000 milliseconds then the second timer is fired at 1008 ms (value
> from LocalTime.get() ) no matter if I start the timer with 500, 5000
> or 500 ms of delay.
>
> When I do not use M1 at all and call M2 directly it works.
>
> Is it possible that there are any interferences between the two timers?
>
> The timer parts of the code look like this, should be OK in my eyes:
>
> M1
> 
> components new TimerMilliC() as Timer0;
> M1.RetryTimer -> Timer0;
> [...]
> uses interface Timer as RetryTimer;
> [...]
> call RetryTimer.startPeriodic(1000);
> [...]
> event void RetryTimer.fired() {
>   RetryTimer.stop();
>   signal [...]
> }
>
> M2
> 
> components new TimerMilliC() as Timer1;
> M2.TimeoutTimer -> Timer1;
> [...]
> interface Timer as TimeoutTimer;
> [...]
> call TimeoutTimer.startOneShot(5000);
> [...]
> event void TimeoutTimer.fired() {
>   // Debug
>   printf("TimeSync timeout at %d ms.\n", call LocalTime.get());
>   printf("TimeSync time delay %d ms.\n", call TimeoutTimer.getdt());
> }
>
> Any ideas?
>
> Thanks in advance
>
> Nicola
>
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer resolution of TOSSIM

2008-07-27 Thread Paul Stickney
Explanation:
There is no corresponding TOSSIM module implementation.
TOSSIM is a simulator, not an emulator.
Look at TOSDIR/platform/mica/sim -- those are the low-level modules
you get from mica[z].
(TimerMilliC wraps HilTimerMilliC, found in .../sim).

Solution:
(I don't know ^^)

HTH,
Paul

On Tue, Jul 22, 2008 at 8:21 PM, lili <[EMAIL PROTECTED]> wrote:
> I found that in TOSSIM of tinyos-2.x, only milli-level serial
> timer compoents could be used (such as TimerMilliC()). Every time when I
> tried to use higher resolustion components such as Alarm32khz32C() and
> CounterMicro32C(), tossim compiliations would report errors. However, these
> applicatios can be compiled correctly and worked normally on micaz nodes.
> Can anyone explain it? Thanks!
> 
> lili
> 2008-07-23
> ___
> 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


[Tinyos-help] Timer resolution of TOSSIM

2008-07-22 Thread lili
I found that in TOSSIM of tinyos-2.x, only milli-level serial timer compoents 
could be used (such as TimerMilliC()). Every time when I tried to use higher 
resolustion components such as Alarm32khz32C() and CounterMicro32C(), tossim 
compiliations would report errors. However, these applicatios can be compiled 
correctly and worked normally on micaz nodes. 
Can anyone explain it? Thanks!



lili
2008-07-23
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer array

2008-07-22 Thread Paul Stickney
See VirtualizeTimerC.

On Tue, Jul 22, 2008 at 4:43 AM, Antonio <[EMAIL PROTECTED]> wrote:
> Hi All,
> I would like to know if is it possible to have an array of Timer in TinyOS
> 2.0.
>
> I have a pool of Timer to manage, every Timer has the same functionality, it
> can be only a parameter to change.
>
> Thanks a lot for the attention,
>
> Regards, Antonio
>
>
>
>
>
>  --
>  Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>
>  Sponsor:
>  EmailBlog: news, curiosità, tendenze dalla rete ... e le tue opinioni!
>  Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8138&d=22-7
>
> ___
> 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

[Tinyos-help] Timer array

2008-07-22 Thread Antonio
Hi All,
I would like to know if is it possible to have an array of Timer in TinyOS
2.0.

I have a pool of Timer to manage, every Timer has the same functionality, it
can be only a parameter to change. 

Thanks a lot for the attention,

Regards, Antonio



 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 EmailBlog: news, curiosità, tendenze dalla rete ... e le tue opinioni!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8138&d=22-7
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer function in TinyOS

2008-07-09 Thread Somnath Mitra
Hello ,


This millisecond level timer is a binary precision millisecond level timer.

1 sec = 1024 binary milliseconds

so, a call like Timer.start(TIMER_REPEAT, 40) has  frequency 25.6 Hz

as timer fires every = 40 binary milliseconds = 40/1024 (real seconds) =
0.0390625 (real seconds)

So frequency in Hz = 1/0.0390625 (real seconds) = 25.6 Hz

Hope this helped.

Somnath Mitra


Date: Wed, 9 Jul 2008 19:07:34 +0100
From: "Rafael Aguilar Velez" <[EMAIL PROTECTED]>
Subject: [Tinyos-help] Timer function in TinyOS
To: 
Message-ID:
   <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Dear all,



I would really appreciate if you could help me. I am using TinyOS and I am
trying to understand the Timer function. As I have read the units are
(depending if I am using Tmili) in binary milliseconds; it means a function
of 1024 ticks per second. My doubt is this because I don't know if this is
correct or if the function is just in milliseconds (a function of 1000 ticks
per second).

For example if I define the function like: call Timer.start(TIMER_REPEAT,
40)? means that I am working with sensors reading periodically 25.6Hz or
25Hz?



Thank you very much for your answers



Rafael
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer function in TinyOS

2008-07-09 Thread Rafael Aguilar Velez
Dear all,

 

I would really appreciate if you could help me. I am using TinyOS and I am 
trying to understand the Timer function. As I have read the units are 
(depending if I am using Tmili) in binary milliseconds; it means a function of 
1024 ticks per second. My doubt is this because I don't know if this is correct 
or if the function is just in milliseconds (a function of 1000 ticks per 
second).

For example if I define the function like: call Timer.start(TIMER_REPEAT, 40)? 
means that I am working with sensors reading periodically 25.6Hz or 25Hz?

 

Thank you very much for your answers

 

Rafael

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer interferes with another Timer?

2008-06-18 Thread Nicola Wegner
Hi,
it seems as my last message from 16th of June has not been send to the
list members. At least a colleague of mine and myself did not receive
it although it is listed on the web. Can anybody approve this?
However here it is again:


Hi,

I am stuck with a strange problem. I have two modules M1 and M2 which
contain a milliseconds timer each. After M1 has finished some
processing and has stopped its timer it signals an event to a module
at a higher level which then starts a function in M2. This function in
M2 starts a timer which is immediately fired after setting it up with
startPeriodic(..) or startOneShot(...), no matter what value I set as
delay.

I used LocalTime.get() from HilTimerMilliC to check when the second
timer fires. When the first timer (in M1) fires once with a delay of
1000 milliseconds then the second timer is fired at 1008 ms (value
from LocalTime.get() ) no matter if I start the timer with 500, 5000
or 500 ms of delay.

When I do not use M1 at all and call M2 directly it works.

Is it possible that there are any interferences between the two timers?

The timer parts of the code look like this, should be OK in my eyes:

M1

components new TimerMilliC() as Timer0;
M1.RetryTimer -> Timer0;
[...]
uses interface Timer as RetryTimer;
[...]
call RetryTimer.startPeriodic(1000);
[...]
event void RetryTimer.fired() {
   RetryTimer.stop();
   signal [...]
}

M2

components new TimerMilliC() as Timer1;
M2.TimeoutTimer -> Timer1;
[...]
interface Timer as TimeoutTimer;
[...]
call TimeoutTimer.startOneShot(5000);
[...]
event void TimeoutTimer.fired() {
   // Debug
   printf("TimeSync timeout at %d ms.\n", call LocalTime.get());
   printf("TimeSync time delay %d ms.\n", call TimeoutTimer.getdt());
}

Any ideas?

Thanks in advance

Nicola
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Timer interferes with another Timer?

2008-06-16 Thread Nicola Wegner
Hi,

I am stuck with a strange problem. I have two modules M1 and M2 which
contain a milliseconds timer each. After M1 has finished some
processing and has stopped its timer it signals an event to a module
at a higher level which then starts a function in M2. This function in
M2 starts a timer which is immediately fired after setting it up with
startPeriodic(..) or startOneShot(...), no matter what value I set as
delay.

I used LocalTime.get() from HilTimerMilliC to check when the second
timer fires. When the first timer (in M1) fires once with a delay of
1000 milliseconds then the second timer is fired at 1008 ms (value
from LocalTime.get() ) no matter if I start the timer with 500, 5000
or 500 ms of delay.

When I do not use M1 at all and call M2 directly it works.

Is it possible that there are any interferences between the two timers?

The timer parts of the code look like this, should be OK in my eyes:

M1

components new TimerMilliC() as Timer0;
M1.RetryTimer -> Timer0;
[...]
uses interface Timer as RetryTimer;
[...]
call RetryTimer.startPeriodic(1000);
[...]
event void RetryTimer.fired() {
RetryTimer.stop();
signal [...]
}

M2

components new TimerMilliC() as Timer1;
M2.TimeoutTimer -> Timer1;
[...]
interface Timer as TimeoutTimer;
[...]
call TimeoutTimer.startOneShot(5000);
[...]
event void TimeoutTimer.fired() {
// Debug
printf("TimeSync timeout at %d ms.\n", call LocalTime.get());
printf("TimeSync time delay %d ms.\n", call TimeoutTimer.getdt());
}

Any ideas?

Thanks in advance

Nicola
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer fires before it is started

2008-05-22 Thread Urs Hunkeler
Hi Nicole,

Unfortunately I have very little time right now, otherwise I would have 
asked you to send me the code so that I can investigate this problem 
directly.

Just another idea: Maybe the timer value you're using is too big to 
handle. I vaguely seem to remember somebody saying that you cannot use 
the whole range of the uint16_t timeout argument. You could try a 
substantially smaller timeout value (2^15 or even 2^14) and then use a 
counter to only trigger the execution of your original code every other 
or every 4th time.

If this doesn't help I really would install printf to get more detailed 
debugging messages.

Cheers,
Urs

Nicole Neureiter wrote:
> Hi,
> 
> I have two timer objects in my configuration file and I used TOSSIM first on 
> my
> code to see if it was running. With TOSSIM I didn't have any problems. They
> appeared when I put my code on the motes. I use the leds to debug on the motes
> and have one led for each timer. I toggle the Leds. After my optinion the led
> for the periodic timer should go on first and the other led for the other 
> timer
> should go on after that, while the first one should go off then. Meaning the
> leds should not be on together. Unfortunately they are on together.
> 
> Nicole
> 
>> Hi Nicole,
>>
>> I agree with Eric that it is rather unlikely that there is a problem 
>> with the timers in TinyOS. Just to get the most obvious question out of 
>> the way: I'd assume you have two timer objects ("components new 
>> TimerMilliC() as MilliTimer; components new TimerMilliC() as Timer3;")? 
>> Otherwise there might be a confusion between timers.
>>
>> You already seem to have debugging code in your program. If you run your 
>> application in the simulator, do you get this error? If so, it should be 
>> fairly easy to debug the code by inserting more debug statements to 
>> verify that the code really does what you expect. For instance I would 
>> add a dbg() statement before every call to start or stop a timer and 
>> another dbg() statement in the timer tasks. dbg() statements are much 
>> more verbose than LEDs.
>>
>> If you cannot reproduce the error in the simulator, you might want to 
>> consider using the printf library to get debugging messages from the 
>> motes directly (via serial cable): 
>> http://docs.tinyos.net/index.php/The_TinyOS_printf_Library
>>
>> Cheers,
>> Urs
>>
>>
>> Eric Decker wrote:
>>> I've been through the timer code in TinyOS2 pretty throughly.  It is very
>>> low likelihood (via normal code execution, I am discounting a random memory
>>> writer) that a timer can fire before it is started.  There is a control
> cell
>>> in the timer structure *"isrunning"* that has to be set for the fire signal
>>> to happen.  This can only get set if the timer is started.  Now if this bit
>>> is getting set through some other mechanism (like a run away) then all bets
>>> are off.
>>>
>>> >From tos/lib/timer/VirtualizeTimerC.nc.
>>>
>>>   typedef struct
>>>   {
>>> uint32_t t0;
>>> uint32_t dt;
>>> bool isoneshot : 1;
>>> bool isrunning : 1;
>>> bool _reserved : 6;
>>>   } Timer_t;
>>>
>>>
>>>
>>> On Mon, May 19, 2008 at 11:06 AM, Paul Stickney <[EMAIL PROTECTED]> wrote:
>>>
 I do not have a solid answer, but some things you may want to consider
 looking at:
  -Maybe you are calling it with a smaller timeout than you suspect or
 earlier than expected
  -The LED might be turned on by other code (internal or external)
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer fires before it is started

2008-05-21 Thread Nicole Neureiter
Hi,

I have two timer objects in my configuration file and I used TOSSIM first on my
code to see if it was running. With TOSSIM I didn't have any problems. They
appeared when I put my code on the motes. I use the leds to debug on the motes
and have one led for each timer. I toggle the Leds. After my optinion the led
for the periodic timer should go on first and the other led for the other timer
should go on after that, while the first one should go off then. Meaning the
leds should not be on together. Unfortunately they are on together.

Nicole

> Hi Nicole,
> 
> I agree with Eric that it is rather unlikely that there is a problem 
> with the timers in TinyOS. Just to get the most obvious question out of 
> the way: I'd assume you have two timer objects ("components new 
> TimerMilliC() as MilliTimer; components new TimerMilliC() as Timer3;")? 
> Otherwise there might be a confusion between timers.
> 
> You already seem to have debugging code in your program. If you run your 
> application in the simulator, do you get this error? If so, it should be 
> fairly easy to debug the code by inserting more debug statements to 
> verify that the code really does what you expect. For instance I would 
> add a dbg() statement before every call to start or stop a timer and 
> another dbg() statement in the timer tasks. dbg() statements are much 
> more verbose than LEDs.
> 
> If you cannot reproduce the error in the simulator, you might want to 
> consider using the printf library to get debugging messages from the 
> motes directly (via serial cable): 
> http://docs.tinyos.net/index.php/The_TinyOS_printf_Library
> 
> Cheers,
> Urs
> 
> 
> Eric Decker wrote:
> > I've been through the timer code in TinyOS2 pretty throughly.  It is very
> > low likelihood (via normal code execution, I am discounting a random memory
> > writer) that a timer can fire before it is started.  There is a control
cell
> > in the timer structure *"isrunning"* that has to be set for the fire signal
> > to happen.  This can only get set if the timer is started.  Now if this bit
> > is getting set through some other mechanism (like a run away) then all bets
> > are off.
> > 
> >>From tos/lib/timer/VirtualizeTimerC.nc.
> > 
> >   typedef struct
> >   {
> > uint32_t t0;
> > uint32_t dt;
> > bool isoneshot : 1;
> > bool isrunning : 1;
> > bool _reserved : 6;
> >   } Timer_t;
> > 
> > 
> > 
> > On Mon, May 19, 2008 at 11:06 AM, Paul Stickney <[EMAIL PROTECTED]> wrote:
> > 
> >> I do not have a solid answer, but some things you may want to consider
> >> looking at:
> >>  -Maybe you are calling it with a smaller timeout than you suspect or
> >> earlier than expected
> >>  -The LED might be turned on by other code (internal or external)
> 
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer fires before it is started

2008-05-19 Thread Urs Hunkeler
Hi Nicole,

I agree with Eric that it is rather unlikely that there is a problem 
with the timers in TinyOS. Just to get the most obvious question out of 
the way: I'd assume you have two timer objects ("components new 
TimerMilliC() as MilliTimer; components new TimerMilliC() as Timer3;")? 
Otherwise there might be a confusion between timers.

You already seem to have debugging code in your program. If you run your 
application in the simulator, do you get this error? If so, it should be 
fairly easy to debug the code by inserting more debug statements to 
verify that the code really does what you expect. For instance I would 
add a dbg() statement before every call to start or stop a timer and 
another dbg() statement in the timer tasks. dbg() statements are much 
more verbose than LEDs.

If you cannot reproduce the error in the simulator, you might want to 
consider using the printf library to get debugging messages from the 
motes directly (via serial cable): 
http://docs.tinyos.net/index.php/The_TinyOS_printf_Library

Cheers,
Urs


Eric Decker wrote:
> I've been through the timer code in TinyOS2 pretty throughly.  It is very
> low likelihood (via normal code execution, I am discounting a random memory
> writer) that a timer can fire before it is started.  There is a control cell
> in the timer structure *"isrunning"* that has to be set for the fire signal
> to happen.  This can only get set if the timer is started.  Now if this bit
> is getting set through some other mechanism (like a run away) then all bets
> are off.
> 
>>From tos/lib/timer/VirtualizeTimerC.nc.
> 
>   typedef struct
>   {
> uint32_t t0;
> uint32_t dt;
> bool isoneshot : 1;
> bool isrunning : 1;
> bool _reserved : 6;
>   } Timer_t;
> 
> 
> 
> On Mon, May 19, 2008 at 11:06 AM, Paul Stickney <[EMAIL PROTECTED]> wrote:
> 
>> I do not have a solid answer, but some things you may want to consider
>> looking at:
>>  -Maybe you are calling it with a smaller timeout than you suspect or
>> earlier than expected
>>  -The LED might be turned on by other code (internal or external)
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer fires before it is started

2008-05-19 Thread Eric Decker
I've been through the timer code in TinyOS2 pretty throughly.  It is very
low likelihood (via normal code execution, I am discounting a random memory
writer) that a timer can fire before it is started.  There is a control cell
in the timer structure *"isrunning"* that has to be set for the fire signal
to happen.  This can only get set if the timer is started.  Now if this bit
is getting set through some other mechanism (like a run away) then all bets
are off.

>From tos/lib/timer/VirtualizeTimerC.nc.

  typedef struct
  {
uint32_t t0;
uint32_t dt;
bool isoneshot : 1;
bool isrunning : 1;
bool _reserved : 6;
  } Timer_t;



On Mon, May 19, 2008 at 11:06 AM, Paul Stickney <[EMAIL PROTECTED]> wrote:

> I do not have a solid answer, but some things you may want to consider
> looking at:
>  -Maybe you are calling it with a smaller timeout than you suspect or
> earlier than expected
>  -The LED might be turned on by other code (internal or external)
>
>
> Paul
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Research Associate
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer fires before it is started

2008-05-19 Thread Paul Stickney
I do not have a solid answer, but some things you may want to consider
looking at:
  -Maybe you are calling it with a smaller timeout than you suspect or
earlier than expected
  -The LED might be turned on by other code (internal or external)


Paul
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Timer fires before it is started

2008-05-19 Thread Nicole Neureiter
Hi all,

I have a problem using two timers under tinyos-2.x with micaz modes. I have my
code ín one file and tried it. I use two timers, one, to start a function
periodic and one to timeout this function and use the leds for debugging. For
the Timeout timer I use the red led and another led for the other timer.
Unfortunately the red led is trigerred, before the timer after my opinion is
called, as it goes on with my periodic timer, but should fire some time after
that. I give you part of my code in the following and hope that somebody can
tell me why this is.

Nicole Neureiter


module ConvergecastAuthM {
  provides interface ConvergecastAuth;
  uses {
interface Leds;
 [..]
interface Timer as MilliTimer;
interface Timer as Timer3;

  }
}

implementation {

 
/*
   *
   * AGGREGATOR + NODE: process upflow msg, e.g. save upflow-data
   *
   **/

  void processUpflowInit() {
// extract nodecount and nonce from msg
 CcAuthUpflowInitMsg_t *recvMsg = (CcAuthUpflowInitMsg_t*)
incPacketQueue[nextIncPacket].payload;
myRndNonce = recvMsg->rndNonce;
myNodeCount = recvMsg->nodeCount;
call Leds.led2Toggle();//gelb sollte angehen an allen knoten, die dies
ausführen
while(UsedRndNonce[count] != myRndNonce)
  {
 verified[count] = FALSE;
 count++;
//sets count to the actual roundnumber
  }
 if (count == MAX_RNDNONCES)
   {
 //call Leds.led0On();
 dbg("Nonce wurde nicht gefunden, Fehler !!!");
 return;
  }
   // init aggregator
  else {if(I_AM_AGGREGATOR) {
   // intitialize stuff & timer
 nodeCounter = 0;
 statFlags.timeOutOccured = FALSE;
 verified[count] = FALSE;
 // timeout timer 
 call MilliTimer.startOneShot(TIMEOUT);
 // seed list
 idList[count][0] = TOS_NODE_ID;
}
// read sensor-data
  call Read.read();
   }
}
   



   
  void processNonces()
  { //uint8_t i;
CcAuthSendNonces_t* recMsg = (CcAuthSendNonces_t*) lastPayload;
// for(i = 0; i < MAX_RNDNONCES; i++)
 memcpy(UsedRndNonce, recMsg->RndNonces, MAX_RNDNONCES);
 //call Leds.led1On();
if(I_AM_AGGREGATOR)
  call Timer3.startPeriodic(61440);
 }


  // compute next packet
  task void processNextPacket() {
// decide what to do.. and start corresponding function
dbg("AM", "Received Packet (packets in queue=%i)\n\tProcessing NOW:\n",
incPacketsLeft);
switch (incPacketQueue[nextIncPacket].msgType) {
case MSG_SEND_NONCES:
  fsmState = IDLE;
  processNonces();
  break;
  case MSG_UPFLOW_INIT:
fsmState = UPFLOW;
processUpflowInit();
   break;
case MSG_UPFLOW_ANSWER://should only be received and handled by the
aggregator
  if ((I_AM_AGGREGATOR) && (fsmState == UPFLOW))
  {
  // call Leds.led1On();//grün sollte an gehen am aggregator
processInitialSensorData();}
break;
}
// advance to next packet
nextIncPacket = nextIncPacket+1 % PACKET_QUEUE_SIZE;
incPacketsLeft--;  
  }

 task void errorHandler() {
dbg("SYS", "\n\n SINK REPORTS CRITICAL ERROR *\n\n");
  }
  
  /*
   *
   * The aggregator send this message every 10 to 15 min to start th execution
of the upflow
   * phase
   *
   ***/
  
   void send_MSG_UPFLOW_INIT() {
   message_t myPacket;

CcAuthUpflowInitMsg_t *myMsg = (CcAuthUpflowInitMsg_t*) call
Packet.getPayload(&myPacket,NULL);
// construct msg
// myRndNonce = UsedRndNonce[count];
myMsg->msgHdr.msgType = MSG_UPFLOW_INIT;// this msg will kick off the
upflow
myMsg->rndNonce = UsedRndNonce[count];   // random nonce
myMsg->nodeCount = CLUSTER_SIZE-1;// expected number of nodes
dbg("SYS","BROADCASTING: MSG_UPFLOW_INIT\n");
sendPacket(AM_BROADCAST_ADDR, sizeof(CcAuthUpflowInitMsg_t),myPacket);
  }

  /*
   *
   * Timer functions for the aggregator
   *
   **/

   event void Timer3.fired()//aggregator starts one run of upflow phase
  { if(count < MAX_RNDNONCES)
{
  fsmState = UPFLOW;
  call Leds.led1Toggle();//grün sollte an und ausgehen
  send_MSG_UPFLOW_INIT();
  processUpflowInit();
}
   }
 


  // just set timeOut=TRUE, used by aggregator only
  event void MilliTimer.fired() 
  {
statFlags.timeOutOccured = TRUE;
call Leds.led0Toggle();//rot sollte angehen
  }

  /
   *
   * Initialization of the motes 
   *
   */


  event void Boot.booted()//boots the motes
  { 
call AMControl.start(); //is done for all nodes
  }


 
  /**

Re: [Tinyos-help] TIMER

2008-04-21 Thread Ittipong Khemapech
TEP102 should be useful to you:

http://www.tinyos.net/tinyos-2.x/doc/html/tep102.html

Ittipong

On 21/04/2008, renjie huang <[EMAIL PROTECTED]> wrote:
>
> That depends.
>
> In tinyos-1.x, TimerC module is in milli-second *granularity. And the
> minimum interval is 3 milli-second. The maximum interval is uint32_t *
>
> *In T2, besides  milli-second granularity, * *granularity of micro-second
> is also supported. You can also use 32KHz clock if necessary.*
> **
> *Check the source code is a better way to know clear about it.*
> **
> **
>
>
> On 4/21/08, subhash nemani <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> > what is the minimum and maximum interval for timers of tmotesky
> > > kit
> > >
> >
> >
> > ___
> > Tinyos-help mailing list
> > Tinyos-help@millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
>
>
>
> --
> Renjie Huang
> Sensorweb Research Laboratory
> http://sensorweb.vancouver.wsu.edu/
> Washington State University
> ___
> 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

Re: [Tinyos-help] TIMER

2008-04-21 Thread renjie huang
That depends.

In tinyos-1.x, TimerC module is in milli-second *granularity. And the
minimum interval is 3 milli-second. The maximum interval is uint32_t *

*In T2, besides  milli-second granularity, * *granularity of micro-second is
also supported. You can also use 32KHz clock if necessary.*
**
*Check the source code is a better way to know clear about it.*
**
**


On 4/21/08, subhash nemani <[EMAIL PROTECTED]> wrote:
>
>
>
>
> what is the minimum and maximum interval for timers of tmotesky
> > kit
> >
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Renjie Huang
Sensorweb Research Laboratory
http://sensorweb.vancouver.wsu.edu/
Washington State University
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] TIMER

2008-04-21 Thread subhash nemani
what is the minimum and maximum interval for timers of tmotesky kit
>
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer firing

2008-04-18 Thread Michael Schippling
If the received packet length field is 0 then I have no clue.
I don't know what having the destpan field changed means either.
Assuming that you are using a standard TOSBase basestation
and your sending program is not making mistakes, you should see
all your packets, either full or dropped because of transmit
errors. If you use GenericComm to send the packets it will self-
throttle if you overrun and just return an error from the send(),
it shouldn't truncate messages though.

MS


Poonam Hiwal wrote:
> hi ,
>  
> I am using Listen program, but some packets are received with payload 0 
> and some are complete. As I am increasing the Load in the network, the 
> frequency of full pactes are dropping...
> what I found  that once the destpan field of the received packet is 
> changed automatically and after that all packets are received with 
> payload 0.
>  
> I tested the code with timer firing after 128 ms, then there is 
> improvement in the no of received packets...
>  
> I don't understand where the problem is.?
>  
> thanks,
> Poonam
> 
>  
> On 4/18/08, *Michael Schippling* <[EMAIL PROTECTED] 
> > wrote:
> 
> That's a little fast for mica2s but should be ok for devices with
> the CC2420 radio. But you should see the full packet no matter what.
> What are you using to look at the received messages and how are you
> changing the lengths?
> 
> MS
> 
> Poonam Hiwal wrote:
> 
> Hello Everyone,
>  I have one question regarding how much tinyos code take time to
> execute a application. Becaus ein my application, the timer is
> fired after every 32 millisecond and receiver node is receiving
> nearly 30 packets each of 40 bytes. It is receiving only the
> header of the packets not the content. but If I amm reducing the
> load, it is receiving the complete packets, I am not able to
> understand why it is happening? Is there any congestion at
> receiver (sink) or all this is due to timer.
>  If anyone can help me in solving this, that would be good.
>  Thanks,
> Poonam
>   
> 
> 
> 
> 
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> 
> 
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 
> 
> -- 
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew
> 
> 

-- 
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer firing

2008-04-18 Thread Poonam Hiwal
hi ,

I am using Listen program, but some packets are received with payload 0 and
some are complete. As I am increasing the Load in the network, the frequency
of full pactes are dropping...
what I found  that once the destpan field of the received packet is changed
automatically and after that all packets are received with payload 0.

I tested the code with timer firing after 128 ms, then there is improvement
in the no of received packets...

I don't understand where the problem is.?

thanks,
Poonam


On 4/18/08, Michael Schippling <[EMAIL PROTECTED]> wrote:
>
> That's a little fast for mica2s but should be ok for devices with
> the CC2420 radio. But you should see the full packet no matter what.
> What are you using to look at the received messages and how are you
> changing the lengths?
>
> MS
>
> Poonam Hiwal wrote:
>
> > Hello Everyone,
> >  I have one question regarding how much tinyos code take time to execute
> > a application. Becaus ein my application, the timer is fired after every 32
> > millisecond and receiver node is receiving nearly 30 packets each of 40
> > bytes. It is receiving only the header of the packets not the content. but
> > If I amm reducing the load, it is receiving the complete packets, I am not
> > able to understand why it is happening? Is there any congestion at receiver
> > (sink) or all this is due to timer.
> >  If anyone can help me in solving this, that would be good.
> >  Thanks,
> > Poonam
> >
> >
> > 
> >
> > ___
> > Tinyos-help mailing list
> > Tinyos-help@millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
>
> --
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew
>
>
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Timer firing

2008-04-18 Thread Michael Schippling
That's a little fast for mica2s but should be ok for devices with
the CC2420 radio. But you should see the full packet no matter what.
What are you using to look at the received messages and how are you
changing the lengths?

MS

Poonam Hiwal wrote:
> Hello Everyone,
>  
> I have one question regarding how much tinyos code take time to execute 
> a application. Becaus ein my application, the timer is fired after every 
> 32 millisecond and receiver node is receiving nearly 30 packets each of 
> 40 bytes. It is receiving only the header of the packets not the 
> content. but If I amm reducing the load, it is receiving the complete 
> packets, I am not able to understand why it is happening? Is there any 
> congestion at receiver (sink) or all this is due to timer.
>  
> If anyone can help me in solving this, that would be good.
>  
> Thanks,
> Poonam
>  
>  
> 
> 
> 
> 
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

-- 
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Timer firing

2008-04-18 Thread Poonam Hiwal
Hello Everyone,

I have one question regarding how much tinyos code take time to execute a
application. Becaus ein my application, the timer is fired after every 32
millisecond and receiver node is receiving nearly 30 packets each of 40
bytes. It is receiving only the header of the packets not the content. but
If I amm reducing the load, it is receiving the complete packets, I am not
able to understand why it is happening? Is there any congestion at receiver
(sink) or all this is due to timer.

If anyone can help me in solving this, that would be good.

Thanks,
Poonam
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

RE: [Tinyos-help] Timer synchronization problem

2008-03-10 Thread Murray, Ben
The timer is not running in "actual" milliseconds. Have a read of the Timer
tep (I think it's tep102) to see just what can happen (the appendix of
tep102 contains a number of references to the //actual// clock frequencies.
What you are using is probably (and this is just a guess...) actually a
1024hz tick rather than a 1000hz tick. 10 seconds is therefore approx 10240
clock ticks. Bit of maths on your debug should help you confirm this.

e.g.
> TIMER_INTERVAL=10251
> DEBUG (1): Timer fired at time 20.021504
> DEBUG (1): Timer fired at time 30.032247

30.032247 - 20.021504 = 10.010743
10251 * (1 / 1024) =10.0107421875

Hope that helps!
-Ben


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Iñigo
> Urteaga
> Sent: 08 March 2008 00:50
> To: tinyos-help; TinyOS-Devel list
> Subject: [Tinyos-help] Timer synchronization problem
> 
> 
> Hi,
> 
> I'm trying to synchronize a simulation in TOSSIM with an application
> running a PDE model.  I have timers (using Timer) firing every
> 10 seconds in each node to read a variable that I am updating using
> the TOSSIM radio packet injection interface.  From debug outputs using
> sim_time()/sim_ticks_per_sec() it appears that the timer is firing at
> intervals just less than 10 seconds, i.e., when TIMER_INTERVAL=1
> the timer fires at slightly less than 10 seconds.  Setting the timer
> interval for 10251 milliseconds seems to give the best results.
> However, using this, the timer fires at intervals slightly greater
> than 10 seconds using startPeriodic(TIMER_INTERVAL) (debug provided
> below).  Debug for TIMER_INTERVAL=10250 is also provided, notice that
> the timer fires at just slightly under 10 seconds.  My knowledge of
> TOSSIM is not deep enough to know why this might be the case, or if
> there is an easy way around this problem.
> 
> Thanks in advance for any help.
> 
> Kevin Barnhart
> 
> 
> TIMER_INTERVAL=10251
> 
> 
> DEBUG (1): Timer fired at time 20.021504
> DEBUG (1): Timer fired at time 30.032247
> DEBUG (1): Timer fired at time 40.042989
> DEBUG (1): Timer fired at time 50.053731
> DEBUG (1): Timer fired at time 60.064473
> DEBUG (1): Timer fired at time 70.075215
> DEBUG (1): Timer fired at time 80.085958
> DEBUG (1): Timer fired at time 90.096700
> DEBUG (1): Timer fired at time 100.107442
> DEBUG (1): Timer fired at time 110.118184
> DEBUG (1): Timer fired at time 120.128926
> DEBUG (1): Timer fired at time 130.139668
> DEBUG (1): Timer fired at time 140.150411
> DEBUG (1): Timer fired at time 150.161153
> DEBUG (1): Timer fired at time 160.171895
> DEBUG (1): Timer fired at time 170.182637
> DEBUG (1): Timer fired at time 180.193379
> DEBUG (1): Timer fired at time 190.204122
> DEBUG (1): Timer fired at time 200.214864
> DEBUG (1): Timer fired at time 210.225606
> DEBUG (1): Timer fired at time 220.236348
> DEBUG (1): Timer fired at time 230.247090
> DEBUG (1): Timer fired at time 240.257833
> DEBUG (1): Timer fired at time 250.268575
> DEBUG (1): Timer fired at time 260.279317
> DEBUG (1): Timer fired at time 270.291036
> DEBUG (1): Timer fired at time 280.300801
> DEBUG (1): Timer fired at time 290.311543
> DEBUG (1): Timer fired at time 300.322286
> DEBUG (1): Timer fired at time 310.333028
> DEBUG (1): Timer fired at time 320.343770
> DEBUG (1): Timer fired at time 330.354512
> DEBUG (1): Timer fired at time 340.365254
> DEBUG (1): Timer fired at time 350.375997
> DEBUG (1): Timer fired at time 360.386739
> 
> TIMER_INTERVAL=10250
> 
> 
> DEBUG (1): Timer fired at time 20.021504
> DEBUG (1): Timer fired at time 30.031270
> DEBUG (1): Timer fired at time 40.041036
> DEBUG (1): Timer fired at time 50.050801
> DEBUG (1): Timer fired at time 60.060567
> DEBUG (1): Timer fired at time 70.070333
> DEBUG (1): Timer fired at time 80.080098
> DEBUG (1): Timer fired at time 90.089864
> DEBUG (1): Timer fired at time 100.099629
> DEBUG (1): Timer fired at time 110.109395
> DEBUG (1): Timer fired at time 120.119161
> DEBUG (1): Timer fired at time 130.128926
> DEBUG (1): Timer fired at time 140.138692
> DEBUG (1): Timer fired at time 150.148458
> DEBUG (1): Timer fired at time 160.158223
> DEBUG (1): Timer fired at time 170.167989
> DEBUG (1): Timer fired at time 180.177754
> DEBUG (1): Timer fired at time 190.187520
> DEBUG (1): Timer fired at time 200.197286
> DEBUG (1): Timer fired at time 210.207051
> DEBUG (1): Timer fired at time 220.216817
> DEBUG (1): Timer fired at time 230.226583
> DEBUG (1): Timer fired at time 240.236348
> DEBUG (1): Timer fired at time 250.246114
> DEBUG (1): Timer fired at time 260.255879
> DEBUG (1): Timer fired 

[Tinyos-help] Timer synchronization problem

2008-03-07 Thread Iñigo Urteaga
Hi,

I'm trying to synchronize a simulation in TOSSIM with an application
running a PDE model.  I have timers (using Timer) firing every
10 seconds in each node to read a variable that I am updating using
the TOSSIM radio packet injection interface.  From debug outputs using
sim_time()/sim_ticks_per_sec() it appears that the timer is firing at
intervals just less than 10 seconds, i.e., when TIMER_INTERVAL=1
the timer fires at slightly less than 10 seconds.  Setting the timer
interval for 10251 milliseconds seems to give the best results.
However, using this, the timer fires at intervals slightly greater
than 10 seconds using startPeriodic(TIMER_INTERVAL) (debug provided
below).  Debug for TIMER_INTERVAL=10250 is also provided, notice that
the timer fires at just slightly under 10 seconds.  My knowledge of
TOSSIM is not deep enough to know why this might be the case, or if
there is an easy way around this problem.

Thanks in advance for any help.

Kevin Barnhart


TIMER_INTERVAL=10251


DEBUG (1): Timer fired at time 20.021504
DEBUG (1): Timer fired at time 30.032247
DEBUG (1): Timer fired at time 40.042989
DEBUG (1): Timer fired at time 50.053731
DEBUG (1): Timer fired at time 60.064473
DEBUG (1): Timer fired at time 70.075215
DEBUG (1): Timer fired at time 80.085958
DEBUG (1): Timer fired at time 90.096700
DEBUG (1): Timer fired at time 100.107442
DEBUG (1): Timer fired at time 110.118184
DEBUG (1): Timer fired at time 120.128926
DEBUG (1): Timer fired at time 130.139668
DEBUG (1): Timer fired at time 140.150411
DEBUG (1): Timer fired at time 150.161153
DEBUG (1): Timer fired at time 160.171895
DEBUG (1): Timer fired at time 170.182637
DEBUG (1): Timer fired at time 180.193379
DEBUG (1): Timer fired at time 190.204122
DEBUG (1): Timer fired at time 200.214864
DEBUG (1): Timer fired at time 210.225606
DEBUG (1): Timer fired at time 220.236348
DEBUG (1): Timer fired at time 230.247090
DEBUG (1): Timer fired at time 240.257833
DEBUG (1): Timer fired at time 250.268575
DEBUG (1): Timer fired at time 260.279317
DEBUG (1): Timer fired at time 270.291036
DEBUG (1): Timer fired at time 280.300801
DEBUG (1): Timer fired at time 290.311543
DEBUG (1): Timer fired at time 300.322286
DEBUG (1): Timer fired at time 310.333028
DEBUG (1): Timer fired at time 320.343770
DEBUG (1): Timer fired at time 330.354512
DEBUG (1): Timer fired at time 340.365254
DEBUG (1): Timer fired at time 350.375997
DEBUG (1): Timer fired at time 360.386739

TIMER_INTERVAL=10250


DEBUG (1): Timer fired at time 20.021504
DEBUG (1): Timer fired at time 30.031270
DEBUG (1): Timer fired at time 40.041036
DEBUG (1): Timer fired at time 50.050801
DEBUG (1): Timer fired at time 60.060567
DEBUG (1): Timer fired at time 70.070333
DEBUG (1): Timer fired at time 80.080098
DEBUG (1): Timer fired at time 90.089864
DEBUG (1): Timer fired at time 100.099629
DEBUG (1): Timer fired at time 110.109395
DEBUG (1): Timer fired at time 120.119161
DEBUG (1): Timer fired at time 130.128926
DEBUG (1): Timer fired at time 140.138692
DEBUG (1): Timer fired at time 150.148458
DEBUG (1): Timer fired at time 160.158223
DEBUG (1): Timer fired at time 170.167989
DEBUG (1): Timer fired at time 180.177754
DEBUG (1): Timer fired at time 190.187520
DEBUG (1): Timer fired at time 200.197286
DEBUG (1): Timer fired at time 210.207051
DEBUG (1): Timer fired at time 220.216817
DEBUG (1): Timer fired at time 230.226583
DEBUG (1): Timer fired at time 240.236348
DEBUG (1): Timer fired at time 250.246114
DEBUG (1): Timer fired at time 260.255879
DEBUG (1): Timer fired at time 270.265645
DEBUG (1): Timer fired at time 280.275411
DEBUG (1): Timer fired at time 290.285176
DEBUG (1): Timer fired at time 300.294942
DEBUG (1): Timer fired at time 310.304708
DEBUG (1): Timer fired at time 320.314473
DEBUG (1): Timer fired at time 330.324239
DEBUG (1): Timer fired at time 340.334004
DEBUG (1): Timer fired at time 350.343770
DEBUG (1): Timer fired at time 360.353536
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] timer atm2560

2008-03-06 Thread Domenico Arenga
Hello, I should get to the timer atm2560, you have some idea of the
direction to take?

thanks a lot,

Domenico Arenga.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timer interval in micaZ

2008-01-28 Thread Nelson Dopico

Hello,

I am currently working on the micaZ platform using TinyOS 1.1.15. Since my application 
needs to schedule certain tasks every several minutes or even hours, the maximum timer 
interval is required. Timer interface uses a uint32_t type parameter, however, it says 
"Unfortunately this interface does not specify the valid range of timer intervals, 
which are specific to a platform". I have checked HPLClockM in 
/tos/platform/atmega8, but I am unable to find the answer.
Does anyone know the maximum timer interval in micaZ?

Thanks in advance,

Nelson Dopico 
--

ETSI Telecomunicación
+34 91549 57 00 (#4006)
nelsongaps.ssr.upm.es


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Timer running with TOSSIM 2.x

2007-12-06 Thread Vijayant Bhatnagar
i figured out the problem. I have fixed it and it is working perfectly!!!
There was a minor fault in wiring.

thanks,
Vijayant Bhatnagar
Rutgers.


On Dec 6, 2007 5:42 PM, Vijayant Bhatnagar <[EMAIL PROTECTED]>
wrote:

> Secondly,
> for the two periodic timers (with different periods), when i do getNOW(),
> i get the same value. From the previous threads, i could find out that there
> is only one reference timer. But does this  mean that I can't have two
> timers ? How can i get the exact value of timer ? I tried doing
> getNow()-getT0() but all in vain.
>
> any help is appreciated.
>
> thanks,
> Vijayant
>
>
> On Dec 6, 2007 5:35 PM, Vijayant Bhatnagar <[EMAIL PROTECTED]>
> wrote:
>
> > Even I am facing similar kind of problem. Can anyone help me please.
> >
> > help appreciated.
> >
> > thanks,
> > Vijayant
> >
> > On Dec 6, 2007 1:28 AM, EunKyung Lee < [EMAIL PROTECTED]> wrote:
> >
> > > Dear.
> > >
> > > I made two timer and generate 10 nodes and run my application on
> > > Tossim.
> > > But both of timers are fired at the same time even though I gave them
> > > a different start time. and periodic fire times.
> > >
> > > Has anybody experienced the same problem?..
> > >
> > > Any commend will be appreciated.
> > > Thank you
> > >
> > > ___
> > > 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

Re: [Tinyos-help] Timer running with TOSSIM 2.x

2007-12-06 Thread Vijayant Bhatnagar
Secondly,
for the two periodic timers (with different periods), when i do getNOW(), i
get the same value. From the previous threads, i could find out that there
is only one reference timer. But does this  mean that I can't have two
timers ? How can i get the exact value of timer ? I tried doing
getNow()-getT0() but all in vain.

any help is appreciated.

thanks,
Vijayant

On Dec 6, 2007 5:35 PM, Vijayant Bhatnagar <[EMAIL PROTECTED]>
wrote:

> Even I am facing similar kind of problem. Can anyone help me please.
>
> help appreciated.
>
> thanks,
> Vijayant
>
> On Dec 6, 2007 1:28 AM, EunKyung Lee < [EMAIL PROTECTED]> wrote:
>
> > Dear.
> >
> > I made two timer and generate 10 nodes and run my application on Tossim.
> >
> > But both of timers are fired at the same time even though I gave them a
> > different start time. and periodic fire times.
> >
> > Has anybody experienced the same problem?..
> >
> > Any commend will be appreciated.
> > Thank you
> >
> > ___
> > 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

Re: [Tinyos-help] Timer running with TOSSIM 2.x

2007-12-06 Thread Vijayant Bhatnagar
Even I am facing similar kind of problem. Can anyone help me please.

help appreciated.

thanks,
Vijayant

On Dec 6, 2007 1:28 AM, EunKyung Lee <[EMAIL PROTECTED]> wrote:

> Dear.
>
> I made two timer and generate 10 nodes and run my application on Tossim.
> But both of timers are fired at the same time even though I gave them a
> different start time. and periodic fire times.
>
> Has anybody experienced the same problem?..
>
> Any commend will be appreciated.
> Thank you
>
> ___
> 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

[Tinyos-help] Timer running with TOSSIM 2.x

2007-12-05 Thread EunKyung Lee
Dear.

I made two timer and generate 10 nodes and run my application on Tossim.
But both of timers are fired at the same time even though I gave them a
different start time. and periodic fire times.

Has anybody experienced the same problem?..

Any commend will be appreciated.
Thank you
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

  1   2   >