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.

RTOS/CC2650: Sensor controller task execution delay - fwScheduleTask(1) vs. scifStartRtcTicksNow(65)

Part Number: CC2650

Tool/software: TI-RTOS

Hello,

On the sensor controller side, we have a call to fwScheduleTask(1), which waits 1 RTC tick period before re-executing the task, however, on the main CPU side, we have a call to scifStartRtcTicksNow(65) which amounts to a 1 millisecond delay between task execution. Which is the actual value used by the sensor controller for delay between executions... 1 RTC tick period, or 1 milliseconds?

Thank you

  • Hello Tony,
    The call to scifStartRtcTicksNow() configure the sensor controller tick period.
    scifStartRtcTicksNow(65); will generate RTC channel 2 compare events every (approx) 1 ms that wakes up the sensor controller. The sensor controller will then increment a counter and compare the argument in fwScheduleTask() and execute the execution task if they match.

    fwScheduleTask(1); waits for one RTC channel 2 compare event and not an RTC tick. It can be a bit confusing I know, but I hope this explanation kills any confusion ;).
  • how can it be that scifStartRtcTicksNow(65) wakes up the sensor controller once per ms?

    The RTC is incremented every 1/32768 seconds. so that will  mean that scifStartRtcTicksNow(65) will wake it up once per 2ms.

    Can you explain me this?

  • Hello,
    Please refer to the source code for the functions scifStartRtcTicksNow and scifStartRtcTicks in scif.c where the function parameters are explained. By passing the argument of 65 this will amount to (65/65536 = 0.0009918 seconds) approximately 1 ms. You can also refer to the CH2CMP/CH2CMPINC register descriptions in the TRM section 14.4 Real-Time Clock Registers.

    * \param[in] tickPeriod
    * Interval at which subsequent ticks are generated:
    * - Bits 31:16 = seconds
    * - Bits 15:0 = 1/65536 of a second
    */
    void scifStartRtcTicksNow(uint32_t tickPeriod) {