How to get the System tick

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to get the System tick

跳至解决方案
1,600 次查看
Chethu
Contributor I

Hi,

I am using the MCF52259 controller & implementing the modbus protocol in it. I want to know how i can get the system tick to calculate tht interbyte silent interval.

 

Thanks & Regards,

Chethu

0 项奖励
回复
1 解答
779 次查看
JuroV
NXP Employee
NXP Employee

Hi. You want to know the period of system ticks? Then use PSP's function:

_psp_ticks_to_picoseconds(

      /* [IN] Ticks to be converted */
      PSP_TICK_STRUCT_PTR tick_ptr,

      /* [OUT] pointer to where the overflow boolean is to be written */
      boolean _PTR_       overflow_ptr
   )

 

or equivalent:

_psp_ticks_to_nanoseconds(...)

 

with:

tick_ptr->TICKS[0] = 1;

tick_ptr->HW_TICKS[0] = 0;

在原帖中查看解决方案

0 项奖励
回复
1 回复
780 次查看
JuroV
NXP Employee
NXP Employee

Hi. You want to know the period of system ticks? Then use PSP's function:

_psp_ticks_to_picoseconds(

      /* [IN] Ticks to be converted */
      PSP_TICK_STRUCT_PTR tick_ptr,

      /* [OUT] pointer to where the overflow boolean is to be written */
      boolean _PTR_       overflow_ptr
   )

 

or equivalent:

_psp_ticks_to_nanoseconds(...)

 

with:

tick_ptr->TICKS[0] = 1;

tick_ptr->HW_TICKS[0] = 0;

0 项奖励
回复