BLE Event Interrupts

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

cross mob
MuNa_4652896
Level 4
Level 4
First like received First like given

I have a question regarding the BLE Events.

Is it possible to process the BLE Stack events using Interrupts instead of putting Cy_BLE_ProcessEvents(); in a main loop that checks every time, so I an save the processor usage? Any example of that?

0 Likes
1 Solution
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

MuNa_4652896

You are not be able to do that from my perspective. The handling practice adopted by P6 BLE stack is passing stack event from BLE controller to BLE host. The event is added to events pending queue once the event is generated, and then execute correcsponding pre-registered event handler in main loop to handle the events. It's not in the typical format of interrupt and ISR on Cortex M platform, but much similar.

Actually, Cy_BLE_ProcessEvents() will take less time if there is no stack event pending in the queue. If no pending events and other work is compoleted, you can put the system into low power mode, to avoid call Cy_BLE_ProcessEvents() in vain.

View solution in original post

0 Likes
1 Reply
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

MuNa_4652896

You are not be able to do that from my perspective. The handling practice adopted by P6 BLE stack is passing stack event from BLE controller to BLE host. The event is added to events pending queue once the event is generated, and then execute correcsponding pre-registered event handler in main loop to handle the events. It's not in the typical format of interrupt and ISR on Cortex M platform, but much similar.

Actually, Cy_BLE_ProcessEvents() will take less time if there is no stack event pending in the queue. If no pending events and other work is compoleted, you can put the system into low power mode, to avoid call Cy_BLE_ProcessEvents() in vain.

0 Likes