Can you explain the F280x PWM module? It's somewhat overwhelming when you first look at it.

There are 2 inputs to the VisSim ePWM block and when you right click there are many many options. Are there any other blocks or items that go with or belong with the epwm module or is everything self contained. I'm trying to sync a few modules and play with timing.

I downloaded the 100+ pages of TI epwm reference (SPRU791F) so this will keep me busy. Any recommendations or tips regarding this module? Thanks

Sine Modulated PWM

Hi, I have a two sinusoids each out of phase with each other with 90 degrees,this is now given to an inverse clarke transform and then to SVM the output is a 3-phase voltage. Using this I want to generate a SINE MODULATED PWM ... Please help.... thanks in advance...

IN SHORT I HAVE A SINUSOIDAL VOLTAGE HOW CAN I CONVERT TO SIN MODULATED PWM

PWM 1 & PWM2 Sync reg

i am using F28335 customized board .i want synchronize PWM1 & 2. but i am unable to see the Sync between those TWO. I am using the example code which is given in data sheet SPRUG04A

jaipal

Use the ePWM sync mechanism

You need to configure ePWM1 to send a sync pulse out and ePWM 2 to reset it's TBCTR counter reg on sync pulse input. The TI ePWM hardware allows you to perform a sync on each PWM count sequence. In addition it allows you to update a phase register (TBPHS) that can be added to the TBCNT counter on the sync pulse to modulate the phase of ePWM2 with respect to ePWM1. Just set it to zero if you don't want any phase difference. In the VisSim ePWM 1 Configuration screen, select the SYNCO (sync out) sync event: "TBCTR = zero" is typical. Then in ePWM 2 select "TBCTR = TBPHS on SYNCI pulse". You can dynamically vary the phase between ePWM's if you want. Just select "Change Phase Dynamically". After you install ECD, there is a good example showing this in the ECD download. Look for menu item Embedded > Examples > Delfino > ePWM2833x

Re: How the heck do you program ePWM?

Yes, the PWM module on the F28x series is a bit daunting. TI's goal is to support every kind of inverter topology possible.

  • Each PWM unit has 2 outputs, A & B, normally used to control the upper and lower legs of a half H-bridge. The A & B inputs to the VisSim ePWM block correspond to the internal A and B compare registers "CMPA" and "CMPB" used to modulate PWM duty cycle by comparing against the PWM counter. The period of the PWM counter controls the carrier frequency of the PWM. To set it, right click on the PWM and enter the value under Timer Period:
  • VisSim uses an fx1.16 or fx2.16 number format for "Duty Cycle A/B" inputs. The value applied must range between 0 and 1 and will be multiplied by the period and assigned to the corresponding CMPx reg. A typical setup will have the A input correspond directly to duty cycle and input B will be the complement to drive a half H-bridge.
  • Each PWM unit has it's own timer but has the option to be synched with the previous unit (Unit 1 can be synced to an external pin event). The TBPHS (phase) register, lets you modulate the phase of a synced unit to the previous unit.
  • The Action Qualifier configures the PWM waveform based on PWM timer events (Z=zero match, P=period match, CMPA/B up/down=compare reg match on up/down count). For each event, you can set output on the A or B output pins. Choices are 'X' (ignore), 0, 1, T(toggle). Normally, for symmetric up/down count, you set EPWMA output to be controlled by CMPA, and EPWMB by CMPB. For active high on A, set CMPA up match=0, down match =1. For active low on B, set CMPB up match=1, down match=0.
  • For deadband, you can choose that both A and B outputs are driven off input A, that output B is complementary to A with deadband interval, and you can choose a different falling edge delay from rising edge.
  • The Send SOCA/SOCB pulse lets you send a "Start Of Conversion" pulse to sync ADC measurement to the PWM waveform to allow clean phase current measurements. You also need to configure the ADC unit to sample on receipt of a SOCx pulse. Note the newer Piccolo parts let you synch each ADC channel to any PWM SOCx. The older 280x parts only have 2 banks of 8 channels each that can be triggered by a SOC pulse.
  • Fault handling lets you choose the PWM action if an external pin goes low. The autoreset mode re-enables the PWM after the PWM timer completes a period count. This lets you do things like hardware current limiting.
  • The High Res timer allows picosecond positioning of PWM edges giving high resolution at low periods (very fast PWM base freq). Don't ask how. It's patented.

Tell us what you want to do, and we can recommend ePWM settings. Regards, Pete