Samraksh / eMote

eMote OS -- Multiple Ports (using .NET MF v4.3)
0 stars 0 forks source link

CSMA: turn radio off #362

Open WilliamAtSamraksh opened 8 years ago

WilliamAtSamraksh commented 8 years ago

eMote v. 14. When measuring power usage for CSMA, I noticed that once the radio is turned on it cannot be turned off. The radio class has a TurnOn() method but not a TurnOff(). So for programs that use the radio only occasionally, power for the radio is consumed even when there's no need for it. My measurements indicate that the continuous draw is about 5.2 mA; idle at low CPU power is about 1.6 mA, so radio takes 3.5 times CPU.

So we need a way to turn the power off completely. Technically it's not a bug but I'm assigning that label anyway since it's in contradiction to our claim that eMote .NOW is low power.

Nathan-Stohs commented 8 years ago

When measuring power usage for CSMA, I noticed that once the radio is turned on it cannot be turned off. The radio class has a TurnOn() method but not a TurnOff().

Instead of TurnOff() look for Sleep().

WilliamAtSamraksh commented 8 years ago

That's not implemented. And anyway, sleep ~= off in terms of power.

AnanthAtSamraksh commented 8 years ago

Most of the functions in Samraksh_eMote_Net_Samraksh_eMote_Net_Radio_Radio_802_15_4_Base.cpp has been implemented as part of the OMAC changes. If OMAC does not get merged into master soon, I will create a pull request to push these changes into master.

Nathan-Stohs commented 8 years ago

That's not implemented.

The driver RF231 implements sleep, but you're right, I checked and CSMA apparently does not bother to use it. Therefore it would be in RX mode all the time so your power numbers make sense.

And anyway, sleep ~= off in terms of power.

Normally I'd agree with you, but in this particular case, they are equivalent or at least as low as its going to get, 20 nano-amps. In fact, this is an even lower power state than the boot-up state.