PWM of ESP32
Posted: Fri Aug 11, 2023 1:38 am
Hello Espressif Community,
I have two questions related to the PWM hardware of ESP32:
1. By the documentation of the LEDC library, there are 4 timers and 16 PWM channels in ESP32. I would like to ask if all of the 4 timers are ticking at 80 MHz (assume all prescaler is 1).
2. I know that the frequency and resolution of a specific PWM channel are inversely-proportioned. However, I cannot find an exact mathematical formula to describe their relation. For example, if I set the frequency to be 10 kHz, what is the maximum bit count of resolution? How do I calculate that?
Thank you very much for your help.
I have two questions related to the PWM hardware of ESP32:
1. By the documentation of the LEDC library, there are 4 timers and 16 PWM channels in ESP32. I would like to ask if all of the 4 timers are ticking at 80 MHz (assume all prescaler is 1).
2. I know that the frequency and resolution of a specific PWM channel are inversely-proportioned. However, I cannot find an exact mathematical formula to describe their relation. For example, if I set the frequency to be 10 kHz, what is the maximum bit count of resolution? How do I calculate that?
Thank you very much for your help.