Repeated DEEP SLEEP on BCM92073X

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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.
   devlpm_enterLowPowerMode();

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.
gpio_clearPinInterruptStatus(GPIO_PIN_P39 / GPIO_MAX_NUM_PINS_PER_PORT, GPIO_PIN_P39 % GPIO_MAX_NUM_PINS_PER_PORT);
0 Likes
1 Solution
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Thinking.  Have you looked at the P0/Keyscan issue and disabling it?

Here's one thread on the subject: How to enter HIDOFF? How to detect if the request is not honored?

I think this one over the others because it also shows how to detect if the HIDOFF request is honored.

View solution in original post

6 Replies
Anonymous
Not applicable

Hello Matt,

1.  Please download the SDK 2.2:  WICED-Smart-SDK-2.2-IDE-Installer (Windows)   - Lots of bug fixes

2.  Let us know the results with the new SDK.

Thanks

JT

0 Likes
Anonymous
Not applicable

Hi JT and mwf,

Same results on SDK 2.2.

0 Likes
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

The users in this thread are having similar issues coming out of Deep Sleep: Re: How can I wake BCM20737S up by using GPIO interrupt?

We will try to spend some time with the developers and figure out if there is some sample code we can provide that will help.

d-yama gell andrew997

0 Likes
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Thinking.  Have you looked at the P0/Keyscan issue and disabling it?

Here's one thread on the subject: How to enter HIDOFF? How to detect if the request is not honored?

I think this one over the others because it also shows how to detect if the HIDOFF request is honored.

Anonymous
Not applicable

It seems that pulling P0 low during DEEP SLEEP was the culprit.  The device can sleep when P0 is pulled high (as an input).


Thank you!

(I did have a callback registered for BLECM_APP_EVT_ABORTING_HIDOFF, which was firing to indicate sleep failure.)

0 Likes

Excellent!

Thanks for the update.

jerris

0 Likes