AN2367 Freescale Semiconductor / Motorola, AN2367 Datasheet - Page 12

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
COMM Function Example
/*
/* HISTORY
/* REV
/* ---
/* 1.0
/*
/****************************************************************************/
#include "mpc555.h"
#include "tpu_halld.h"
#include "tpu_comm.h"
#include "mpc500.c"
#include "mpc500_util.h"
void main ()
{
/*
*/
12
tpu_comm_init_sensored(tpua, 8, 6, 0x0025, tpu_comm_states, 16);
-----------
K Terry
struct
struct
INT16 state = 0;
INT16
INT16
setup_mpc500(40);
initialise tpu comm function for tpu_a,
master channel is 8
no_of_pins = 6
update_period = 37 = 0x0025 - for sensored mode
UPDATE_PERIOD(min)(CPU clocks) = 64 + 14 * NO_OF_PINS
UPDATE_PERIOD(min)(TCR1 clocks) = (64 + 14 * NO_OF_PINS) / 4
- assumes DIV4 clock (TPUMCR3[EPSCKE] = 0, TPUMCR[PSCK] = 0
and TPUMCR[TCR1P] = 00)
AUTHOR
TPU3_tag *tpua = &TPU_A;
halld_func *halld1;
state_no;
tpu_comm_states[16] = {0x002c, 0x001a, 0x0034, 0x0031,
Using the Multiphase Motor Commutation TPU Function
---------
30/8/02
DATE
Freescale Semiconductor, Inc.
/* Configuration routines for MPC555 EVB */
/* Utility routines for using MPC500 devices */
For More Information On This Product,
/* Setup device and programm PLL to 40MHz */
DESCRIPTION OF CHANGE
---------------------
Demo. Program for TPU COMM/HALLD
Function
Go to: www.freescale.com
/* pointer for TPU routines */
0x0000, 0x0000, 0x0032, 0x0029,
0x0029, 0x0032, 0x0000, 0x0000,
0x0019, 0x0034, 0x001a, 0x002c
};
*/
*/
*/
*/
*/
*/
MOTOROLA

Related parts for AN2367