AN2364 Freescale Semiconductor / Motorola, AN2364 Datasheet - Page 10

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
TSM Function Parameters Address Maps
4.1.7
This control bit determines whether two or four TPU channels are used by the TSM function. If BIT_A = 0
then two channels are used (master plus one slave) and if BIT_A = 1, then four channels are used (master
plus three slaves). BIT_A selection is determined by the mode of stepping and driving: full- or half-step and
unipolar or bipolar drive. The slave channels always follow the master channel in numeric order. If channel
1 is selected as master then channel 2 or channels 2, 3, 4 will be used by TSM as slaves. BIT_A must be
initialized by the CPU prior to issuing the first move request HSR. BIT_A should not be changed while the
function is running.
4.1.8
This 15-bit parameter is written by the CPU. It determines the start/stop rate (pull-in rate) of the stepper
motor. The value programmed into START_PERIOD determines the step period in TCR1 clocks during the
first and last steps of a move. The value is also used as the base value in the calculation to determine the step
periods in the acceleration/deceleration phases. The valid range for START_PERIOD is from 1 to $7FFF,
although in practice the minimum sustainable START_PERIOD is determined by TPU latency and motor
characteristics. START_PERIOD should not be changed while the motor is moving.
4.1.9
This 16-bit parameter, along with host sequence bit 1 (HSQ1) determines the step patterns that are produced
on the two or four TPU pins during stepping. This parameter is initialized by the CPU to contain the
sequence of pin levels required on the master TSM channel. To generate a step, PIN_SEQUENCE is rotated
left or right depending on step direction and the pin level that will result after the step match is determined
by the MSB of the new PIN_SEQUENCE. Example values for full-step two-channel mode and half-step
four-channel mode are $3333 and $E0E0 respectively.
The pin responses of the 1 or 3 slave channels are also determined by PIN_SEQUENCE. Given the sequence
of pin levels for one channel the sequence for the other channels can be derived by rotating the same
sequence either once or twice between each slave and using the resulting MSB. The choice of one or two
rotates of PIN_SEQUENCE between slaves is made with HSQ1.
The channel initialize host service request (HSR %01 or %10) issued to each of the TSM channels should
correspond to the initial PIN_SEQUENCE value.
4.1.10 ACCEL_RATIO_1 ....ACCEL_RATIO _N
These 8-bit parameters make up the acceleration parameter table and determine the step periods during
acceleration and deceleration phases. The CPU initializes these table parameters. The START_PERIOD
parameter is fractionally multiplied by successive table values to determine the step periods during
acceleration and deceleration. The step period obtained from ACCEL_RATIO_N is given by
The resulting value is in TCR1 clocks. ACCEL_RATIO_1 has a valid range from $01 to $FF. These
parameters should not be changed while the motor is stepping.
10
BIT_A
START_PERIOD
PIN_SEQUENCE
STEP_PERIOD = (START_PERIOD * ACCEL_RATIO_N) / 256
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