According to the CC3000 datasheet, the device current consumption in shut-down mode is specified as maximum 5 µA.
This guide describes how I measured the CC3000 shut-down current consumption using the Basic WiFi example for Launchpad and the Basic WiFi Host v0.1.0.
CC3000 Shut-Down Mode
The CC3000 has basically two supply lines:
- VBAT/VBAT_IN: main power supply line.
- VIO/VIO_HOST: power supply line for the host interface (SPI and IRQ lines).
In order to bring the CC3000 to shut-down mode, basically the host microcontroller just needs to Power Enable/VBAT_SW_EN to low. However in the Basic WiFi example, this is not necessary to be done manually since it is encapsulated in the wlan_stop() function.
The CC3000BOOST has an on-board jumper J15 which according to the User’s Guide shall be used to measure the current consumption. However looking into the schematic, measuring current through J15 basically means only measuring the current to the VBAT_IN line.
IMO, the total current consumption should also include the current going into the VIO_HOST line. Therefore for this test, I am removing the R21 on the CC3000BOOST to avoid measuring the current going through LED1 and measure instead the current at J13 as shown above.
I also found the information on TI E2E forum, that the host interface output lines (direction CC3000 to host) are left floating during shut-down mode, so it is necessary to set these pins as output from the host microcontroller side to avoid excessive current consumption.
Modifying The Basic WiFi Example Code
I implemented additionally 2 new commands (12-0xc for shut-down and 13-0xd for restart) in the Basic WiFi Host script in order to do the current consumption measurement. To add this feature on the firmware side, open the basic_wifi_application.c and modify the DemoHandleUartCommand() function as follows:
void DemoHandleUartCommand(unsigned char *usBuffer) { ..................... // usBuffer[0] contains always 0 // usBuffer[1] maps the command // usBuffer[2..end] optional parameters switch(usBuffer[1]) { case 'c': // test shut down current wlan_stop(); // put IRQ line (P2.6) as GPIO low P2SEL2 &= ~BIT6; P2SEL &= ~BIT6; P2DIR |= BIT6; P2OUT &= ~BIT6; // put MISO line (P1.6) as GPIO low P1SEL &= ~BIT6; P1SEL2 &= ~BIT6; P1DIR |= BIT6; P1OUT &= ~BIT6; break; case 'd': // re-init initDriver(); break; ..............
Recompile the firmware and flash it to the MSP-EXP430G2 Launchpad.
Measuring Shut-Down Current
After flashing the modified firmware to the Launchpad and attaching an ampere-meter at J13 of the CC3000BOOST, start the Basic WiFi Host in console mode. After startup, I can see the current consumption around 108 mA which corresponds to the current consumption in RX mode:
Then sends the command 12 (shutdown) from the Basic WiFi Host script command line. You shall be able to see a dramatic drop in the current consumption, as I measured around 0.5 µA in the shut-down mode.
To get back to the normal operation mode, you can send the command 13 (restart) and the current consumption shall rise again to around 100 mA as specified for the RX mode.