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

    CyBle_ProcessEvents effects sleep

    dimasidi

      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
          Gyan Chand

          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.

           

                       http://www.cypress.com/file/140991/download

           

          -Gyan