- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.