I apologize myself for errors I wrote in the previous email..I've used wrong
jiffy duration in my
calculations...
Here it is the previous question but with correct values:
When I have to send a packet of length X, this is how the cc2420 should behave
(in the current svn version of TinyOS 2.x):
1) Turn on the Voltage regulator and oscillator (0.61 + 0.86 (=1.47)ms
repectively
----> 20 jiffies of CC2420_TIME_VREN + 0.86 of oscillator (from cc2420
datasheet)
----> 20* 0.0305 + 0.86 ms.
Here the average current drain is quite low..it is about 0.020 mA, right?
2) Go into backoff (Collision Avoidance) (from 0.1525 to 0.61 ms
----> random number between 10 and 4*10 symbols
----> 5*(0.0305ms) and 20*(0.0305ms) respectively.
Remark that in 1 jiffy I can transmit 2 symbols).
What is the energy consumption of the backoff period?
I think that in this phase the radio is listening to the channel..isn't it?
In this case the (average) current drain would be about 20-21 mA (listen).
3) If Channel is free (CCA) then start transmit immediately.
What is the power consumption of CCA establishment?
Is it really a passive measure??
4) At this point the radio start transmitting.
If the payload has X bytes then, since from TinyOS 2.x CC2420 support variable
payload lengths, we will have:
12 symbols (preamble, sfd, phy header i.e., 6bytes) +
4 symbols (CRC i.e. 2 bytes) +
X*2 symbols (payload i.e., X bytes) =
-----------> (12 + 4 + 2X)/2*0.0305ms = 1.098 ms for a payload of 28 bytes
5) Wait for an ACK reply:
--------> min: 12 symbols + 11bytes = 34 symbols
-------------> 34/2 * 0.0305 = 0.5185 ms
--------> max: 256 jiffies ->256 * 0.0305 ms = 7.808 ms
Also here, the radio is in listening state, right?
6) If no ack is received, repeat from point 3 but this time,
if channel is free (CCA), wait CC2420_TIME_ACK_TURNAROUND jiffies
just to be sure to not being waiting for an ACK.
Thus wait others 7*0.0305ms--->0.2135 ms.
Also here, what is the current drain of CCA measurement? Does it comes really
for free (as a register reading)??
7) Continue repeating steps from 3 to 6 (for all the duration of the receiver's
sleep interval + 20 ms. Thus we will have an average periodic packetized wake-up
of period 1.69275 ms (for a data packet of 28 bytes)
{Calculated in this manner:
-----> 0.2135(ack_turnaround_wait) +
-----> 1.098 (packet sending)+
-----> ((0.61-0.1525)/2 + 0.1525) (Average backoff)
}.
Voltage regulator and oscillator startup time are not taken into account because
they are present only at the first sending.
Althought the documentation says
"The transmitters perform a message delivery by transmitting the full
packet over and over again for twice the duration of the receiver’s
duty-cycle
period",
in the code (/opt/tinyos-2.x/tos/chips/cc2420/lpl/DefaultLplP.nc) what happens
is:
call SendDoneTimer.startOneShot(
call LowPowerListening.getRxSleepInterval(currentSendMsg) + 20);
thus, this packetized wake-up has a maximum duration (if no ack is received or
for broadcasted messages) of "receiver's sleep interval + 20 ms", as I said.
Right? Is documentation wrong..?
8) If during this process an ACK is received (only for unicast TX),
then stop and go back to sleep only AFTER LISTENING to the channel f
or others DELAY_AFTER_RECEIVE/1024 seconds (in order to favour burst
receptions/transmissions).
Is all this process right??
Bugs of Tossim are reported in the other mail
(http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2008-August/035658.html).
At least they are reported correctly...
Best regards,
FP
Posta, news, sport, oroscopo: tutto in una sola pagina.
Crea l'home page che piace a te!
www.yahoo.it/latuapagina
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help