my system is based on kl26 and mqx . tick is1ms . when I use time_delay_ticks(240000），the real delay time is 7 or 8 minutes. could you help me. thanks
The default system tick in MQX is 5ms. This is the smallest unit of the time that clocks the scheduler.
It is not possible to have a delay shorter than 5 milliseconds without modifying the BSP. Each BSP can have a different value in the Macro "#define BSP_ALARM_FREQUENCY 200". This macro defines the number of ticks per second. This means each tick is 5 milliseconds.
time_delay is for some time sensitive situation, if you need precise time, you can use hardware timer. I attached a document to describer its usage.
Have a nice day!
Thanks your document
Retrieving data ...