2022-10-05 12:52 AM
Hello,
I am trying to design a high voltage capacitor charging power supply (max 4kV) with full bridge technology driven by STM32F334 (72MHz). The two-output PWM channel is used as a push-pull at 100 kHz and the PWM is adjusted approximately every 60 µs to limit the transformer primary current. The load time is around 100ms and the code works fine.
But sometimes the controller turns off the PWM outputs during charging for no apparent reason (the target charging voltage is not reached). Some times the next load works (main code still works). Some time the µc launches a load but the PWM outputs do not drive the Mosfet drivers and other times it doesn't. In this last condition even a hard reset does not work and only an ON/OFF of the power supply or a reprogramming of the chip is necessary to continue...
I don't know how to visualize the problem with the debug of CubeIDE because ideally I would have to break the code when the outputs are disabled. Does anyone have any idea what the problem is and how to troubleshoot it?
Thanks in advance.
2022-10-05 01:39 AM
Disconnect the power output to exclude possible hardware issue from that side.
When the problem occurs, read out and check the TIM registers' content to determine, what was the immediate reason for PWM stopping, then proceed from that.
JW