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

cross mob
Anonymous
Not applicable

I saw the following thread, but I couldn't wake BCM20737S up from DEEP SLEEP mode.

How can I make bcm20732s sleep and wake it up by GPIO interrupt?

Are there any mistakes in my code? Please tell me what to do.

I imitated the code of i2c_temperature_sensor sample and added following code in create function.

**************************************************************************************************************************************************

{

     devlpm_init();

     devlpm_enableWakeFrom(DEV_LPM_WAKE_SOURCE_GPIO);

    gpio_registerForInterrupt(interrupt_handler_mask, abc_gpio_interrupt_handler, NULL);

    gpio_configurePin(GPIO_DS_INT_PIN/16, GPIO_DS_INT_PIN%16, GPIO_EN_INT_RISING_EDGE | GPIO_PULL_DOWN, GPIO_PIN_OUTPUT_LOW);

}

**************************************************************************************************************************************************

Then, I implemented abc_gpio_interrupt_hndler function.I want BCM20737S to advertise again just like before it enters deep sleep mode when GPIO_DS_INT_PIN(P4) rises up.

**************************************************************************************************************************************************

void abc_gpio_interrupt_handler(void* parameter, UINT8 arg)

{

    ble_trace0("Wake up!\n");

    gpio_clearPinInterruptStatus(GPIO_DS_INT_PIN/16, GPIO_DS_INT_PIN%16);

// If disconnection was caused by the peer, start low advertisements

    bleprofile_Discoverable(HIGH_UNDIRECTED_DISCOVERABLE, NULL);

}

****************************************************************************************************************************************************

1 Solution

I just solved this problem with deep sleep and having the device wake up by a GPIO interrupt using the BCM20737S.

The trick was to unplug the USB connection from the device.   With USB connected, the device would go to deep sleep and never wake up.  With USB disconnected, the device woke up from a GPIO interrupt.  The problem however with not using USB is that I cannot see any tracing.

I hope this helps.

View solution in original post

16 Replies