2 Replies Latest reply on Nov 7, 2017 7:19 AM by frederic.chasse_1669321

    BLE won't go to deepsleep for 125ms with CyBle_EnterLPM() every 45 seconds

    frederic.chasse_1669321

      Hi,

       

      I'm using CYBLE-014008-00 and I have an issue with the BLE deep sleep.

       

      Basically, I'm waking up every 40 ms to start a PWM that lasts 1 ms, get a timer sample and add it to my buffer, then I go to deepsleep until the next WDT interrupt. When I have enough samples, I send a notification with the data. The system works perfectly, but every ~45 seconds, the following line doesn't let me go to deepsleep for 125-240 ms, only to sleep.

      sleepMode = CyBle_EnterLPM(CYBLE_BLESS_DEEPSLEEP);

       

      I've attached a screen capture of my logic analyzer. Here are the signals :

       

      dpslp_sleep: When CyBle_EnterLPM(CYBLE_BLESS_DEEPSLEEP) returned SLEEP instead of deepsleep

      dpslp_dpslp: When entering deepsleep after CyBle_EnterLPM(CYBLE_BLESS_DEEPSLEEP)

      sleep: when entering sleep after CyBle_EnterLPM(CYBLE_BLESS_SLEEP)

      dpslp_sleep_event: when entering sleep instead of deepsleep because of a pending event in the application that requires HFCLK

      PWM start: self explanatory

      PWM stop: self explanatory

      ADC timer: self explanatory

      CyBle_Process: Before and after entering CyBle_ProcessEvents();

      CyBle_EnterLPM_sleep_deepsleep.PNG

       

      As you see, every ~45 seconds, the first signal (dpslp_sleep) will go to high and toggle there for a duration of 125-240 ms a couple of times, meaning that I don't go to deepsleep. I could go to sleep, but it results in peaks of current. I'd much rather go to deepsleep. Here is a zoom of the same figure:

       

      CyBle_EnterLPM_sleep_deepsleep_zoom.PNG

       

      Isn't this a really long time to not be able to go to deep sleep? Is this normal?

       

      Thank you,

       

      Fred