Skip to content

ESP32-S3 Ledc different resolutions cause wrong duty update #11373

Open
@handmade0octopus

Description

@handmade0octopus

Board

Custom ESP32-S3 board

Device Description

Custom Gauge.S board

Hardware Configuration

[    123][I][esp32-hal-ledc.c:166] ledcAttachChannel(): LEDC attached to pin 10 (channel 0, resolution 8)
[  1791][I][esp32-hal-ledc.c:166] ledcAttachChannel(): LEDC attached to pin 3 (channel 1, resolution 14)

Version

v3.2.0

IDE Name

PlatformIO

Operating System

W11

Flash frequency

80mhz

PSRAM enabled

yes

Upload speed

Default

Description

When setting different resolutions on different channels, second one called disrupts duty resolution calculation and frequency.

Basically I set first one to pin 10 to control backlight LED at 500hz frequency and 8 bit resolution.

Then I use 400Hz PWM output on 14 bit resolution.

After second one is setup the first one goes from very well working to 29 Hz at ~1% duty cycle (measured with scope).

Sketch

not relevant

Debug Message

Got scope trace but its not very interesting.

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions