This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC2640R2: SDK v.140 Power_shutdown(); does not work using Simple Peripheral Off-Chip OAD Example Program.

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640R2F

Hi,

    I have tried the pinShutdown example program from SDK v1.40 and it works repeatedly. I am able to read 0.08 uA Shutdown Current.

    However when I call Power_shutdown() at SDK v1.40 Simple Peripheral Off-Chip OAD Example Program, It does not work. I am getting 40.8 uA Shutdown Current. What are the other requirements to enter Shutdown Mode using Simple Peripheral Off-Chip OAD Example Program.

    Here are my modifications below:

1. call Power_init(); at main().

2. call Power_shutdown(0, 0); at Simple Peripheral Periodic Event 

      if (events & SBP_PERIODIC_EVT)
      {
        
        /* Go to shutdown */
        Power_shutdown(0, 0);

        //Util_startClock(&periodicClock);

        // Perform periodic application task
        //SimpleBLEPeripheral_performPeriodicTask();
      }

- kel

  • Hi Kel,

    What HW are you using, and what is the state of the IOs when the device goes to Shutdown?

    Cheers,
    Fredrik
  • Hi,

    I am using CC2640R2F Launchpad. At my first test I did not do anything with the IO's. But, then I did turn off SPI pins to External Flash by calling ExtFlash_open() then ExtFlash_close. But still I get a high Standby Current.

    - kel
  • Hi Fredrik,

        I made it to to work. I added the #include for ExtFlash.c and ExtFlash.h and now I am getting .08 uA Shutdown Current. What is weird is that when I remove power and then power on the CC2640R2 Launchpad, the current is still .08 uA. Seems like it did not go out of Shutdown Mode after Power Cycle. Is that normal? Here are my changes below. All jumpers at CC2640R2 Launchpad have been removed before testing.

    simple_peripheral.c

    #include <ti/mw/extflash/ExtFlash.h>
    Util_constructClock(&periodicClock, SimpleBLEPeripheral_clockHandler,
                          SBP_PERIODIC_EVT_PERIOD, 0, true, SBP_PERIODIC_EVT);
          if (events & SBP_PERIODIC_EVT)
          {
            ExtFlash_open();
            ExtFlash_close();
            
            /* Go to shutdown */
            Power_shutdown(0, 0);
            //Util_startClock(&periodicClock);
    
            // Perform periodic application task
            //SimpleBLEPeripheral_performPeriodicTask();
          }

    - kel

  • That´s good to hear.

    I guess what you are seeing is caused by the extremely low current consumption taking a long time to drain the 10 uF cap on VDDS. So you are not really powering off the device even though you disconnect the cable :-)

    You should check with an oscilloscope. Just keep in mind that even a 10Mohm probe will decrease the discharge rate by a factor of 2x or 3x :-)
  • Now, I am currently trying to do the same implementation to our CC2640R2F product that has External Flash, Buzzer, Accelerometer, Leds and 1 push button switch. I am not able to achieve the same .08 uA Shutdown Current by only calling ExtFlash_open(); then ExtFlash_close();.

    I guess I need to also close IO's to the other peripherals like the I2C Accelerometer.

    - kel
  • Hi kel,

    As is stated in the documentation the IOs are latched when the device goes to Shutdown. You must thus ensure that all IOs are in a configuration where they will not source any current.

    Fredrik
  • Hi Fredrik,

        After setting IO's to not source current  before calling Power_Shutdown(), I was able to get Shutdown Current of 0.09 uA at our CC2640R2F based product. I have set the button as wakeup pin and it does wakeup at button press. But, I have observed that if I do Shutdown mode repeatedly, I do not always get 0.09 uA. Maybe I need to also call Task_sleep() just to make sure that the IO's goes to that state that does not source current before calling Power_Shutdown().

    - kel

  • Markel Robregado said:
    But, I have observed that if I do Shutdown mode repeatedly, I do not always get 0.09 uA

    Anyway I found the cause of this is because I power down the External Flash when waking up from Shutdown mode.

    I do the same implementation as Shutdown Example Program where it does not power down External Flash after waking from Shutdown Mode and now I am able to get 0.10 uA to 0.09 uA Shutdown Current repeatedly. This code below is important at Shutdown Mode.

        /* If we are waking up from shutdown, we do something extra. */
        if (isWakingFromShutdown) {
            /* In this example we toggle LED1 */
            uint32_t sleepUs = 500000;
            Task_sleep(sleepUs / Clock_tickPeriod);
            PIN_setOutputValue(hPins, Board_PIN_LED1, 0);
            Task_sleep(sleepUs / Clock_tickPeriod);
            PIN_setOutputValue(hPins, Board_PIN_LED1, 1);
            Task_sleep(sleepUs / Clock_tickPeriod);
            PIN_setOutputValue(hPins, Board_PIN_LED1, 0);
            Task_sleep(sleepUs / Clock_tickPeriod);
        }
        else {
            /* Shut down external flash on LaunchPads. It is powered on by default
             * but can be shut down through SPI
             */
            #ifdef Board_shutDownExtFlash
                Board_shutDownExtFlash();
            #endif
        }

    - kel