This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2340R5: GapADV_disable get blocked with ICall_abort() when called in FreeRTOS timer callback

Part Number: CC2340R5

I tried to disable ADV when timer expired so I called GAP_disable() in FreeRTOS timer callback however it gets blocked without return.

I use debug to find out what happened and it stop at ICall_abort()

I suspect ICall function call in timer callback is forbidden however I cannot find any doc mentioned this.

And I didn't find an example that call ICall api in FreeRTOS task or timer callback in SDK.

Would you please share any ideas ?

  • Hi,

    Thank you for reaching out. BLE5-Stack APIs should not be called within an interrupt context. Instead, I would recommend calling the GapAdv_disable() function through the BLEAppUtil_invokeFunctionNoData() inside your timer callback:

    Something along the lines of the code shown below:

    void timerCallback()
    {
        BLEAppUtil_invokeFunctionNoData(yourCustomFunction);
        return;
    }

    If this doesnt work, then please share your timer setup and initialization code and we would be happy to help see where the gap is.

    Best Regards,

    Jan