Skip to content

LEDC pull request introduced regressions https://github.com/espressif/arduino-esp32/pull/6045 #7306

Closed
@habazut

Description

@habazut

Board

ESP32 Dev Module

Device Description

Dev board and LED

Hardware Configuration

GPIO connected to LED

Version

v2.0.4

IDE Name

Arduino IDE

Operating System

Linux

Flash frequency

Whatever

PSRAM enabled

no

Upload speed

115200

Description

The pull request #6045 introduced two regressions:

  1. It is not possible any more to do the following any more:

ledcSetup(...); ledcAttachPin(...); ledcWrite(...); // set up channel with freqency an duty cycle to blink LED
ledcDetachPin(...) // remove pin (LED OFF)
ledcAttachPin(...) // attach pin again and it continues with SAME frequency and duty as before

as ledcAttachPin nowadays resets the duty cycle of a prefectly working channel setup.

  1. ledcSetup(channel, 1, 8) can nor set up frequency of 1Hz any more

Harald.

Sketch

I think you understand anyway, see above.

Debug Message

00:49:16.724 -> E (247241) ledc: requested frequency and duty resolution can not be achieved, try reducing freq_hz or duty_resolution. div_param=8460032
00:49:16.758 -> [247245][E][esp32-hal-ledc.c:75] ledcSetup(): ledc setup failed!

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

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions