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.

CC2640: Difference between shutdown and standby mode for cc2640

Part Number: CC2640

Hello,

I am using simple_peripheral on cc2640. I want to save the energy by putting the controller to either shutdown or standby (best case shutdown).

I am also using the I2C module on cc2640. When i put the cc2640 to standby i am able to wake it up using wake up line and i can configure the I2C. Then the I2C works in normal way.

But when i put the cc2640 to shutdown mode and wake it up using the wakeup line. The controller starts running again but it does not configure the I2C again and  i lose the I2C communication.

If i perform an external reset while controller is in shutdown mode then the I2C gets configured correctly. But i want to use the wake up line to wakeup the controller.

Can you please tell me why I2C does not get configured after the wakeup from shutdown? What is the difference between shutdown and standby?

Is it not possible to configure any peripheral once the controller comes from shutdown mode?

waiting for your  kind reply.

Regards

MAbbas

  • Hello,

    You will need to configure the peripheral after shutdown as no settings are retained - the MCU is effectively powered off in shutdown. See the CC26xx TRM SWCU117 for a description of the power states: Sec 6.6 Power Modes (Rev G referenced).

    Best wishes
  • Hello JXS,

    Thanks for your reply. Yes i have to configure the peripheral but it is not configuring once the MCU starts running through wakeup line. I am doing it as following in wake interrupt service routine

    static void wakupISR{

       if(application_power_state == APPLICATION_POWER_STATE_STUTDOWN) {
        configurationI2C();
    
        if(get initializing data through i2c)
        {    
          // Event to Trigger the advertising
            
        }
        else {
          // Event to stop Chip form the advertising
          }
      }
    }
    else { /* not in shutdown mode*/


    }

    If the controller is in shutdown state and the wakeup line is triggered. It should get some data through i2c and then start the advertising with that data.

    But whenever i trigger the wakeup line (when controller is in shutdown mode) it starts advertising with incorrect data and the i2c is not configured. Although i am not advertising at 

    any other point.

    I have also tried to trigger a timer but it does not help. I think application_power_state does not retain its value when controller goes to shutdown mode. am i right?

    Why it starts advertising after coming up from shutdown mode?

    waiting for your kind reply.

    Regards

    MAbbas

  • Hello MAbbas ,

    As noted in the TRM, the SRAM is not retained during shutdown, thus no states are preserved. Therefore, you will need to treat a wake from shutdown as a full power up initialization, including initializing your i2c peripheral and updating your ADV data.

    Best wishes