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.

CCS/CC2640R2F: Documentation error? (Bluetooth Low Energy Software Developers Guide)

Part Number: CC2640R2F
Other Parts Discussed in Thread: BLE-STACK

Tool/software: Code Composer Studio

Hi,

I'm raising this question again...

I have just upgraded to simplelink_cc2640r2_sdk_2_20_00_49 and imported a clean copy of ProjectZero from simplelink_academy_cc2640r2sdk_2_20_03_05. This is what I am seeing:

In the application project, I can see both ICALL_MAX_NUM_ENTITIES and ICALL_MAX_NUM_TASKS:

However, in the stack project, I see no entry for OSAL_NUM_PROXY_TASKS - am I looking in the right place?

Am I looking in the right place?

Regards,

ac

  • Hi AC,

    The definition of OSAL_MAX_NUM_PROXY_TASKS is wrapped in an a #ifndef in osal.c so if it is not defined in your project settings (via CCS) then it defaults to 2.

    In project zero there are only 2 tasks that communicate with the stack: the application (PRZ) and the GAPRole.


    It appears that the application is being conservative when setting this number (3). It should work if you change it to 2.

    Edit: In this case, the documentation seems correct, but the project files seem to allocate more tasks than needed.

  • Hi Sean,

    Thanks for your response.

    I can't test reducing to 2 since I've added another task. However, if I set ICALL_MAX_NUM_TASKS and OSAL_NUM_PROXY_TASKS to anything less than 4 the application crashes (jumps straight into the exit handler).

    Anyway, I'm going to close this issue since I now know where/how OSAL_NUM_PROXY_TASKS is set.

    Regards,
    ac
  • Just to follow up on this... I've just started a new project and installed a clean copy of ProjectZero. The settings that come "out-of-the-box" are:
    ICALL_MAX_NUM_ENTITIES=6
    ICALL_MAX_NUM_TASKS=3
    OSAL_MAX_NUM_PROXY_TASKS is not defined in the pre-defined symbols so defaults to 2 as per the osal.c code.

    If I reduce ICALL_MAX_NUM_TASKS to 2, the application will not run. It crashes out into the exit handler.

    So, there is an error in the documentation. ICALL_MAX_NUM_TASKS and OSAL_MAX_NUM_PROXY_TASKS do not need to be the same (I guess ICALL_MAX_NUM_TASKS needs to be at least one greater than OSAL_MAX_NUM_TASKS) and ICALL_MAX_NUM_TASKS needs to be at least 3.
  • Andrew,

    I have reviewed this and my previous comment is in error, as I wasn't accounting for the stack task itself!
    My apologies for the incorrect information.

    In a normal peripheral configuration for ble 3.x we have the following ICall enabled tasks

    - User application
    - GAP Role
    - BLE-Stack

    From the stack perspective we have two tasks that are communicating with it (making fxn calls, receiving events)

    - GAP Role
    - User application


    So you are correct, ICALL_MAX_NUM_TASKS should be 3 in this case and OSAL_NUM_PROXY_TASKS should be 2.

    I will make a ticket to correct the documentation.