It's close to 100% when the Led is grounded with 'internal' resistance set to 100 Ohm, as in picture.
When the same led is connected through the dipswitch than the speed drops to about 40%.
A 'fresh' default led connected with the 100 Ohms resistor and Gnd than the speed drops to 35%.
Code source:
https://www.electronicwings.com/avr-atmega/atmega1632-pwm
I am not sure to call this a bug but I think it's good to know about this difference and how it can be avoided.
When the same led is connected through the dipswitch than the speed drops to about 40%.
A 'fresh' default led connected with the 100 Ohms resistor and Gnd than the speed drops to 35%.
Code source:
https://www.electronicwings.com/avr-atmega/atmega1632-pwm
I am not sure to call this a bug but I think it's good to know about this difference and how it can be avoided.