fx3 thread sleep

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
gean_3054931
Level 5
Level 5
10 likes given 5 likes given First like received

Hi,

in the fx3 slavefifo firmware,it says that thread sleep is 100millisecond when  CyU3PThreadSleep (100);

if i call CyU3PThreadSleep (1) ,it will be one ms.how it will be in miliseconds?

CyU3PThreadSleep (

        uint32_t timerTicks             /**< Number of timer ticks to sleep. */

        );

how to calculate timerticks?

let me know,thank you.

0 Likes
1 Solution
abhinavg_21
Moderator
Moderator
Moderator
50 likes received 25 likes received 10 likes received

Hi,

Timer ticks are defined in the firmware library. By default it is set to 1 ms (which gives optimal and accurate results with +/- 4 % accuracy). If you want to change the timer ticks you can use CyU3POsTimerInit(). Note that if you increase the timer ticks value your OS will become slow by the same factor.

Please refer to API Guide for further info.

Thanks & Regards

Abhinav

View solution in original post

1 Reply
abhinavg_21
Moderator
Moderator
Moderator
50 likes received 25 likes received 10 likes received

Hi,

Timer ticks are defined in the firmware library. By default it is set to 1 ms (which gives optimal and accurate results with +/- 4 % accuracy). If you want to change the timer ticks you can use CyU3POsTimerInit(). Note that if you increase the timer ticks value your OS will become slow by the same factor.

Please refer to API Guide for further info.

Thanks & Regards

Abhinav