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.

TMS320F28035: PWM lost with HRPWM enable

Part Number: TMS320F28035

Hi team,

We encountered a PWM lost problem in our customer. And here is the details:

1: Background:

As the figure shows, they four PWM output EPWM1A/B(Channel 1/2) EPWM3A/B(Channel 3/4). 

They need to switch the dead-band between 1/2 and 3/4. Between each switching, they trip all the EPWMs as the blanking in the following figure.

 

2. Problem:

In the first PWM period after the trip, only half PWM is observed on channel 1. For the following periods, it runs normally. And this only happens when EPwm1Regs.HRPCTL.bit.HRPE = 1. As I know, there is some imperfections on F28035 HRPWM, could you help to identify is this a imperfection?

 

3. Details: 

For pwm trip, they achieved this by configuring AQCTL. For dead-band, they also achieved by AQCTL, eg.:

EPwm1Regs.CMPA = CMP1 - CMPdelta, 

EPwm3Regs.CMPA = CMP1

To make it clear, I have to emphasis this only happens when EPwm1Regs.HRPCTL.bit.HRPE = 1.

Could you please give some suggestions?

  • Here is a possible reason according to my knowledge:

    The current AQ configuration is: 

    EPwmRegs.AQCTLA.bit.CAD = AQ_SET; 

    EPwmRegs.AQCTLA.bit.CAU = AQ_CLEAR;

    So the PWM without HR should be like the upper waveform in figure1.

    With HR enabled, I was told all the internal registers only get load at CTR=0. So the PWM will not set at first CMPA down event.

    The PWM will not be set until CTR =0 when AQ is loaded. This is probably why half of the first PWM is lost.

    But at CTR= 0, the CMPA down event has already passed, will the PWM be able to be set at this moment?

    Thanks for you kindly support.

  • Weiqi,

    Missing a CAD event is a known issue when using up-down count mode with HRPWM. This causes the action on CAD to be missed, and the signal will remain unchanged until the next cycle.

    Now, why does your signal go high at CTR = 0?

    I think you must have something else that is setting the PWM high at CTR=0. Do you have an action set at CTR = 0? Or maybe a blanking window for a trip that ends at CTR = 0? Please confirm, but something other than CAU or CAD is setting the PWM output high.

    Finally, how do you fix this issue? You need to center your pulse around PRD, not around zero. Change CAU to set the PWM high, and CAD to set the PWM low, this will ensure that both values get loaded correctly at CTR=0 when using HR mode.

    Regards,
    Cody 

  • Hi Cody,
    Sorry about the delay.
    1. My customer is trying to achieve one paired complementar HRPWM. So, if one channel PWM is around PRD, another one need to around 0. So we still lose the first PWM on one channel. Do you have any idea how to solve this problem?

    2. My customer insists no action is configured at CTR=0. But the PWM is still set at CTR=0. Could you please identify other possible reasons?

    Anyway, I believe we have already find the reason of this PWM lose problem.
  • Weiqi,
    I will look into this and reply tomorrow.

    Regards,
    Cody
  • Weiqi,

    There is no way to center a pulse around 0 in up-down count mode while using HRPWM on this device. We may have some options though.

    Looking at the previous replies the customer needs:

    • Dead band between 1A and 1B
    • Dead band between 2A and 2B
    • Channels 1A and 1B need to be complementary to 2A and 2B

    Are the bullets above correct?

    Some options:

    1. Does the application require HRPWM? This code should work fine when not using HR mode.
    2. Use HRPWM and use the sync chain to offset PWM2A so that you can have your HR pulse centered around PRD.
      1. This method will have the draw back of sync chain jitter. The sync chain is not high resolution, so each time you resync the PWMs you may introduce a cycle or two of jitter.
        1. This jitter can occur every time a sync pulse synchronizes the two PWMs. To avoid this jitter you can sync the PWMs once. Some systems are unaffected by this jitter. If the jitter is a problem for your system, Then your system be able to have a phase-shifting relationship between the PWMs while using HR mode.

    Many of the workarounds depend on your system. Hopefullly one of the above will work for you, if not please let me know.

    Regards,
    Cody 

  • Thanks Cody,

    In fact, I am convincing my customer not to use HRPWM to avoid this problem.

    Customer need two channels of complementary PWM working at high resolution mode. It means even we managed to center one channel around PRD, the other channel still need to be cntered around zero. So I believe we cannot met this requirement.

    Since their system is not working at very high switching frequency, I believe they do not need high resolution mode. I will support them to do further test and evaluate the possibility of not using HR mode.

    Thanks for your very kind and technical support.