I'm using the Flex timer to output 3 PWM signals. I can change the duty cycle of each but I can't see any way to change the phase.
Does any one know how to do this? I need each PWM signal to be a different phase.
I think you can find the next Design Reference Manual useful:
- DRM135: 3-Phase BLDC Sensorless Control with MQX RTOS Using the K60N512
You can find the document (DRM135) as well as the code for the same (DRM135SW) by running a search in Freescale web site for "DRM135".
If you cannot find it please tell me and I can provide a direct link or even attach it here.
Hope this is useful!
The Flex Timer of K60 can generate phase shift PWM signals exactly, no problem. The Phase shift PWM signals means that the PWM signals have the same cycle time, 50% duty cycle generally, but the one PWM signal has phase shift with another PWM signals, the FTM can generate the phase shift PWM signals.
Pls refer to section 188.8.131.52 Asymmetrical PWM in reference manual of K60, in Combine mode, the CH0 and CH1 are a pair of complementary PWM signals, the CH2 and CH3 are complementary signal, CH4 and CH5 are complementary signals. Pls refer to table 10-67 Mode,Edge and level selection in the RM of K60, In the case: COMBINE=1, CPWMS=0, MSnB:MSnA=XX, ELSnB:ELSnA=10, the PWM signal is ComBine PWM signals, in other words, CH0 signal uses CV0/CV1 to control it's rising/falling edge, CH2 signal uses CV2/CV3 to control it's rising/falling edge, CH4 signal uses CV4/CV5 to control it's rising/falling edge. Assume that the FTM_CNTIN=0, FTM_MOD=1000 in edge aligenmet, if we set the following parameter:CV0=250, CV1=750, CV2=500, CV3=1000, then the CH0 and CH2 are 90 degree phase shift PWM signals. Pls note that only in COMBINE mode can you generate phase shift PWM signals.
Retrieving data ...