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.

TMS320F28384S: Unexpected ePWM behavior

Part Number: TMS320F28384S

Hi TI Team,

I am working with 3 ePWM pairs (13 A-B, 14 A-B and 15 A-B) for a motor control application.

These 3 pairs are configured as complementary of each other, with their necessary dead bands, and trip zones, etc.  For the drive mode this is working fine.

However, I have a new requirement where I need to:

  • Set A channels to 100% duty cycle, while the B channels stay at 0% duty cycle for some number of cycles of my control loop.
  • Then turn all 6 channels 3 (pairs A & B) to 0% duty cycle for some number of cycles of the control loop.
  • The B channels must remain at 0% all the time.

So, my initial approach is to

  • Command my A signals to 100%,
  • B sides should go to 0% duty cycle (as these are complimentary)
  • Then when time to turn all off, I fire the linked trip zone and disable all output

This scope image below shows the expected behavior.  My control loop is running at intervals of 41usec, so if commanded to keep at 100% for 1 cycle I expect to see a 100% duty cycle on A, while be stays at 0% for one cycle, then both go to 0 on the next cycle.

But, if I switch my scope to trigger on B side, I also see the same pattern, alternating between A high B low, and B high and A low at approximately 12Hz.

If I increase the number of control loop cycles to keep the A side at 100% demand, then the PWM signals look more confusing.  In the GIF captured below I increased to 2 cycles of the control loop.

For the most part both A and B sides are going high at different lengths of my control loop duration.  I do not understand why are the B sides at all ever high.

But from RE of A to FE of B the on/off is following the length of my control loop count of 2 or ~82usec.

Some additional information: 

  • Control Loop frequency is 24kHz
  • My PWM frequencies are set to 12kHz
  • The channels are configured for active high complementary deadtime

Question:

  • How do I properly command the PWM channels to perhaps stop, flush what was in progress, reload new counts, and sync with the software driven event with no deadtime compensation?

I have tried a few different combinations but have not make it work cleanly yet.

  • Hi Rafael,

    If output B is complementary of output A, by what means are you making output B stay low when output A is alternating between 0% and 100% duty cycle? Could you share how you are doing this in your code?

    Thank you,

    Luke

  • Hi Luke,

    I am forcing both A and B sides off with a Trip Zone.  When we are not driving the motor, I need to keep both PWM channels low, so hi-bridge switches are open.

  • Hi Rafael,

    I'm not sure what could be causing the output B to go high based on your explanation. My best guess is you are loading a CMPA value of 0 or PRD and shadow loading your CMPA value on TBCTR=0. I'd recommend shadow loading your CMPA value on TBCTR=PRD if you are using up-count mode. If this does not resolve the issue, would it be possible for you to send some example code that could be run on a launchpad or control card that shows this issue, without relying on inputs from your system?

    Thank you,

    Luke