MSPM0-SDK: PWM Signal Glitch when phase shifted

Part Number: MSPM0-SDK
Other Parts Discussed in Thread: SYSCONFIG, LP-MSPM0L2228

Hi team,

I tested the phase shift in PWM, using TIMG(standard) to TIMA(shift), and I can see the glitch on phase shifted PWM signal.

  • Channel 5: Main_Cross trigger, TIMG (Standard)
  • Channel 6: Secondary_Cross trigger, TIMG (Phase shifted X)
  • Channel 7: Secondary_Cross trigger, TIMA (Phase shifted O)

image.png

image.png

On Channel 6 without phase shift, this signal is clear, but there's some glitchs on Channel 7 very randomly, which is shifted the phase.

But when I tested with TIMA to TIMA, it doesn't happen the glitch. (but there's only one TIMA in M0L1227, so I need to use TIMG for standard)

Do you know the reason why the glitch happend when I use the TIMG as standard, and do you have any idea to fix this issue?

 

Many thanks,

Yesol

  • Hi Yesol,

    I have not seen this behavior before due to phase load. Are you changing the capture compare value? This is one of the circumstances where you can see glitched signals as you have shown, especially when the capture compare value is changed at an unexpected moment.

    Could you share the code?

    Best,

    Owen

  • Hi Owen,

    No, I didn't change the capture compare value, and set the duty as 50%.

    You can find the code below link. this sysconfig is set the PWM with TIMG for main trigger timer, which happened the glitch signal.

    But if you changed to TIMA for main trigger timer, the glitch is not happened.

    https://tidrive.itg.ti.com/a/DzakSJ82pBEdNqQZ/414fe1ce-27f5-416a-8710-1ba08a7697bc?l

  • Hi Yesol,

    Thanks for sharing the code. I'll take a look and get back to you soon.

    Best,

    Owen

  • Hi Yesol,

    I ran your code on an LP-MSPM0L2228 and I was unable to observe any of the glitches using my Saleae running at 100MS/s. What is the pulse-width of the glitches? Are you grounding your Saleae? I may need to use a fast sampling Saleae depending on the pulse-width.

    Best,

    Owen

  • Hi Owen, 

    The pulse-width of glitches are all 160ns, and this glitchy signal appears randomly and continuously on phase shifted PWM signal when the Main_Cross trigger is TIMG.

    I grounded Saleae to the GND on the same EVM.

    I've also tested with three other M0L2228 EVMs, but I can see the same glitch on phase shifted PWM signal.

    - PWM Period Count: 80

    - Caculated PWM Frequency (Hz): 400000

    - Timer Clock: BUSCLK, 32000000 (Divided by 1, Prescale 1)

    Many thanks,

    Yesol