How to Implement a 6-Hour Delay in FreeRTOS Task?
I would like to know if i can do vtaskdelay of a period of 6 hours, what is the way to do it.
I have a task I wanted to be excuted eeach 6 hours whats is the best way to do it .?
Thanks
I have a task I wanted to be excuted eeach 6 hours whats is the best way to do it .?
Thanks
Solution
@youcef_ali
(this is assuming ur tick is 1000/sec)
vTaskDelay takes the delay period in ticks, you need to convert the 6 hours into ticks based on your system's tick rate. Normally, u'll are to multiply the number of seconds in 6hours with your ticks per second which would result in a very high number and using large value isn't ideal so a better approach would be using a loop i.e