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: Whenever Gapscan_enable is called , it gets stuck in icallabort()

Part Number: CC2340R5

Tool/software:

Hi everyone,

I am using basic_ble example code for cc2340r5. In this example I have created a new file for central working. In this file file i have configured 1 button for scanning and other two for perform GATT_write and GATT_read function. I have to implement this feature without making any change in app_central file already provided in example code.

In central.c file i have configured one button for scanning in which i have called  BLEAppUtil_scanStart(&centralScanStartParams) fucntion which will call the GapScan_enable(scanStartInfo->scanPeriod, scanStartInfo->scanDuration, scanStartInfo->maxNumReport); fucntion. When this fucntgion is called it calls uint32_t icall_directAPI( uint8_t service , icall_lite_id_t id, ... ) but when this executes it get stuck in an infinite while loop by calling  ICall_abort(). ICALL is not able to call BLE_Stack API.

I am thinking it get stuck because icall() is not able to call/find the GAP_scannable API of BLE_STACK.

I have attached the code images please refer and let me know.

Basically, I wanted to create an independent file which does not depend on another file given in ble_basic (i.e. app_central ) file. Kindly help me to create. I need to implement basic feature like one button for scanning and connecting , 2nd button for GATT_write operation. Please let me know do I have registered this function some other fucntion so that it can access the BLE_Stack API.

CSS version - 12.5

sdk version -  simplelink_lowpower_f3_sdk_7_40_00_64

Controller :- CC2340R5

                       

Thanks & Regards,
Sandeep Sonawane

  • Greetings Sandeep,

    Thank you for the information on how you are reproducing the problem. It looks to me like this may have something to do with calling a BLE5Stack API from a task which isn't registered with ICall. Given the information that you have provided:

    1.) You are using your own file for implementing central functionality on the device

    2.) You likely have your own task running for implementing the central functionality

    These are indications to me that you are likely calling a BLE5Stack API from inside a task that is not registered with ICall. I would like to point you to the documentation for ICall, and how you can configure it to accomplish the functionality you desire. Please find the link to documentation for ICall here. My belief is that when you have successfully registered your task with ICall, you will be able to call the relevant BLE5Stack APIs without the software crashing in ICall_abort()

    As a follow-up question, I would like to understand what your user-application is that demands independence from the app_central.c file. This is for me to be able to assist you best. Could you provide some context on what you are trying to achieve and how/why.

    Thanks and Best,
    Achyut Ray