4 Replies Latest reply on Sep 24, 2015 11:38 AM by MichaelF_56 Branched to a new discussion.

    BCM920736 deep sleep



      Is there any deep sleep mode document? I met a question when use the rtc_sample App demo.

      it will restart after wakeup from sleep in this demo. how can I manage do not restart when wake up from sleep. below code is what I use.




                                      static UINT32 num_timeouts_since_boot = 0;


                                      // Demo going into deep sleep with wake after 5s.

                                      if (num_timeouts_since_boot++ >= 10)


                                                      // If its been ~10s of ADV, configure timed wake and

                                                      // enter deep sleep right now.

                                                      ble_trace0("Entering deep sleep.");


                                                      gpio_configurePin(0, 0, 0x100, 0);


                                                      // Configure the low power manager to enter deep sleep.

                                                      devLpmConfig.disconnectedLowPowerMode = DEV_LPM_DISC_LOW_POWER_MODES_HID_OFF;


                                                      // Configure the wake time in mS.

                                                      devLpmConfig.wakeFromHidoffInMs = 5000;


                                                      // Configure the reference clock to use.


                                                      // Use the external 32k.

                                                      devLpmConfig.wakeFromHidoffRefClk = HID_OFF_TIMED_WAKE_CLK_SRC_32KHZ;


                                                      gpio_configurePin(0, 0, 0x100, 0);


                                                      // Enter deep-sleep now. Will not return.








        • 1. Re: BCM920736 deep sleep

          This is a good blog on deep sleep:


          Sleep Deep_Sleep Explanation and Techniques


          Are you using an external 32KHz clock or the internal 128KHz clock?


          Are you doing this on the tag3?

          • 2. Re: BCM920736 deep sleep

            we use external 32KHz clock and test it on the tag3.

            • 3. Re: BCM920736 deep sleep

              In my experience, the chip always restarts.  It wakes up, loads from EEPROM/SFLASH to RAM, and starts executing.  You can however determine if you woke up from a:

              1) POWER ON RESET - pushing the reset button or discontinuing and resupplying power

              2) WAKE UP FROM A TIMER EVENT

              3) WAKE UP FROM A BUTTON PUSH


              We have the following logic spread in our code, so I didn't test this exact snippet, but it is basically like this:


                     if (!mia_isResetReasonPor()) {

                             if( mia_isResetReasonTimedWake()){

                                 wake_reason = TIMED_WAKE;

                                 ble_trace0("Waking from deep sleep because the TIMER went off );

                            } else {

                                  wake_reason  = BUTTON_PUSH;

                                  ble_trace0("Waking from deep sleep because the BUTTON was pushed);


                     } else {

                            ble_trace0("POR - POWER ON RESET - Not a timed wake.\n");

                            wake_reason = POWER_ON_RESET;


              • 4. Re: BCM920736 deep sleep

                Thanks for the excellent feedback Cliff.