1 Reply Latest reply on Mar 10, 2020 2:20 AM by ShipingW_81

    BLE Event Interrupts


      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?

        • 1. Re: BLE Event Interrupts


          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.