Minimum period for MQX Timer

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

Minimum period for MQX Timer

4,431件の閲覧回数
JaimeR
Contributor III
What's the minimum period suggested for a periodic MQX Timer?
6 返答(返信)

2,363件の閲覧回数
Jairo
Contributor III
The minimum timer interval is 1 tick, and it's equivalent to 5ms

2,363件の閲覧回数
bistrulli
Contributor I

is it possible to set periodic timer with period less then 5ms?

0 件の賞賛
返信

2,363件の閲覧回数
Kyle_Apollo
Contributor II

We got it down to 1 tick = 1mS, by modifying the BSP_tick_frequency in the BSP (dont hold me to that exact name, but it is something to that effect).  By changing it from 200 (default) to 1000, you increase your resolution 5 fold.  To get uS resolution, you have to bypass MQX and use hardware interrupts (at least this is what we were told by our FAE, using the coldfire V1 core). 

2,363件の閲覧回数
Kafre
Contributor III

I've been looking for the name of the tick frequency parameter for a while, could you drop me a clue of where to find it, please?

0 件の賞賛
返信

2,363件の閲覧回数
anthony_huereca
NXP Employee
NXP Employee

It's the BSP_ALARM_FREQUENCY parameter, which is set in <mqx_dir>\mqx\source\bsp\<board_name>\<board_name>.h

 

The ticks are then set up in the BSP initialization, located at <mqx_dir>\mqx\source\bsp\<board_name>\init_bsp.c

    kernel_data->TIMER_HW_REFERENCE = (BSP_SYSTEM_CLOCK / BSP_ALARM_FREQUENCY);       _time_set_ticks_per_sec(BSP_ALARM_FREQUENCY);    _time_set_hwticks_per_tick(kernel_data->TIMER_HW_REFERENCE);    _time_set_hwtick_function(_bsp_get_hwticks, (pointer)NULL);

 

 

2,363件の閲覧回数
bistrulli
Contributor I

Thank you so much Kyle, I'll try it soon.

0 件の賞賛
返信