AN2367 Freescale Semiconductor / Motorola, AN2367 Datasheet - Page 11

no-image

AN2367

Manufacturer Part Number
AN2367
Description
Using the Multiphase Motor Commutation TPU Function (COMM)with the MPC500 Family
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
The program configures the HALLD Function to operate in three-channel mode with TPU channel 3
assigned as Channel A. The COMM Function is set to use 6 pins to drive the commutation states. Sixteen
commutation states are defined. TPU channel 8 is assigned as the master channel.
The program includes a small piece of demonstration code which uses the QADC_A PORTQA[0:2] pins to
drive state values. If these pins are connected to the HALLD TPU channels, the HALLD function will
decode the states and provide a state number to the COMM function, which will in turn drive the appropriate
commutation state values on the TPU COMM channel pins.
The user should refer to the Programming Note “Using the Hall Effect Decode TPU Function (HALLD)”
for more information on the HALLD interface routines.
3.1.1
/****************************************************************************/
/* FILE NAME: comm_ex.c
/* VERSION: 1.0
/*
/* DESCRIPTION: This program demonstrates the use of the COMM and HALLD
/*
/*
/*
/*==========================================================================*/
/* COMPILER: Diab Data
MOTOROLA
Table 2. Example State Table for a 3-Phase Motor Using in Sensored Mode and HALLD
HALL C
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
Program
TPU functions. It sets up HALLD for three-channel
operation and configures COMM to use a 16 entry commutation */
state table running in sensored HALLD mode
HALL B
Using the Multiphase Motor Commutation TPU Function
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
Freescale Semiconductor, Inc.
For More Information On This Product,
VERSION: 4.3f
HALL A
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
Go to: www.freescale.com
DIRECTION
COPYRIGHT (c) MOTOROLA 2002
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
STATE_NO
10
11
12
13
14
15
0
1
2
3
4
5
6
7
8
9
XXXXXXXX XXNNNNNN
XXXXXXXX XXNNNNNN
XXXXXXXX XXNNNNNN
XXXXXXXX XXNNNNNN
XXXXXXXX XX101001
XXXXXXXX XX101001
XXXXXXXX XX101100
XXXXXXXX XX011010
XXXXXXXX XX110100
XXXXXXXX XX011001
XXXXXXXX XX110010
XXXXXXXX XX110010
XXXXXXXX XX011001
XXXXXXXX XX110100
XXXXXXXX XX011010
XXXXXXXX XX101100
COMM State Table
COMM Function Example
*/
*/
*/
*/
*/
*/
*/
11

Related parts for AN2367