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.

LAUNCHXL-CC2640R2: About Sensor Controller Studio: Cannot create 2 tasks at the same time?

Part Number: LAUNCHXL-CC2640R2


Hi TI,

I have a trouble when using Sensor Controller Studio. Now I have to take 2 continuous samples from DIO27 and DIO29 at the same time, but the DIO29 is normal while the DIO27 cannot get any ADC value(it remains 0). I have already tested the two tasks at  Sensor Controller Studio and they run very well separately, but why can't they run normally at the same time?

Here's my code in IAR to start the 2 tasks. I tried to start them almost at the same time and both of them returned SCIF_SUCCESS(It means that both the 2 task threads created successfully). However, only DIO29 works.

scifStartTasksNbl(BV(SCIF_DIO29_TASK_ID));
scifStartTasksNbl(BV(SCIF_DIO27_TASK_ID));

Thanks.

  • Hello User,
    How do you implement the two tasks?
    Can you share your Sensor Controller Studio project file?
  • Sorry for disturbing. It appears to be my mistake for ignoring a key point in SCS help document. It says SCS and its SCIF code cannot run multiple tasks but can only run them in queue, by IDs(The document says that the lower ID, the earlier running. However, SCIF code runs actually by IAR sequence, not by ID).
    Thanks for your help.

  • Hello User,
    You are right, but multiple tasks can be started and be in the active state. But the processor can only execute one thread/task at a time, but it will automatically start the next active ready task if any after the first one has run to completion.