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.

RTOS/LAUNCHXL-CC2640R2: Stuck in ICall_abort with ICALL_ERRNO_TIMEOUT

Part Number: LAUNCHXL-CC2640R2

Tool/software: TI-RTOS

Hi TI support,

I'm developing my application based on the simple peripheral example and adding additional task and their priority (for completeness) as follows

Task Name Priority
(1) SPI External Flash Access (NVS driver) 3
(2) Data Processing (run some Algo) 2
(3) Data Acquisition (I2C DAC/ADC read/write) 2
(4) BLE Command (proprietary protocol) 1
(5) Simple Peripheral 1
(6) GAP Role 3

The issue I'm seeing is when leave the NVS_Init() in task (1), the MCU hangs after running for 5 seconds after starting up. It's stuck in ICall_abort with error code ICALL_ERRNO_TIMEOUT. See below for the callstack. When I comment out the NVS_init(), every works fine, MCU doesn't not hang.

One of my colleague says that the simple peripheral task has osal_snv_read which accesses the internal flash memory. I'm not sure if it creates a conflict with the external flash driver.

Any help is appreciated.

Best wishes,

Kev

  • Hi,

    All your additional application code should not have priority higher than or equal to gaprole task, or else gap role is not able to deal with any BLE activities hence break the connection.
    What I would recommend you to do is to create events for your user application and then use "SimpleBLEPeripheral_enqueueMsg" and "SimpleBLEPeripheral_processAppMsg"
  • Hi Christin,

    In the current use case, there is no BLE connection yet. This happens within 5 seconds after starting up. But I tried raising the priority of the GAP Role task to 4 but the same thing happened.

    I'm not sure how adding more event in to the Simple BLE Peripheral task will help. We're trying to leverage the preemptive feature of the TI RTOS to run our application. By bringing our application task into the simple peripheral task, this would not be the case anymore.

    Best wishes,

  • Hi Christin,
    Another follow-up, as soon as I raise the priority of task (1) above 1 with NVS_init() enabled, the issue happens.

    FYI, we only communicate with the simple BLE task when it's necessary.
  • Sorry for the delayed response. Please see the following thread which should solve your problem.

    e2e.ti.com/.../683310