6 Replies Latest reply on Apr 7, 2015 5:25 PM by MichaelF_56

    Repeated DEEP SLEEP on BCM92073X

      I am trying to build off the SDK2.1.1 rtc_example which uses DEEP SLEEP.  I successfully enter DEEP SLEEP by calling:


          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; 0 means never
         devLpmConfig.wakeFromHidoffInMs = 3000;


         // 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.


      This works for the power-on reset case.  But when it wakes from deep sleep, I try to run the above code and the BLECM_APP_EVT_ABORTING_HIDOFF callback is fired after the usual BLECM_APP_EVT_ENTERING_HIDOFF.  The part does not sleep.


      I understand that the part may not enter DEEP SLEEP while advertising, in a connection, etc. but neither of these are the case.  Are there GPIO or other interrupts that may be preventing DEEP SLEEP?  Is there a way to check what the offending reason is?


      I do call the following line in my create() function to follow the rtc_example:


      // Always clear interrupts on P39, which is the interrupt pin used by the wake-from-deep-sleep HW block.