CyBle_ProcessEvents effects sleep

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

cross mob
D_Sd_3235936
Level 4
Level 4
25 sign-ins 50 questions asked 25 replies posted

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?

0 Likes
1 Solution
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

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

View solution in original post

0 Likes
1 Reply
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

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

0 Likes