Other Parts Discussed in Thread: CONTROLSUITE
Hi, I'm designing a H-bridge stand alone inverter as my final graduation project. To do the control of my inverter I am going to use a TMS320F28069M DSP. However, I'm really new to DSPs and I would like to know if I correctly understood how to generate a SPWM with the microcontroller. Analogically, the way to get the SPWM is to compare a sine wave to a triangular wave. So, my idea is use the TBCNTR as the triangular wave with amplitude TBPRD and the CMPA as the instantaneous sine wave value. This idea is based in the attached image that can be found in SPRUH18G file.
The way I've found to do so is to configurate the ePWM module as Time-Based and, at every time the TBCNTR reaches CMPA and timer is decrementing, value trigger an interrupt and inside the interrupt code change the CMPA value to the new duty cycle, that will probably be based in a sine table.
So, I just would like to know if the algorithm that I've just suggested is correct or if there is some detail about the ePWM interrupt event that would make the algorithm not to work.
Thanks in advance,
Rafael.