Hi,
I am using MQX 3.8 and TWRK60N512. The tick rate is set to 5ms in the mQX. I want to know what happens when the I use _time_delay(1) as the task tick is 5ms.
So what is the minimum delay I can use with _time_delay() when the tick rate is 5ms ?
Thanks,
Mohsin
Solved! Go to Solution.
Hi Mohsin455,
Minimum resolution is 5ms if it's set to 5ms (BSP ALARM FREQ = 200). When you pass number below 5 as an argument in this case, you'll get the minimum resolution.
Regards,
MartinK
Hi Mohsin455,
Minimum resolution is 5ms if it's set to 5ms (BSP ALARM FREQ = 200). When you pass number below 5 as an argument in this case, you'll get the minimum resolution.
Regards,
MartinK
Hi MartinK,
Thnaks for your reply. So it might be that we get lower than 5ms depending on when we are calling _time_delay(1) i.e. if we call _time_delay(1) just before the next tick then it will occur when the next tick happens.
Also what if we give anything above 5 and below 10 ? Does it work in similar way (i.e. it only delays till the next tick).
PLease confirm ?
Thanks,
Mohsin
_time_delay will suspend for at least the amount of time you specify.
Yes,
But only when the tick rate the >= the amount you specify.
Regards,
Mohsin
It should always delay for AT LEAST as long as you specify in _time_delay, it may well be longer, depending on the system tick, other tasks running, etc.
Hi Mohsin455,
I might have not clarified it well enough :smileyhappy:
What you have written is correct.
Regards,
MartinK