Hello,
Can I get a clear explanation of the sl_GetTimestamp
API? Is it necessary or beneficial to implement when using an OS?
Thank you
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.
Hello,
Can I get a clear explanation of the sl_GetTimestamp
API? Is it necessary or beneficial to implement when using an OS?
Thank you
It is used for watchdog over the host interface to identify problem in the NWP connection (loss of sync etc). This is true for RTOS and NON-OS.
In a NON-OS - it also serves for calculating the timeout in the implementation of certain system call (e.g. semaphore).
Can you explain what the parameters needed to configure the 32-bit timer?
Direction?
- Up to max 32-bit value?
- Down to 0 from max 32-bit value?
The speed needs to just be accurate to where the number of ticks matches
The sl_GetTimestamp
should returns the system-ticks counts (in 32bits, ie."unsigned long" - this should be according to the resolution of the timer you use). The should be an incremental value (so typically if "a = sl_GetTimestamp(); ...; b = sl_GetTimestamp();" then b > a but the driver already takes in accounts the wrap-arounds cases).
In addition you should configure the SL_TIMESTAMP_TICKS_IN_10_MILLISECONDS in the system (so the driver can translate system-ticks to actual time).