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.

CCS/LAUNCHXL-CC1350: how to run a function periodically

Part Number: LAUNCHXL-CC1350
Other Parts Discussed in Thread: CC1350, TMP116, SYSBIOS

Tool/software: Code Composer Studio

Dear experts,

now i am working with cc1350 launch pad and read temperature and humidity from the sensor(i2c tmp116 example), i use while function in main thread for read data continuously now i want to create a function like void read_sensor() then execute this function periodically with timers. i am a newbie to Ti micro controllers and CCS also, that why i struggle in this step can you help me to find solution for my problem. 

  • Hi Surya,

    There is multiple ways this could be done, as a base point I would advice you to look into the "sysbios" examples in the SDK, more specifically the "Clock" one. It might also be interesting for you to look into making a "sensor reading" task which you can control using a semaphore lock. For example, the task does the reading, waits for the semaphore then does another reading etc. What ever timer you then have can simply post the semaphore which allows your task to run.