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.

  • Resolved

SENSOR-CONTROLLER-STUDIO: Two task in sensor controller studio

Expert 1800 points

Replies: 10

Views: 328

Part Number: SENSOR-CONTROLLER-STUDIO

HI I try running two task in one sensor controller studio~

but i have some problem when i port them in ccs:

when i run single task(task 1) in the ccs, the task 1 run ok

  scifStartTasksNbl(BV(TASK1_ID));

however, when i run both task in ccs, task 1 malfunction:"

 scifStartTasksNbl(BV(TASK1_ID)|BV(TASK2_ID));
     

do you have any suggestion ?

Thanks

Jeff

  • Hi Jeff,

    I need more info. What does Task 1 and Task 2 do? Are they RTC scheduled or event triggered?

    Also, which device is this running on and with which Sensor Controller Studio version?

    Regards,
    Severin Suveren

  • In reply to Severin Suveren:

    HI Severin Suveren,

    thanks for your quick reply.
    Task 1 is IRLED TRX
    Task 2 is some sensor reading
    both are RTC scheduled.
    I am using CC1310 launchpad and SCS version 2.1.0.440.
    thanks

    Jeff
  • In reply to Jeff Yu:

    Could you share the Sensor Controller project here?

    Regards,
    Severin Suveren

  • In reply to Severin Suveren:

    HI Severin Suveren,

    It is not convenience to disclose here, but rought idea is that:
    task id (0)
    while (1)
    {
    reading GPIO pin & get the content;
    counter1++;
    }
    if(counter1> some condition)
    {
    fwGenAlertInterrupt();
    }

    task id (1)
    while(1)
    {
    reading sensor;
    counter2++
    }
    if(counter2 == 100)
    {
    fwGenAlertInterrupt();
    counter2 = 0;
    }

    something like that,
    I run those task individually and simultaneously is OK in SCP.
    Thanks

    Jeff
  • In reply to Jeff Yu:

    You can send me the Sensor Controller project to me with a private message if that is OK with you.

    Regards,
    Severin Suveren

  • In reply to Severin Suveren:

    OK. How to do this.
    Thx
  • In reply to Jeff Yu:

    I've sent you a message.

    Regards,
    Severin Suveren

  • In reply to Severin Suveren:

    For context: Jeff has sent me both the Sensor Controller project and the CCS project.

    Jeff,

    I've taken a look at your projects and I'm not sure what the issue here is. The CCS projects compiles fine, I start both tasks, and the application runs for both tasks. Both tasks even generate a task alert.

    So, I need you to elaborate what the problem here is.

    Regards,
    Severin Suveren

  • In reply to Severin Suveren:

    Severin Suveren
    For context: Jeff has sent me both the Sensor Controller project and the CCS project.

    Jeff,

    I've taken a look at your projects and I'm not sure what the issue here is. The CCS projects compiles fine, I start both tasks, and the application runs for both tasks. Both tasks even generate a task alert.

    So, I need you to elaborate what the problem here is.

    HI Severin Suveren,

    As  in the beginning, if i start testing the project in ccs,

    if i run both tast(two task ID), the IR task will come error (will give me result if i didnt connect anything in hardware)

    but once i only run one task either one, this error will not show

    Thanks

    Jeff

  • In reply to Jeff Yu:

    Both Task1 and Task2 are using compa. Task1 configures compa, compaSelectGpioInput(), once in the init code, while Task2 configures compa each time in the Execution code. In order for the compa configuration to be consistent with Task1, I believe you need to configure compa each time in the Execution code.

    Regards,
    Severin Suveren

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.