AN2364 Freescale Semiconductor / Motorola, AN2364 Datasheet - Page 26

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
Use of the SLEW_PERIOD Parameter
9.3
The slew period parameter allows the minimum step period of the motor (and therefore its terminal speed)
to be specified exactly in TCR1 counts, independently of the values in the acceleration table and the value
of START_PERIOD. The SLEW_PERIOD parameter is used under two circumstances:
SLEW_PERIOD also allows a motor to make moves of the same length at different speeds without requiring
reprogramming of the acceleration table.
Note that SLEW_PERIOD should only be changed between moves and not while the motor is running.
9.4
The TPU has a limited amount parameter RAM for table data space and the unimplemented RAM ‘gaps’
between channels complicate usage. The local and split table configuration options allow a programmer to
use the available space efficiently. Preferred table configuration depends upon how many motors are being
controlled and how many TPU channels are required for other functions. It is assumed that the application
requires the maximum possible number of acceleration steps. If this is not the case, then a better
arrangement may be possible.
10
There are three program listings that will be exhibited to show the TSM architecture programming interface
(API). The two API programs are used with the Motorola MPC500 header files and are 1) tpu_tsm.c and 2)
tpu_tsm.h. The third program is an example listing for the developer for their own application.
10.1 tpu_tsm.c
The tpu_tsm.c program follows:
/*========================================================================*/
/* COMPILER: Diab Data
/* AUTHOR: Glenn Jackson
/*
/* HISTORY
/* REV
/* ---
/* 1.0
/**************************************************************************/
#include "tpu_tsm.h"
#include "mpc500_util.h"
26
1. The end of the acceleration table is reached.
2. The period value obtained from the fractional multiply of the START_PERIOD value by an
acceleration parameter (from the table) is less than SLEW_PERIOD. This allows SLEW_PERIOD
to be used to limit the maximum speed of a particular motor when multiple motors are sharing a
common acceleration table.
-----------
G. Jackson
Use of the SLEW_PERIOD Parameter
Choosing Between the TSM Table Modes
Table Stepper Motor C Code Examples
AUTHOR
---------
30/Jul/02
DATE
Freescale Semiconductor, Inc.
Using the Table Stepper Motor TPU Function
For More Information On This Product,
VERSION: 4.3g
DESCRIPTION OF CHANGE
---------------------
Initial version of function.
Go to: www.freescale.com
*/
*/
*/
*/
*/
*/
*/
MOTOROLA

Related parts for AN2364