How to get the System tick

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

How to get the System tick

Jump to solution
2,268 Views
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 Kudos
Reply
1 Solution
1,447 Views
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;

View solution in original post

0 Kudos
Reply
1 Reply
1,448 Views
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 Kudos
Reply