This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28069M: Edge of PWM waveform is not in specific position

Part Number: TMS320F28069M

Hi team

I am running  "Example_2806xEPwmUpDownAQ" on my launch pad and getting waveform of PWM3A, and PWM3B on my oscilloscope, I am just wandering why one edge of pulses are not in a specific position and  has a shadow? as you can see on the screen shot picture. is this because of the software?

thanks

  • Hi Arash,

    The software edits CMPA & CMPB in real-time via an ISR, and these compare events are partially responsible for changing how the PWM that is output.  As a result, most of what you are seeing is the expected behavior - and what you are seeing is based on the way the way that your oscilloscope is triggered + the way that this software is written (its ePWM configuration and its ISR).  ePWM3's A and B outputs look to be based on PRD & CMPB events and PRD & CMPA events, respectively.

    Based on the way the software is written, something still doesn't quite add up to me - perhaps you've mistakenly scoped ePWM3B and maybe ePWM2A instead?  However, I could making some mistake in my interpretation, and I don't have hardware available at the moment to double-check my thoughts.

    I must admit that the way the software configures and utilizes the ePWM module is not a common usage, but it was the way done in order to show the different PWM output options available to the user.  The way ePWM1 is configured is much more similar to how more people would use the ePWMs - for instance in motor control applications.

    Note that if you were to comment out the contents of the ISR, CMPA & CMPB will no longer change over time.  This would in turn remove the 'shadow'/'jitter' you are seeing.  It would be a good exercise to comment out the ISR and then attempt to validate your understanding by comparing the code and TRM vs what you see on the o-scope and in the CCS watch window


    Thank you,
    Brett