Skip to main content
Associate III
October 15, 2025
Solved

How to fix the center-aligned problem of the PWM signals?

  • October 15, 2025
  • 1 reply
  • 417 views

Hello Everybody,

Here are the software and boards in this case:

1. MC workbench 6.4.1
2. STM32 FW V1.28.2

I’m running the code generated by ST MCSDK and noticed that the waveforms on the microcontroller’s U-phase and V-phase channels (see pins Ch. U and Ch. V in picture 2) are not center-aligned—there is a slight offset (see picture 1: the center of the blue waveform is shifted a little to the left relative to the yellow one). How can I fix this? I suspect this mismatch is causing noticeable acoustic noise while the motor is running.

How can I fix the problem? Thank you!

PWM_wave.jpgPWM_mcu_pin.jpg

Best answer by federico.rodighiero87

Yes, if no shifting techniques are used, the PWM signals are center-aligned.

1 reply

GMA
Technical Moderator
October 15, 2025

Hello @DF_MC,

For single-shunt topology, a phase shift is applied as described in the Single-shunt with phase-shift current sensing overview chapter of the user manual available through Workbench tool > About > Documentations > Documentation > User manual.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
DF_MCAuthor
Associate III
October 16, 2025

Hello, @GMA 

Thanks for your reply. I am using the "isolated current sensor topology" (as shown in the picture below). Should I make any modifications to the generated code to fit my current configuration? Thank you!

ICS_Demo.jpg