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.

CC3220SF: I2C_transferTimeout - timeout parameter

Part Number: CC3220SF

Hello,

I am not able to find definition of "system ticks" used in parameter of the function I2C_transferTimeout(..).
I would also like to know how to convert real time seconds into "system ticks".

Thanks for help!

Jiří

  • System tick period depends on the OS - you can get it using ClockP_getSystemTickPeriod() (this is an OS abstraction interface that has implementation for Freertos, tirtos and NORTOS). 

    The value of ClockP_getSystemTickPeriodis in US (microseconds) and you can find the number of ticks in a second...

    #define SL_TIMESTAMP_TICKS_IN_SECONDS (1000000/ClockP_getSystemTickPeriod())

    and then:

    #define ConvertSecToSystemTicks(sec)           ((sec)*(SL_TIMESTAMP_TICKS_IN_SECONDS))

  • Thanks Kobi for comprehensive answer!

    Jiří