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.

CC2640R2F: Multi-task application sdk_1_50_00_58

Part Number: CC2640R2F

Hi,

I'm trying to get an application running with multiple application tasks. I am modifying ProjectZero as a starting point. I have two custom profiles and I want to have all communication to/from these profiles routed to different application tasks.

Reading the ICall API docs, it makes it clear there that each application task must register with ICall and have unique mailboxes and semaphores. The problem that I have is that the system hangs when I register the second task.  Here are the code snippets:

In Main.c:

  ProjectZero_createTask();
  ProjectZero_createServiceTask();

  /* enable interrupts and start SYS/BIOS */
  BIOS_start();

In project_zero.c, additional mailbox and semaphore:

// Entity ID globally used to check for source and/or destination of messages
static ICall_EntityID selfEntity;
static ICall_EntityID lssEntity;

// Event globally used to post local events and pend on system and
// local events.
static ICall_SyncHandle syncEvent;
static ICall_SyncHandle lssSyncEvent;

ProjectZero_taskFxn() and ProjectZero_taskInit() remain the same...

A new task function and init are added:

static void ProjectZero_serviceTaskFxn(UArg a0, UArg a1)
{
    ProjectZero_serviceTaskInit();

    for (;;) {
...


static void ProjectZero_serviceTaskInit( void ) {

    ICall_registerApp(&lssEntity, &lssSyncEvent); <<<<---- This line crashes the system...

    // Queue for LSS and ALS value change messages
    Queue_construct(&serviceMsgQ, NULL);
    hServiceMsgQ = Queue_handle(&serviceMsgQ);

Callbacks from the custom services have also been re-routed but the code never gets that far...

Any insights as to what I'm doing wrong?

Kind regards,

ac