ESP32 S3 LEDC and PWM dithering

leafmuncher
Posts: 5
Joined: Thu Apr 06, 2023 6:47 pm

ESP32 S3 LEDC and PWM dithering

Postby leafmuncher » Thu Apr 06, 2023 6:51 pm

It looks from the manual that the chip supports dithering using the lower 4 bits of the duty cycle, but I don’t seem to see support in the API for this. Am I missing it?

leafmuncher
Posts: 5
Joined: Thu Apr 06, 2023 6:47 pm

Re: ESP32 S3 LEDC and PWM dithering

Postby leafmuncher » Tue Apr 25, 2023 2:35 am

Really, nobody else knows about this?

I'm referring to this section in the manual:
However, when B is nonzero, LEDC_CLK_DIV becomes a non-integer divisor. The clock divider implements non-integer frequency division by alternating between A and (A+1) LEDC_CLKx clock pulses per ref_pulsex clock pulse. This will result in the average frequency of ref_pulsex clock pulse being the desired frequency (i.e. the non-integer divided frequency).
The [low-level code](https://github.com/espressif/esp-idf/bl ... #L283-L285) just ends up shifting left four bits, so access to those fractional bits at the bottom doesn't seem to be available.

Who is online

Users browsing this forum: Bing [Bot] and 135 guests