Call CyBle_ProcessEvents() function from timer_isr

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

cross mob
PascalS
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

Hi,

I have often seen, that the CyBle_ProcessEvents() function is called in the main loop to process the BLE stack work. But in my situation, the cycle time highly depends on the external peripheral and can take more time than my connection interval. So I have to call the CyBle_ProcessEvents() function minimum twice. Right now, I tried to call this function in a timer ISR where my timer period represents an average between the minimum and maximum connection interval. So are there any disadvantages for me or why is it not implemented in any example code?

Thanks!

0 Likes
1 Solution
SayaniS_66
Moderator
Moderator
Moderator
10 likes received First like received

Hello,

You need to call CyBle_ProcessEvents() once every connection interval. If any custom function consumes more time for execution, call CyBle_ProcessEvents() inside it as well.

-Sayani.

View solution in original post

0 Likes
2 Replies
SayaniS_66
Moderator
Moderator
Moderator
10 likes received First like received

Hello,

You need to call CyBle_ProcessEvents() once every connection interval. If any custom function consumes more time for execution, call CyBle_ProcessEvents() inside it as well.

-Sayani.

0 Likes

Hello,

ofcourse, I could do that, but what is said against calling the function from an ISR? In my opinion this should be the most efficient way do ahndy BLE stack events!

Regards

0 Likes