Jump to content
43oh

CC3200 WiFi library low power API design


Recommended Posts

Hi all,

 

We have been working on low power modes for the CC3200 and need your input on the API's. The CC3200 power management system is quite complicated and has many combinations. I think there are only a couple of interest though since those will give the lowest power. Details can be found in the CC3200 Power Management Application note.

 

The most interesting mode is LPDS and the combination of being disconnected from the network and the option to keep connected to the network.

 

1: LDPS always connected. In this use case the MCU will go into LPDS but the radio will keep a connection with the WiFi Access Point but is idle. In this case the system will consume about 700 uA when in LPDS. When the system comes out of LDPS you will immediately be able to start communicating with the network.

 

2: LDPS for both MCU and radio. The radio will disconnect from WiFi. I this case the system will consume about 130 uA. The the system comes back up the radio will need to re-connect to the AP before network traffic can start. The cool thing for this use case is that you can choose not to connect to WiFi when you come out of LDPS. This gives you the option to collect e.g. sensor data when you wakeup and then only connect to the AP when you are ready to send out over the network.

 

3: Hibernate. I have not yet looked at this.

 

We already have sleep()/sleepSeconds() and suspend() API's for MSP430 and skeleton implementations of those for the CC3200 that don't do much right now. I would like to reuse those and fit the above 2 into these API's.

 

Question:

1: Would you like to see other power modes implemented?

2: How would you like to see the "stay connected" vs "disconnect" during LPDS brought out as options?

 

Link to post
Share on other sites

My two cents...

 

The sleep, sleepSeconds, suspend() function calls should perform the analogous functions with the CC3200 Cortex-M4 MCU, but have hooks in addition to activate a WiFi library "sleep" mode which is configurable.

 

Perhaps something like WiFi.setSleepMode(...) with an option:

 

WIFI_SLEEP_ONLINE

WIFI_SLEEP_OFFLINE

WIFI_SLEEP_HIBERNATE

 

The sleep, sleepSeconds, suspend functions should check a public boolean of some type in the WiFi library indicating whether it's even in use (no point in bothering with it if the user isn't using the WiFi at all), then run a WiFi.sleep(boolean) function that acts based on the current setting.  I would say the "default" setting should be WIFI_SLEEP_ONLINE (#1 in your options above).

 

As a side benefit, the user can run WiFi.sleep(boolean) by themselves if they don't intend to put the Cortex-M4 MCU in deep sleep mode at the same time.  The idea would be to run WiFi.sleep(true) when they expect the NWP to go out to lunch, then WiFi.sleep(false) to wake it up.

 

Just a rough idea... would like to hear others' input!  @@bluehash Any way you could make a 43oh blog post with a "call for questions" pointing here?

 

On Hibernate mode...

Hibernate erases all memories inside the CC3100 NWP, so the WiFi.sleep(false) would probably have to run WiFi.begin() before it exits if WIFI_SLEEP_HIBERNATE were the selected mode.  But the user would have to know that they need to re-establish the WiFi link with their AP and obtain IP address/etc anew.

 

Actually I wonder if there is much functional difference between Hibernate and the NWP LPDS (your #2 option).

Link to post
Share on other sites

@@spirilis thanks for the input! I did not think about that 3'rd use case where the MCU is up and running but WiFi is in LPDS. I don't see this combination in any of the tables. 

I just whipped up this use case and it works but I don't see a whole lot of difference with WiFi in LPDS vs active connected but idle. The only difference is the beacon response peaks that are small blip compared to the MCU power consumption and do not contribute a lot to the average current consumption. In both cases it hovers around 13 mA. If I don't do anything to the radio (e.g. uploading an empty Sketch) then power consumption is around 16 mA. Given the difference of 3 mA the radio must be asleep. I have no way to find out what to expect since there are no power consumption numbers for this case nor power consumption numbers for the MCU only. Only power numbers that come close is the MCU active / NWP connected idle.

 

I'll get with the CC3200 guys to find out if the numbers I am seeing are correct. Do you think it is still worth consider this use case given the power consumption of 13 mA?

Link to post
Share on other sites

Currently, the MSP432 Energia behavior is to go into low power mode whenever the application is doing nothing else, as when all threads are blocked (ie while waiting for delay() to timeout).

 

One could argue that this model could/should be carred over into the CC3200 world as well.

 

I like the idea of allowing the user to set a WiFi sleep mode with the knowledge that subsequent idle periods (when all threads are blocked waiting for something to happen) will put the M4 processor in LPDS mode and put the network processor in the selected WiFi sleep mode.

Link to post
Share on other sites
  • 4 weeks later...

In cc3200 what is the default Transmission Power and data Rate? because in the data sheet it has IEEE 802.11b/g/n standards. then the modulations are 1mbps DSSS(18dBm), 54mbps OFDM(14.5dBm) are available in the datasheet. otherwise Can you please tell me, how to change the transmission power as maximum of CC3200 in Energia?

Link to post
Share on other sites
  • 2 weeks later...
  • 8 months later...

Any updates on this? I am hoping to use Energia to code a battery-powered device. I would like to test all three modes mentioned in the original post (LPDS always-connected, LPDS with both sleeping, and Hibernate).

 

I checked the current cc3200 code and didn't see anything. Is there an experimental branch in GitHub that I could test? I'm willing to help debug the code.

Link to post
Share on other sites
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...