cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

D_Sd_3235936
New Contributor II

I use some debug code in the callback function processing BLE events.

I use it in CyBle_Start(MyProcessEventsDebug ​)

Question: is the callback function (passed to CyBle_Start) called via ISR? Where is it called from? and can it interfere in the middle of another activity?

And in general , What is the priority of this callback??

Note: From a quick check that I did using below function, the callback function did not appear to be an ISR.

bool IsInsideISR(void) // funciton that i added to the callback function to determine if it is an ISR

{

    boll bAns = False;

    bAns = ( (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) != 0u ) ? True : False;

    return bAns;

}

Thanks

0 Likes
1 Reply
VenkataD_41
Moderator
Moderator

Hi,

Question: is the callback function (passed to CyBle_Start) called via ISR? Where is it called from? and can it interfere in the middle of another activity?

No. This is not the callback. The function "MyProcessEventsDebug" in your case gets executed when you call the API Cy_BLE_ProcessEvents(). This is the reason why we recommend to call the API Cy_BLE_ProcessEvents() once in every connection interval of time.

Hope this helps !

Thanks

Ganesh

0 Likes