1 Reply Latest reply on Sep 6, 2018 12:28 AM by GyanC_36

    CyBle_ProcessEvents effects sleep


      I used this function a lot throughout code.


      Every second.


      Before entering Sleep.


      After CyBle_GappSetNumOfAdvPkts().


      I noticed that my sleep function on advertise tends to be interrupted less when i masked some of the calls to CyBle_ProcessEvents().


      Is there a correlation?

        • 1. Re: CyBle_ProcessEvents effects sleep

          CyBle_ProcessEvents() process the BLE events generated by BLE stack as soon as you call it.


          You can just call it in your main function infinite loop and can make sure that you are not using any blocking functionality ( Blocking Functions) in your application.


          There is no direct correlation between these two.


          The device wakes up from Sleep at every BLESS event ( Advertisement event or connection event ) and also because of any GPIO interrupt , LP comparator interupt , WDT interrupt etc.


          Please refer the below Application Note on Low Power Design for BLE applications.