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.

SENSOR-CONTROLLER-STUDIO: SCS Task only runs once

Part Number: SENSOR-CONTROLLER-STUDIO

I'm trying to integrate the SCS code into a CCS project and am following the i2c light sensor example (although I cant get that to run in CCS for some reason).

I do have my code triggering an initial task execution, but am unclear how to keep executing the task at regular intervals.

In my SCS execution code, I'm calling

fwGenAlertInterrupt();
fwScheduleTask(1);

which runs repeatedly in the task testing tab.

Over in CCS, I am starting it up with:

    scifOsalInit();
    scifOsalRegisterCtrlReadyCallback(scCtrlReadyCallback);
    scifOsalRegisterTaskAlertCallback(scTaskAlertCallback);
    scifInit(&scifDriverSetup);

    scifStartRtcTicksNow(0x00010000);
    scifStartTasksNbl(BV(SCIF_I2C_TEST_TASK_ID));

which triggers the callback and unblocks the semaphore, at which point I can tell that I got an execution of the task and subsequently call

    // Clear the ALERT interrupt source
    scifClearAlertIntSource();

    //DO STUFF HERE

    // Acknowledge the alert event
    scifAckAlertEvents();

At this point, I "think" it should run another task execution in a second, but nothing happens. Am I missing something, or misunderstanding the execution process?

  • oops, nevermind. figured it out
  • Spanky,

    Thanks for letting us know you figured it out. Can you post what your resolution to this thread was just in case anyone else runs into a similar thing?
  • Haha, it seems like the majority of these threads end like that.

    In my case it was a careless loop variable error on my part when I tried to integrate the SCS code into my CCS project. That was compounded by a watchdog issue (See my other thread, also resolved) that made debugging really difficult.

    My preference would be to delete this thread because there is nothing of value here (along with a whole bunch of other threads that should either be reopened, or deleted entirely for lack of solution). The watchdog one though could be useful - if your debugger hangs in a Task_sleep() with some finite value, check that the watchdog is working. Even if you have it configured as Watchdog_RESET_OFF.