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.

LP-MSPM0G3507: How to make 3 phase shifted PWM?

Part Number: LP-MSPM0G3507
Other Parts Discussed in Thread: MSPM0G3507, DRV8329

Tool/software:

Hello team,

I am planning to control a sensorless FOC motor using the MSPM0G3507, and I am currently building the basic knowledge needed for this application.

I want to generate three PWM signals with the same frequency and the same duty cycle, each phase-shifted by 120°.

Below is the method I have been considering. Please let me know if it is correct.

     Assuming a LOAD value of 2000 and a 50% duty cycle,

  1. Use TIMA0 to create two PWM signals and their complementary outputs.
    • Use PWM channel 0 as the reference, and PWM channel 1 should output a signal phase-shifted by 120°.
    • Can this issue be resolved by modifying the capture compare value?
    • PWM channel 0 would have a counter compare value of 1000, and
    • PWM channel 1’s counter compare value should be 1666 for phase shifting.
      However, with these settings, the falling edge of PWM 1 occurs too early, so its duty cycle is not 50%.

         Therefore, for PWM channel 1, the capture compare values during up counting and down counting must be different.
         Is there any way to solve this? Is the secondary compare events feature intended for this purpose?

       2. Cross trigger TIMA1 and TIMA0.

    • Synchronize TIMA1 and TIMA0 via cross triggering, then apply phase load to TIMA1 to achieve a 240° phase shift.
    • After that, generate PWM signals with the same duty cycle.

My questions are as follows:

  1. Are these approaches correct?
  2. Is there any documentation/SDK examples related to this?

Thank you.

  • Hi James,

    I am planning to control a sensorless FOC motor using the MSPM0G3507, and I am currently building the basic knowledge needed for this application.

    Why sensorless FOC motor control requries a 3 phase shifted PWM? Are you want to implement the single shunt resistor solution?

           2. Cross trigger TIMA1 and TIMA0.

    This approach is incorrect. the first one could work:

    -> Using TIMA0 to generate 3 pairs complementary PWM, and each piars has a phase shifted,

    Is there any documentation/SDK examples related to this?

    There is no single examples to achieve it. While we implement it in a sensorless foc demo with DRV8329, you can find it in SDK.

    Fortunately, I also invested some time on this topic, and I can share a demo for you:

    phase_pwm_output.zip

    This demo configure the CC0 and CC1 to a pair, and control the PWM output phase by CC0 and CC1.

    In TIMA0, there has CC0-CC5 (6 CC chanels) for the PWM control, you can set the pairs of "CC0-CC5" "CC1-CC4" "CC2-CC3", and enable the complementary PWM output of CC0N, CC1N,CC2N.

    B.R.

    Sal