AN2518 Freescale Semiconductor / Motorola, AN2518 Datasheet

no-image

AN2518

Manufacturer Part Number
AN2518
Description
3-Phase Sine Wave Generator - 3 outputs version - XOR version TPU Function Set
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
AN2518/D
Rev. 0, 5/2003
3-Phase Sine Wave
Generator – 3 outputs version
– XOR version TPU Function
Set (3Sin3Xor)
By Milan Brejl, Ph.D.
Functional Overview
A1
A2
B1
B2
C1
C2
Figure 1. Functionality of XOR version – illustration
The 3-Phase Sine Wave Generator – 3 outputs version – XOR version
(3Sin3Xor) is a version of the 3-Phase Sine Wave Generator – 3 outputs
version (3Sin3) function that uses two TPU channels to generate one PWM
output channel. The TPU channel outputs are to be connected to a XOR gate
whose output is the required PWM signal. See
solution is the full range (0% to 100%) of PWM duty-cycle ratios. There is no
MPW (minimum pulse width) parameter to limit the edge duty-cycle ratios in
this version, unlike in the 3Sin3. A disadvantage is that the number of assigned
TPU channels is doubled.
The function set consists of 4 TPU functions:
Freescale Semiconductor, Inc.
For More Information On This Product,
3-Phase Sine Wave Generator – 3 outputs version – XOR version
(3Sin3Xor)
Synchronization Signal for 3-Phase Sine Wave Generator – 3 outputs
version – XOR version (3Sin3Xor_sync)
Go to: www.freescale.com
XOR
XOR
XOR
XOR
XOR
XOR
Figure
1. An advantage of this
© Motorola, Inc., 2003

Related parts for AN2518

AN2518 Summary of contents

Page 1

... Freescale Semiconductor, Inc. Application Note AN2518/D Rev. 0, 5/2003 3-Phase Sine Wave Generator – 3 outputs version – XOR version TPU Function Set (3Sin3Xor) By Milan Brejl, Ph.D. Functional Overview The 3-Phase Sine Wave Generator – 3 outputs version – XOR version (3Sin3Xor version of the 3-Phase Sine Wave Generator – 3 outputs version (3Sin3) function that uses two TPU channels to generate one PWM output channel ...

Page 2

... Freescale Semiconductor, Inc. AN2518/D • • The 3Sin3Xor TPU function generates 3 pairs of XOR gate inputs. The XOR gate outputs then produce a 3-channel 3-phase center-aligned PWM signal. The generated signals control external hardware, which outputs a pair of transistor signals (top and bottom) with dead-time inserted. The ...

Page 3

... Go to: www.freescale.com AN2518/D Function Set Configuration Assignable channels any 3 channels any 3 channels any 4 consecutive channels any channels ...

Page 4

... Freescale Semiconductor, Inc. AN2518/D Configuration Order The CPU configures the TPU as follows. 1. Disables the channels by clearing the two channel priority bits on each 2. Selects the channel functions on all used channels by writing the 3. Initializes function parameters. The parameters T, prescaler, DT, 4. Issues an HSR (Host Service Request) type %10 to one of the 5 ...

Page 5

... Sine Wave Generator – 3 outputs version – XOR version TPU Function Set (3Sin3Xor) For More Information On This Product and transition times Theta dTheta cos Theta cos Theta 120 Figure 2 shows the error of the cosine function value Go to: www.freescale.com AN2518/D Detailed Function Description of each channel are calculated: trans 5 ...

Page 6

... Freescale Semiconductor, Inc. AN2518/D calculation. The maximum error the amplitude range <–32768, 32767>, that is 0.021 3-Phase Sine Wave Generator – 3 outputs version – XOR version TPU Function Set (3Sin3Xor ...

Page 7

... Channel Priority 1 0 Host Service Bits (HSR Host Sequence Bits (HSQ) 0 Channel Interrupt Enable 0 Channel Interrupt Status Go to: www.freescale.com AN2518/D Detailed Function Description and ht substituted Written by both CPU and TPU Not Used Options 3Sin3Xor_T function number (Assigned during assembly the ...

Page 8

... Freescale Semiconductor, Inc. AN2518 TPU function 3Sin3Xor_R generates an interrupt when the current values of Ampl, dTheta (optionally also Theta), T and prescaler have been read by the TPU and indicates to the CPU that it can write new variables. The CPU program can either wait for this interrupt to occur, or poll the LD_OK parameter to check it has cleared ...

Page 9

... Go to: www.freescale.com AN2518/D Detailed Function Description Ttime_A2 state center_time T_copy Theta_H Theta_L htB, sB x2_chan_B x1a_chan_B x1b_chan_B Theta_buf_H Theta_buf_L Ttime_B2 dec dTheta_buf_H dTheta_buf_L dTheta_H dTheta_L htC, sC x2_chan_C x1a_chan_C x1b_chan_C Ampl ...

Page 10

... Freescale Semiconductor, Inc. AN2518/D Ampl Theta dTheta T prescaler CPU14 sync_presc_addr LD_OK fault_pinstate Theta_buf Other parameters are just for TPU function inner use. 10 3-Phase Sine Wave Generator – 3 outputs version – XOR version TPU Function Set (3Sin3Xor) Table 7. 3Sin3Xor_T and 3Sin3Xor_R parameter description ...

Page 11

... Max IMB Clock Cycles INIT 102 STOP 82 SFR 6 0 SFR SFC 6 0 SFC 58 1 SFC 96 2 SFC 88 3 SFC 68 4 SFC 68 5 SFC to: www.freescale.com AN2518/D Detailed Function Description RAM Accesses by TPU 1 0 RAM Accesses by TPU ...

Page 12

... Freescale Semiconductor, Inc. AN2518/D SFR A1 0 Phase A A2 SFR B1 Phase B B2 SFC SFC SFC SFC SFR C1 Phase C flag1 = 1 C2 center_time not a reload period flag0 = 1 link service request Figure 3. 3Sin3Xor_T and 3Sin3Xor_R timing NOTE: The R channel with the momentary earliest transition within the PWM period is marked by a flag1 and runs the SFR and SFC states ...

Page 13

... SF SF flag0 = 1 link Figure 4. 3Sin3Xor_T state diagram and 3 cases of timing SFR SFC INIT SFC 0 SFR 0 flag1 = 0 flag1 = 1 – channel with momentary longest high-time Figure 5. 3Sin3Xor_R state diagram Go to: www.freescale.com AN2518/D Detailed Function Description -time C7 5-times STOP HSR = ...

Page 14

... Freescale Semiconductor, Inc. AN2518/D Synchronization The 3Sin3Xor_sync TPU function uses information obtained from 3Sin3Xor_R signal for 3-Phase and 3Sin3Xor_T functions, the actual PWM center times and the PWM periods. Sine Wave This allows a signal to be generated, which tracks the changes in the PWM Generator – ...

Page 15

... Parameter to: www.freescale.com AN2518/D Detailed Function Description Written by both CPU and TPU Not Used Options 3Sin3Xor_sync function number (Assigned during assembly the DPTRAM code from library TPU functions) 00 – Channel Disabled 01 – ...

Page 16

... Freescale Semiconductor, Inc. AN2518/D Parameter move pw prescaler presc_copy Parameters written by TPU Other parameters are just for TPU function inner use. 16 3-Phase Sine Wave Generator – 3 outputs version – XOR version TPU Function Set (3Sin3Xor) Table 12. 3Sin3Xor_sync parameter description Format Parameters written by CPU ...

Page 17

... For More Information On This Product, move Table 13. 3Sin3Xor_sync State Statistics State Max IMB Clock Cycles INIT center_time center_time T T Figure 7. 3Sin3Xor_sync timing to: www.freescale.com AN2518/D Detailed Function Description T 4 RAM Accesses by TPU center_time center_time ...

Page 18

... Freescale Semiconductor, Inc. AN2518/D Resolver Reference The 3Sin3Xor_res TPU function uses information read from the 3Sin3Xor_R Signal for 3-Phase and 3Sin3Xor_T functions, the actual PWM center times and the PWM periods. Sine Wave This allows a signal to be generated, which tracks the changes of the PWM Generator – ...

Page 19

... Parameter to: www.freescale.com AN2518/D Detailed Function Description Written by both CPU and TPU Not Used Options 3Sin3Xor_res function number (Assigned during assembly the DPTRAM code from library TPU functions) 00 – Channel Disabled 01 – ...

Page 20

... Freescale Semiconductor, Inc. AN2518/D Parameter move presc_addr prescaler Other parameters are just for TPU function inner use. Performance There is one limitation. The absolute value of parameter move has to be less than a quarter of the PWM period T. NOTE: Execution times do not include the time slot transition time (TST = IMB ...

Page 21

... The parameter is placed on the A1 channel to keep the fault channel parameter space free. MOTOROLA 3-Phase Sine Wave Generator – 3 outputs version – XOR version TPU Function Set (3Sin3Xor) For More Information On This Product, S3 center_time T Figure 10. 3Sin3Xor_res timing S3 Go to: www.freescale.com AN2518/D Detailed Function Description S1 center_time T 21 ...

Page 22

... Freescale Semiconductor, Inc. AN2518/D Host Interface 3 2 TPU function 3Sin3Xor_fault generates an interrupt when a high to low transition appears. Channel 22 3-Phase Sine Wave Generator – 3 outputs version – XOR version TPU Function Set (3Sin3Xor) Written By CPU Written By TPU Table 18. 3Sin3Xor_fault Control Bits Name ...

Page 23

... Parameters written by TPU Table 21. 3Sin3Xor_fault State Statistics State Max IMB Clock Cycles INIT FAULT 88 NO_FAULT Figure 12. 3Sin3Xor_fault timing FAULT Figure 13. 3Sin3Xor_fault state diagram Go to: www.freescale.com AN2518/D Detailed Function Description Description State of fault pin: 0 ... low 1 ... high RAM Accesses by TPU FAULT ...

Page 24

... MOTOROLA and the Stylized M Logo are registered in the US Patent and Trademark Office. All other product or service names are the property of their respective owners. Motorola, Inc Equal Opportunity/Affirmative Action Employer. © Motorola Inc. 2003 AN2518/D Rev. 0 5/2003 For More Information On This Product, ...

Related keywords