mc68336 Freescale Semiconductor, Inc, mc68336 Datasheet - Page 43

no-image

mc68336

Manufacturer Part Number
mc68336
Description
An Introduction To The Mc68331 And Mc68332
Manufacturer
Freescale Semiconductor, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mc68336ACAB20
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc68336ACAB25
Manufacturer:
FREESCAL
Quantity:
850
Part Number:
mc68336ACAB25
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc68336ACFT20
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc68336AMAB20
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc68336CMAB20
Manufacturer:
FREESCAL
Quantity:
850
Part Number:
mc68336GCAB20
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc68336GCAB25
Manufacturer:
FREESCAL
Quantity:
246
Part Number:
mc68336GCFT20
Manufacturer:
MOTOROLA/摩托罗拉
Quantity:
20 000
Part Number:
mc68336GMFT20
Manufacturer:
IR
Quantity:
100
Part Number:
mc68336GMFT20
Manufacturer:
FREESCAL
Quantity:
246
Part Number:
mc68336GMFT20
Manufacturer:
FREESCALE
Quantity:
20 000
4.6 Configuring the Time Processor Unit
The time processor unit (TPU) is a module on the MC68332. The MC68331 does not have a TPU. The TPU
is an intelligent, semi-autonomous timer that has 16 independently-programmable channels. The TPU can
run pre-programmed timing functions stored in an internal ROM, or it can run custom functions. Currently,
there are two versions of the TPU, differentiated by the type of pre-programmed functions in ROM. The ver-
sion designated MC68332A has an automotive function set, while the version designated MC68332G has
a motion control function set. Table 7 lists the functions in each version. Pages A-2 and A-3 in the TPU Ref-
erence Manual (TPURM/AD) show all of the function numbers and other necessary encodings for each ver-
sion of the TPU. For more detailed information on how to use each individual TPU function, order the TPU
Literature Pak (TPULITPAK/D) from Literature Distribution.
All versions of the TPU can also run custom functions. However, the internal SRAM in not available for other
purposes when the TPU runs custom functions. There are two ways to run custom functions:
MC68331/332
M68331/332TUT/D
Period/Pulse-Width Accumulator (PPWA)
Output Compare (OC)
Stepper Motor (SM)
Position-Synchronized Pulse Generator (PSP)
Period Measurement with Additional/Missing Tooth Detec-
tion (PMA)
Input Capture/Input Transition Counter (ITC)
Pulse Width Modulation (PWM)
Discrete Input/Output (DIO)
Synchronized Pulse-Width Generation (SPWM)
Quadrature Decode (QDEC)
Notes:
1. Choose between any of the available functions (A mask, G mask, and custom functions are available
2. Write custom functions. Freescale sells a TPU assembler called M68STPUMASMAB. Unlike the pub-
1. Older versions of the MC68332 that are not designated by an “A” or “G” have the automotive mask set without
the quadrature decode function. Otherwise, the functions in the older version are identical to those in the
MC68332A. Code written for the old version will work on the new version.
on Freeware Data Systems). See Using the TPU Function Library and TPU Emulation Mode
(TPUPN00/D) for more information.
lic domain version available via Freeware Data Systems, the commercial product contains documen-
tation and is fully supported. To assist with debugging, a TPU simulator is available from Ashware—
call (520) 544-0504.
OC4_INT:
OC1_INT:
DRIVE_PINS_LO:
GET_TOC1:
INT:
ANDI.W
RTE
ADDI.W
ANDI.W
RTE
TST.B
BNE
ORI.W
BRA
ANDI.W
ADDI.W
ANDI.W
RTE
MASK A
Freescale Semiconductor, Inc.
#$7FFF,TFLG1
#$200,TOC4
#$BFFF,TFLG1
OC1D
DRIVE_PINS_LO
#$0038,OC1M
GET_TOC1
#$FFC7,OC1M
#$100,TOC1
#$F7FF,TFLG1
Table 7 Functions Included in TPU Mask Sets
1
For More Information On This Product,
Go to: www.freescale.com
;clear I4O5 flag
;interrupt routine for OC4
;add #$200 to value in OC4 register
;clear TOC4 flag
;interrupt routine for OC1
;branch if pins are high
;set OC1-3 to go high at next match
;set OC1-3 to go low at next match
;add #$100 to value in OC1 register
;clear TOC1 flag
;unused interrupts point here
Programmable Time Accumulator (PTA)
Queued Output Match (QOM)
Table Stepper Motor (TSM)
Frequency Measurement (FQM)
Universal Asynchronous Receiver/Transmitter (UART)
New Input Transition Counter (NITC)
Multichannel PWM (MCPWM)
Hall Effect Decoder (HALLD)
Commutation TPU Function (COMM)
Fast Quadrature Decode (FQD)
MASK G
1
43

Related parts for mc68336