AN2364 Freescale Semiconductor / Motorola, AN2364 Datasheet - Page 37

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
tpu_tsm.h
#define TSM_INT_LEVEL1 0x10000000
#define TSM_INT_LEVEL2 0x04000000
#define TSM_INT_LEVEL3 0x01000000
#define TSM_INT_LEVEL4 0x00400000
#define TSM_INT_LEVEL5 0x00100000
#define TSM_INT_LEVEL6 0x00040000
#define TSM_INT_LEVEL7 0x00010000
*/
/* Define TPU.CISR interrupt channel encodings
/*
#define TSM_CISR_INT_CHANNEL0
#define TSM_CISR_INT_CHANNEL1
#define TSM_CISR_INT_CHANNEL2
#define TSM_CISR_INT_CHANNEL3
#define TSM_CISR_INT_CHANNEL4
#define TSM_CISR_INT_CHANNEL5
#define TSM_CISR_INT_CHANNEL6
#define TSM_CISR_INT_CHANNEL7
#define TSM_CISR_INT_CHANNEL8
#define TSM_CISR_INT_CHANNEL9
#define TSM_CISR_INT_CHANNEL10 0x0400
#define TSM_CISR_INT_CHANNEL11 0x0800
#define TSM_CISR_INT_CHANNEL12 0x1000
#define TSM_CISR_INT_CHANNEL13 0x2000
#define TSM_CISR_INT_CHANNEL14 0x4000
#define TSM_CISR_INT_CHANNEL15 0x8000
*/
/* Prototype of functions */
void tpu_tsm_init(struct TPU3_tag *tpu, UINT8 channel, UINT8 priority,
void tpu_tsm_mov(struct TPU3_tag *tpu, UINT8 channel, UINT16 position);
UINT16 tpu_tsm_rd_dp(struct TPU3_tag *tpu, UINT8 channel);
UINT16 tpu_tsm_rd_cp(struct TPU3_tag *tpu, UINT8 channel);
UINT16 tpu_tsm_mas_chan_cier(int master_chan);
37
INT16 start_position, UINT16 table_size_index,
UINT16 slew_period, UINT16 start_period,
UINT16 pin_sequence, UINT8 number_channels,
UINT16 *table, UINT8 table_size);
Freescale Semiconductor, Inc.
Using the Table Stepper Motor TPU Function
For More Information On This Product,
0x0001
0x0002
0x0004
0x0008
0x0010
0x0020
0x0040
0x0080
0x0100
0x0200
Go to: www.freescale.com
*/
MOTOROLA

Related parts for AN2364