I built ESC that had a 1N4007 as flyback diode. It was destroyed because my ESC was working with high PWM frequency. I replaced the 1N4007 with BYV29 ultrafast rectifier diode.
The result was good this diode can support 20 kHz frequency without any overheating.
What is the maximum frequency that this diode can support? How can I calculate it from its datasheet?