AN2364 Freescale Semiconductor / Motorola, AN2364 Datasheet - Page 17

no-image

AN2364

Manufacturer Part Number
AN2364
Description
Using the Table Stepper Motor TPU Function (TSM) with the MPC500 Family
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
UINT16 tpu_tsm_rd_dp
7.3
This routine will read the value of the DESIRED_POSITION. This value is used for program control when
compared against some other value.
The value of the DESIRED_POSITION is returned as a UINT16 function.
7.4
This routine will read the value of the CURRENT_POSITION. This value is used for program control when
compared against some other value.
The value of the CURRENT_POSITION is returned as a UINT16 function.
7.5
This routine will return the UINT16 value of the CIER or CISR register encoding from the integer input of
the master channel. The basic function of this routine is to perform the integer to register hex value
conversion.
This routine only has one input since it basically performs a single utility task. This routine is associated
with the TSM function since it relates specifically to the master channel definition of the TSM.
7.6
This routine converts the chosen integer interrupt level value and applies this value to specific internal level
values in the ILBS and CIRL registers. The level is chosen for this particular TSM function initialization.
This routine is optionally used if the application development uses an interrupt structure.
The value of ILBS and CIRL of the TPU TICR register is not returned but directly entered into the register
value. The developer does not need to worry about these details at this point of the program. The developer
only needs to choose an interrupt level that will coherently fit into the system application being developed.
17
*tpu -- This is the pointer to the TPU module chosen to run the TSM function. It is a structure of
type (name) TPU3_tag which is defined in m_tpu3.h.
channel -- This is the channel number of the primary TSM master channel.
*tpu -- This is the pointer to the TPU module chosen to run the TSM function. It is a structure of
type (name) TPU3_tag which is defined in m_tpu3.h.
channel -- This is the channel number of the primary TSM master channel.
master_chan -- This is the channel number of the primary TSM master channel.
*tpu -- This is the pointer to the TPU module chosen to run the TSM function. It is a structure of
type (name) TPU3_tag which is defined in m_tpu3.h.
level -- This is the integer level of range 0 to 31 which will be invoked when the
DESIRED_POSITION matches the CURRENT_POSITION.
UINT16 tpu_tsm_rd_dp
UINT16 tpu_tsm_rd_cp
UINT16 tpu_tsm_mas_chan_cier
void tpu_tsm_int_lev
Freescale Semiconductor, Inc.
Using the Table Stepper Motor TPU Function
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA

Related parts for AN2364