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-CC1352R1: Execution code

Part Number: LAUNCHXL-CC1352R1

Hi team,

Here's an issue from the customer may need your help:

SDK:simplelink_cc13xx_cc26xx_sdk_6_10_00_29

Application scenarios:

Sensor controller sets the Execution code to periodically poll sensor data, (200ms) and after the sensor receives a polling notification, after lock data, the alert sensor controller starts reading data (that is, reply to the notification that sensor data ready).

The sensor controller uses the Event Handler code to receive the sensor data ready notification.

1) Assuming that the execution time of the Event Handler code is 50ms, then the next execution code is the 250ms (50ms+200ms=)right? That is, after the Event Handler code execution is complete, the Execution code is reclocked.

Or is it all 200ms? That is, the Execution code keeps timing, and the Event Handler code does not affect the Execution code, so after the Event Handler code has finished executing, start the Execution code after 150ms.

2) Can the Execution code be replaced with the Timer 0 Event Trigger?

Since both are fixed-period execution, what are the differences between the two methods? 

3) "Note that RTC ticks will be skipped silently if the Sensor Controller does not complete its tasks within a single tick interval."(from sensor controller help doc)

Already skip tick, will it re-timing? 

Could you help check this case? Please let e know if any info needed. Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    Here are my answer:

    1) In sensor controller the tasks are scheduled using the RTC. The RTC will trigger execution of the task's execution code 200ms after the task has been scheduled to run using "fwScheduleTask(ticks);" (in your sensor controller code). The timing of your task execution will depend on when you re-schedule the task for the next execution using "fwScheduleTask(ticks);" .

    The event handler will not influence the scheduling time of the task's execution code. However if the task is scheduled to run while the event handler is still being executed, the event handler will run to completion before the task execution code is allowed to run (Press F1 in sensor controller studio and go to "Firmware Framework Description" to find more information on vector execution in sensor controller).

    2) If you need feature that the Timer0 is offering I don't see any problem in doing what you are suggesting. The main difference is that regular task scheduling using RTC is already supported in the sensor controller framework and would require less coding, while using Timer0 would provide more flexibility in how the timer operates.

    3) Sorry but I haven't understood this question, could you try to re-formulate maybe? In general terms you should ensure your configured RTC tick (using scifStartRtcTicksNow() ) is large enough to fit the execution code of your tasks. Otherwise the tick occurring during program execution will not be served and might disrupt the regular program execution.

    Regards,

    Fausto