time_delay_ticks in mqx

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

time_delay_ticks in mqx

ソリューションへジャンプ
2,471件の閲覧回数
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 件の賞賛
返信
1 解決策
2,233件の閲覧回数
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 件の賞賛
返信
2 返答(返信)
2,234件の閲覧回数
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 件の賞賛
返信
2,233件の閲覧回数
antonychen2008
Contributor II


Thanks your document

0 件の賞賛
返信