time_delay_ticks in mqx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

time_delay_ticks in mqx

Jump to solution
809 Views
antonychen2008
Contributor II

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

0 Kudos
1 Solution
572 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Antony:

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!

Regards

Daniel

View solution in original post

0 Kudos
2 Replies
573 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Antony:

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!

Regards

Daniel

0 Kudos
572 Views
antonychen2008
Contributor II


Thanks your document

0 Kudos