AN2367 Freescale Semiconductor / Motorola, AN2367 Datasheet - Page 7

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
2.4.2
This function causes the selected output state to be driven on the TPU pins. The PIN CONFIG field within
the selected comm_states array element determines the levels driven onto the COMM channel pins. The
function has three parameters:
2.4.3
This function is used to set up and initialize the selected TPU channels for the COMM function in Sensorless
(FQD or QDEC) mode. In this mode the COMM function works in conjunction with the FQD or QDEC
functions, which must also be set up and enabled on the TPU.
In order to avoid any unpredictable operation of the TPU, the function disables the selected channels before
configuring them for the COMM function. Clearing the appropriate bits in the CPRx registers disables the
TPU channels. If any function state is executing at the time the channel is disabled, it will continue until it
has completed. It is therefore advisable that, if the channels are used for any other TPU function prior to
their
tpu_comm_init_sensorless_match.
The function has seven parameters:
MOTOROLA
configuration
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 the COMM function for three-phase commutation, using six channels,
no_of_pins should be 0x06.
update_period – This parameter is used to schedule a match on the COMM channels. This ensures
that, each time a link is received by the master channel, the new pin states occur simultaneously on
multiple channels. update_period should be set to a value which allows the pins to change state
just after completion of service on the master channel. Table 1 shows the state timing for the
Commutation Function.
comm_states[] – This is an array of values containing the PIN CONFIG values for each
commutation state. The lower eight bits of each array element make up the PIN CONFIG field.
This is right justified - if six pins are used for commutation, the lower six bits of the field are used
to hold the pin values. A logic one in the PIN CONFIG field will result in the corresponding pin
being driven low, and a logic zero will result in the pin being driven high.
no_of_states – This parameter indicates the number of states used in the commutation sequence.
Note that, although the NO_OF_STATES parameter in the TPU parameter RAM is not used by the
COMM function in sensored mode, no_of_states is required to indicate the size of the
comm_states[] array passed to the function.
*tpu – This is a pointer to the TPU3 module to be used. It is of type TPU3_tag, which is defined in
m_tpu3.h
channel – This is the channel selected as the master channel for the COMM function.
state_no – This parameter determines which comm_states array element provides the PIN
CONFIG field to drive the pin levels.
*tpu – This is a pointer to the TPU3 module to be used. It is of type TPU3_tag, which is defined in
m_tpu3.h
void tpu_comm_force_state
void tpu_comm_init_sensorless_match
Using the Multiphase Motor Commutation TPU Function
for
Freescale Semiconductor, Inc.
COMM,
For More Information On This Product,
Go to: www.freescale.com
an
appropriate
delay
is
implemented
COMM Routines
before
calling
7

Related parts for AN2367