QorIQ Processing Platforms - Welcome to Freescale - Freescale
Hands-On Exercise (PWM ADC SYN) · DDFAE Training Slide 3 Freescale™ and the Freescale logo are...
Transcript of Hands-On Exercise (PWM ADC SYN) · DDFAE Training Slide 3 Freescale™ and the Freescale logo are...
Slide 1
Presenter Logo Here
Hands-On Training
Slide 1Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Prepared by Kenny Lam (AP TSPG AE)
Hands-On Exercise (PWM_ADC_SYN)
DDFAE Training
Slide 2Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Approach
Use Processor Expert Beans to implement Target System applicationUse 56F83xx PWM0 with Internal TimerC Channel 2 to trigger ADCA (Channel 0) .
Download and Execute on 56F83xx EVM
DDFAE Training
Slide 3Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
PWM Module
PWM 1A
PWM 2A
PWM 3A
PWM 4A
PWM 5A
PWM 6A
6 PWMs w/ dead-time
ADC Synchronization from the PWM Module
ADC
Sync pulse
ADC Trigger
OptionalExternal
Sync
PWM Signal
Sync Pulse
ADC Trigger
Convert anywherewithin the PWM cycle
56F83xx
Time delay
Timer CTime delay
DDFAE Training
Slide 4Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
PWM, QUADTimer and ADC can communicate internally with no CPU support
MUX
ADCAADCB
PWMAPWMB
ADC SYNC
PWM Sync
IPBusCLK(60 Mhz)
** can be used to mimicADC SYNC pulse during debugging
T0 T1 T2 T3 Timer C2 output - ADC
SYNC
012345
PWM CounterValue
(Modulus 5)
IPBus Clock
PWM SyncOutput
Timer C2 value
(Load value 5)
ADC Conversion
ADC-PWM Synchronization for 56F83XX
DDFAE Training
Slide 5Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
ADC Sampling helps to filtering the measured current - antialiasing.Noise free ADC sampling when the power switch is not actingADC sample is taken when shunt resistor signal (information) is available
PWM Period
PWM top
PWM Bottom
Phase Current
Sampled and Average Currents
Shunt ResistorSignals
A/D
calc.
New PWM Parameters Calculation with Half-cycle Reload
A/D Converters - PWM Synchronization Benefits
DDFAE Training
Slide 6Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
ADC Synchronization with the PWM
AD
C s
tart
sig
nal
ControlAlgorithmExecution
PW
M v
alu
esW
ritt
en t
o r
egis
ters
ADCConvert
PWM Synch signal
TimerDelay
PW
M v
alu
esU
pd
ated
AD
C In
terr
up
t
PW
M s
ynch
pu
lse
PWM Output
ISRLatency
Competitor Solution
568300 Solution
DDFAE Training
Slide 7Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Select “Processor Expert Stationery” and put the project name to there.
DDFAE Training
Slide 8Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 9Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Select and double click ADC inside “CPU Internal Peripherals - Converter Beans”
DDFAE Training
Slide 10Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 11Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
1.7usec
DDFAE Training
Slide 12Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Select Enable internal trigger.
Select “Yes” for Sync from PWM
DDFAE Training
Slide 13Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Kick Trigger Source and select “Add new shared bean from template TriggerTimer”.
DDFAE Training
Slide 14Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Kick “yes”
DDFAE Training
Slide 15Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 16Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Select Timer C channel 2 “TMRC2”
DDFAE Training
Slide 17Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 18Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 19Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 20Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 21Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 22Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 23Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 24Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 25Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Double click AD1:ADC for PWM
Select PWM source
DDFAE Training
Slide 26Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Kick “…” box and and select “Add new shared bean PWMMC.
DDFAE Training
Slide 27Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 28Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 29Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 30Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Kick “…” box to input PWM frequency.
DDFAE Training
Slide 31Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Input 50khz
DDFAE Training
Slide 32Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Kick “…” box to input dead time value.
DDFAE Training
Slide 33Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Input 0
DDFAE Training
Slide 34Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 35Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Disable Channel1-5
Disable all Fault inputs
DDFAE Training
Slide 36Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 37Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 38Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 39Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Put ADC PE bean EnableIntTrigger by Drag-n-Drop method.
Add the code for ADC conversion timing test
DDFAE Training
Slide 40Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Open Event.c event
DDFAE Training
Slide 41Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Put ADC PE bean GetValue16 by Drag-n-Drop method.
Add Global variables
Add GPIO pin for timing test
DDFAE Training
Slide 42Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Click debug
DDFAE Training
Slide 43Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 44Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 45Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Result 1:
~14.4 usec
PWM 0
Port C bit 0
~1.9usec ~3.7 usec
In this example (PWM-Center Aligned mode): ADC conversion time + timer C channel 2 delay ~= 4.4 usec
PWM Syn PulsePWM Syn Pulse
~1.9usec ~3.7 usec
20 usec ~14.4 usec
DDFAE Training
Slide 46Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Change to Edge Aligned
DDFAE Training
Slide 47Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Click debug
DDFAE Training
Slide 48Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 49Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
DDFAE Training
Slide 50Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Click Run
DDFAE Training
Slide 51Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Result 2 :
~4.4 usec
PWM 0
Port C bit 0
~1.9usec ~3.7 usec
In this example (PWM- Edge Aligned mode): ADC conversion time + timer C channel 2 delay ~= 4.4 usec
PWM Syn PulsePWM Syn Pulse
~1.9usec ~3.7 usec
10 usec
~4.4 usec
Slide 52
Presenter Logo Here
Hands-On Training
Slide 52Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Prepared by Kenny Lam (AP TSPG AE)
Summary
DDFAE Training
Slide 53Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Summary
Understand the hardware and software support available for the 56800E Hybrid Controller product line.
Demonstrated the ease of developing applications using CodeWarrior development tools with Processor Expert™ technology for PWM_ADC_SYN conversion.
DDFAE Training
Slide 54Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2004
TM
Thank You!!!