This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE Wakeup Event failed

Hi,

We have created a new button events for our application in which it will record total time/ticks that the button is presses.

When you press button for 3-4 sec BLE will start advertising after 10sec(in my case) time out period it will go to sleep mode. For unknown reason my button doesn't trigger wakeup event.

It would be much appreciated if anyone can look into my issue, I am using SDK v11.0

I have attached a project file BLE.zip.

Regards Siva

Parents
  • The problem is that you are calling bsp_btn_ble_sleep_mode_prepare() before you enter system off (sd_power_system_off()). This will configure pin 13 and 14 as wake-up pins. For some reason it is setting pin 14 (button 2) to SENSE_LOW with input buffer disconnected and no pull-up. This means that the pin is floating. Because of this, the chip is waking up immediately.

    When waking up from system off the gpio registers will be retained, see here. And for some reason the configuration of pin 14 is causing problems (resetting the config on pin 14 at the start of main removed the problem)

    The solution is simply to remove bsp_btn_ble_sleep_mode_prepare() in sleep_mode_enter(). You can also remove the call to bsp_indication_set(BSP_INDICATE_IDLE) as you don't use the bsp module.

Reply
  • The problem is that you are calling bsp_btn_ble_sleep_mode_prepare() before you enter system off (sd_power_system_off()). This will configure pin 13 and 14 as wake-up pins. For some reason it is setting pin 14 (button 2) to SENSE_LOW with input buffer disconnected and no pull-up. This means that the pin is floating. Because of this, the chip is waking up immediately.

    When waking up from system off the gpio registers will be retained, see here. And for some reason the configuration of pin 14 is causing problems (resetting the config on pin 14 at the start of main removed the problem)

    The solution is simply to remove bsp_btn_ble_sleep_mode_prepare() in sleep_mode_enter(). You can also remove the call to bsp_indication_set(BSP_INDICATE_IDLE) as you don't use the bsp module.

Children
No Data
Related