Check out, from the series of methods, the program follows for transmit mode, where do they actually turn on the radio, i.e. the startVReg command and then start your time from there. Well, for CC2420 radio, the default MAC availabe in Tinyos source tree is B-MAC+, which is a contention based protocol, as far as a TDMA based approach is concerned, I have no idea whether there is any protocol implementation available for that for CC2420 radio. So, sorry I cannot help you for that.
VG, Wasif! On Thu, Sep 20, 2012 at 6:35 PM, Han Bin <[email protected]> wrote: > > > wasif masood wrote: > > > > Dear Han, > > > > True, as I already mentioned that its has been some time that I haven't > > looked into this code, and am not sure whether this is the most > up-to-date > > copy of the code I have actually used, so looking at what I have sent to > > you, it just profile the receiving mode of the radio. > > > > So what you need to do is to look into CC2420Power Component. The first > > thing you will notice is the three different commands that relates to the > > different states of the radio and these are: > > > > CC2420Power.startVReg(), > > CC2420Power.startOscillator(), > > CC2420Power.rxOn(), > > and there stop versions accordingly, > > > > these events gives us the information about the different states the > radio > > is at present, I am not sure, you need to check out the datasheet, coz I > > dont have time to get into such details, which of these events > corresponds > > to which state of the radio, like rxOn() is pretty much self explanatory > > i.e. turning radio in receive mode, similarly I guess, startVReg() turns > > the radio in Idle mode and startOscillator() switches it into transmit > > mode, but again not sure, check out the implementation for more detail. > > Now, from the current version of the code, you get the idea that how to > > calculate the time spent in a specific state of the radio, do the same > > thing for each of the other states, atleast for transmit and Idle. And > > beware, it doesn't really matter whether the radio is receiving anything > > or > > not, as long as the radio is in receive mode it consumes the energy as > > mentioned in the datasheet of CC2420. > > > > Please don't hesitate to contact me for any further details, I think it > > would be a good contribution to tinyos repository if we would able to get > > this online energy estimation done. Regarding Avrora simulator, I am sure > > they must have been doing the same stuff! > > > > > > cheeers, > > Wasif! > > > > > > Dear Wasif, > Yes, you're correct. When the radio is ON, the radio consumes 19.7mA even > though it doesn't receive anything. And in transmit mode, it consumes less > energy than in receive mode, depending on the transmitting power level. > The process when we turn ON and OFF radio is as below (as in > CC2420CsmaP.c): > *Turn radio ON: SplitControl.start() -> CC2420Power.startVReg() -> call > Resource.request() -> CC2420Power.startOscillator() -> CC2420Power.rxOn() > *Turn radio OFF: SplitControl.stop() -> CC2420Power.stopVReg() > > So, when we turn the radio, it works in receive mode. It'll change to > transmit mode as CC2420Transmit.send is called. The transmission process is > as follow (as shown in CC2420TransmitP.nc): > > Send.send() -> send() ->AcquireSpiresource() -> loadtxfifo() -> > TXFIFO.write() ->TXFIFO.writedone() ->AttemptSend() -> CaptureSFD.capture() > [optional] -> signalDone() ->Send.sendDone(). > > I need to calculate exactly the time when radio is in transmit mode but I > don't know where I need to count the time? maybe from the time > AttemptSend() > is called? > > One more question. In my protocol, mote works in a duty cycle. A cycle > consists of contention period (CP) and contention free period (CFP), > similar > to TreeMAC. In CP, I use CC2420ActiveMessage module to send packet (CSMA > mode). In CFP, each node is assigned dedicated slots for sending packet (no > collision, as in TDMA mode), so I don't want to use CC2420ActiveMessage > for sending packet, because it takes a lot of time. In this case, which > component I can use to send packet with delay time as less as possible? > I'm looking for any help from you all. > > Thanks, > Han Bin > http://old.nabble.com/file/p34458386/CC2420TransmitP.nc CC2420TransmitP.nc > > -- > View this message in context: > http://old.nabble.com/Energy-consumption-on-Telosb-tp34443559p34458386.html > Sent from the TinyOS - Help mailing list archive at Nabble.com. > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Wasif Masood
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
