2023-11-11 04:34 AM
I am using an STM32G474 to create an inverting buck-boost converter, but after damaging a few boards, I realized that there is a series design issue that could short 24V to ground through an inductor if the HRTIM output pin ever goes high unexpectedly. Here is a clip from the schematic:
Note that if the top MOSFET of the half-bridge gets switched on for longer than a few microseconds, there will essentially be a short from 24V to ground through L1.
Is there a way that I can significantly reduce the chances of this happening under the following conditions?
I know some features that I might be able to use, listed below, but I'm a newbie with this MCU and digitally controlled power supplies in general:
Is there a way that I can force an MCU reset that will require a power cycle to recover from if an invalid instruction is executed or if code execution is not happening from within a defined region?
Thank you!
2023-11-16 09:24 AM
Hello @DavidNaviaux,
Here some comments/questions about your possible actions :
Best Regards,
Pierre
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-11-16 10:09 AM
Pierre, actually the two FETs are being driven by an external half-bridge gate driver. The gate driver received one PWM signal from the MCU. The deadtime is handled by the gate driver.
I never wanted to start executing from RAM. My problem was that I had the BOOT0 pin floating and with the default option bits, that caused the code to start executing out of uninitialized RAM which eventually caused the PWM output signal from the MCU to go wild (toggling between high and low with no particular timing). This caused a direct short from the +24V through the top FET and the filter inductor to ground (when the PWM signal was high). Had I not been using a current limit power supply, I'm sure something would have been damaged.
Once I found out that the BOOT0 pin needed to be low the very first time the MCU was power, I made the correction.
Thank you, I'll look into the PVD.
2023-11-19 02:51 AM
Pierre, below is the complete schematic of the inverting buck-boost converter. The single PWM signal from the STM32G474 toggles the input of the half-bridge gate driver between +12V and the negative output voltage. This is required because the gate driver is referenced to the output voltage not ground (as required by this topology).
I am still working at responding to fault conditions, include using the PVD. I have to be careful here because if I make a mistake, instead of forcing the PWM outputs low, I could force them high.
2023-11-20 06:20 AM
Hello @DavidNaviaux,
Thanks for sharing your full schematic !
Here some answer :
Best Regards,
Pierre
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-11-25 01:30 PM
Thank you Pierre, I'll have to read about burst mode.
The original problem I had was that with the floating boot0 pin, the very first time the MCU was powered, it executed out of uninitialized RAM and actually generated random output on my PWM pins resulting in an intermittently shorted power supply. I was able to program the MCU eventually, but each time it reset, this was happening. I'm not familiar with the BOOT_LOCK bit, but this problem was solved by a PD resistor on the BOOT0 pin. I later began programming the option bits to ignore the BOOT0 pin and to execute from Flash. Although the PD resistor solved this issue. Thanks again.