I'm making a 400V adjustable buck converter. I am controlling it with an ESP32. For some reason, if I set the PWM frequency to higher than just 200Hz and a bit rate of 4, the IRFB11N50A MOSFET doesn't close in time.
For example, when the chip is set to a duty cycle of 50%, there would run 375V through the MOSFET, and at 75% around 385 V, like the 0-100% only goes from 350 V to 400 V.
I'm guessing this is because the MOSFET doesn't close in time. (This is when the frequency is above 200 Hz, and the higher the worse it gets, at 100 kHz it's just on all the time.)
I'm not sure why it can't close faster than 200 Hz since the datasheet says its maximum frequency should be something around 8 MHz. What did I do wrong?
(Sorry for the confusion, anciently added the wrong component)