It was my first electronics project some years ago now: PWM Frequency Library - Still will not compile for ATmega1284 - #6 by 6v6gt
On that esp32 variant I guess you are aware that the labelling of the pins is under the pin. Could it be as simple as that?