AN2367 Freescale Semiconductor / Motorola, AN2367 Datasheet

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
Application Note
AN2367/D
Rev. 0, 10/2002
Using the Multiphase
Motor Commutation
TPU Function (COMM)
with the MPC500 Family
Ken Terry
TECD
This TPU Programming Note is intended to provide simple C interface routines to the
multiphase motor commutation TPU function (COMM).
MPC500 family of devices, but they should be easy to use with any device that has a TPU.
1
The Commutation (COMM) TPU function uses multiple TPU channels to produce the drive
enable signals necessary for commutating brushless motors. Motor types supported include
three- and four-phase brushless d.c. and three-phase switched reluctance motors. The COMM
function is used in conjunction with another TPU function to provide a choice of sensored
(Hall effect or optical) or sensorless (from an encoder) commutation. The signals produced by
COMM are externally gated with a PWM, also generated by the TPU, to drive the motor. The
COMM function has been optimized for flexibility and this may allow it to meet the
requirements of other multi-signal applications.
2
The COMM TPU function produces the commutation drive signals for a variety of brushless
motor types. The function uses up to eight adjacent TPU channels (one master channel and
from one to seven slave channels) to generate the commutation signals. For example, six
channels can be used for a three-phase brushless d.c. motor, or four channels can be used for
a four-phase motor. All TPU service activity takes place on the master channel - the slaves are
used only as synchronized output pins. When a commutation state change occurs, the pin state
change on each output channel is synchronized using an output match based on the TCR1
counter.
COMM has been designed to work with several TPU input functions to provide a choice of
sensored or sensorless commutation. To support these input functions, COMM has two basic
operating modes selected by the host sequence bits on the master channel:
1
The information in this Programming Note is based on TPUPN09. It is intended to
compliment the information found in that Programming Note.
Freescale Semiconductor, Inc.
Functional Overview
Detailed Description
For More Information On This Product,
Go to: www.freescale.com
1
The routines are targeted for the

Related parts for AN2367

AN2367 Summary of contents

Page 1

... Freescale Semiconductor, Inc. Application Note AN2367/D Rev. 0, 10/2002 Using the Multiphase Motor Commutation TPU Function (COMM) with the MPC500 Family Ken Terry This TPU Programming Note is intended to provide simple C interface routines to the multiphase motor commutation TPU function (COMM). TECD MPC500 family of devices, but they should be easy to use with any device that has a TPU. ...

Page 2

Freescale Semiconductor, Inc. Sensored Mode 2.1 Sensored Mode Sensored Mode is designed to work with the Hall effect decode (HALLD) TPU function. HALLD is an input function that decodes either two or three Hall effect or optical sensors, and a ...

Page 3

Freescale Semiconductor, Inc. Figure 1. Typical Hall Effect Setup and Waveforms 2.2 Sensorless Mode Sensorless Mode is designed to support sensorless commutation from a high resolution encoder on the shaft of the motor. To keep the COMM function as flexible ...

Page 4

Freescale Semiconductor, Inc. Sensorless Mode implemented as a programmable state machine. The basis for the production of the commutation signals is a counter representing the angular position of the motor. This counter is the position count output of a TPU ...

Page 5

Freescale Semiconductor, Inc. The COMM function directly accesses this counter, located anywhere in parameter RAM, and performs tests determine the required state of the commutation output pins. This process is carried out without CPU intervention. The COMM ...

Page 6

Freescale Semiconductor, Inc. COMM Routines The TPU is flexible enough to support an application with Hall effect or optical sensors for commutation and an encoder on the motor shaft for deriving speed and direction information. This may be beneficial in ...

Page 7

Freescale Semiconductor, Inc. • no_of pins - This parameter determines the number of channels to be used to generate the commutation signals (including the master channel). The maximum number of channels that can be used is eight. To set up ...

Page 8

Freescale Semiconductor, Inc. COMM Routines • channel – This is the channel selected as the master channel for the COMM function. The number of pins required for commutation determines the number of channels used by COMM. The additional required channels ...

Page 9

Freescale Semiconductor, Inc. • lower – This value contains the value of the lower angular boundary of the current commutation state (in position counts). 2.4.6 void tpu_comm_write_offset This function sets the offset, which is used by the TPU to advance ...

Page 10

Freescale Semiconductor, Inc. COMM Function Example Sensorless Match Update Mode 1. Call tpu_comm_init_sensorless_match to select the required TPU channels for the COMM function and initialize counter_addr, the comm_states array, update_period and no_of_pins. 2. Initialize the QDEC or FQD function. 3. ...

Page 11

Freescale Semiconductor, Inc. Table 2. Example State Table for a 3-Phase Motor Using in Sensored Mode and HALLD HALL C HALL B HALL ...

Page 12

Freescale Semiconductor, Inc. COMM Function Example /* /* HISTORY /* REV AUTHOR DATE /* --- ----------- --------- /* 1.0 K Terry 30/8/02 /* /****************************************************************************/ #include "mpc555.h" #include "tpu_halld.h" #include "tpu_comm.h" #include "mpc500.c" /* Configuration routines for MPC555 EVB */ #include ...

Page 13

Freescale Semiconductor, Inc. COMM Function Example /* force STATE_0 for COMM function on tpua, master channel 8 */ tpu_comm_force_state(tpua, 8, 0); /* enable COMM function master channel (8) for middle priority */ tpu_enable(tpua, 8, TPU_PRIORITY_MIDDLE); /* wait for end of ...

Page 14

Freescale Semiconductor, Inc. COMM Function Example QADC_A.PORTQA.R = state; /* wait for completion of COMM function service */ while (!((tpua->CISR.R) & (0x0001 << 8))); tpua->CISR state_no = tpu_comm_get_state_no(tpua, 8); } tpu_halld_set_direction(tpua, 3, HALLD_DIRECTION_1); for (state = 0; state ...

Page 15

Freescale Semiconductor, Inc. COMM Function Example THIS PAGE INTENTIONALLY LEFT BLANK 15 Using the Multiphase Motor Commutation TPU Function For More Information On This Product, Go to: www.freescale.com MOTOROLA ...

Page 16

... Motorola and the Stylized M Logo are registered in the U.S. Patent and Trademark Office. digital dna is a trademark of Motorola, Inc. All other product or service names are the property of their respective owners. Motorola, Inc Equal Opportunity/Affirmative Action Employer. © Motorola, Inc. 2002 AN2367/D For More Information On This Product, Go to: www.freescale.com ...

Related keywords