Skip to content

Document 14 bit LEDC restriction for ESP32-S2/S3/C2/C3#6634

Merged
guillempages merged 2 commits into
esphome:currentfrom
RubenKelevra:ledc_bit_depth_fix
May 31, 2026
Merged

Document 14 bit LEDC restriction for ESP32-S2/S3/C2/C3#6634
guillempages merged 2 commits into
esphome:currentfrom
RubenKelevra:ledc_bit_depth_fix

Conversation

@RubenKelevra
Copy link
Copy Markdown
Contributor

@RubenKelevra RubenKelevra commented May 16, 2026

Description

The ESP32-S2, ESP32-S3, ESP32-C2 and ESP32-C3 only support a 14 bit LEDC timer, while the other ESP32 variants supported by ESPHome feature a 20 bit LEDC timer. This leads to the 14 bit timer variants being missrepresented in the docs, as being more capable than they are.

I've also included a hidden MDX note for the not yet supported ESP32-H21 and ESP32-H4, for future reference.

References:

Details

https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32/include/soc/soc_caps.h

https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32s2/include/soc/soc_caps.h

https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32s3/include/soc/soc_caps.h

https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32c2/include/soc/soc_caps.h

https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32c3/include/soc/soc_caps.h

https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32c5/include/soc/soc_caps.h

https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32c6/include/soc/soc_caps.h

https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32c61/include/soc/soc_caps.h

https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32h2/include/soc/soc_caps.h

https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32p4/include/soc/soc_caps.h

https://github.com/espressif/esp-idf/blob/master/components/soc/esp32h21/include/soc/soc_caps.h

https://github.com/espressif/esp-idf/blob/master/components/soc/esp32h4/include/soc/soc_caps.h

Checklist

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

The ESP32-S2, ESP32-S3, ESP32-C2 and ESP32-C3 only support a 14 bit LEDC
timer, while the other ESP32 variants supported by ESPHome feature a 20 bit
LEDC timer. This leads to the 14 bit timer variants being missrepresented
in the docs, as being more capable than they are.

I've also included a hidden MDX note for the not yet supported ESP32-H21
and ESP32-H4, for future reference.

References:
https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32/include/soc/soc_caps.h
https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32s2/include/soc/soc_caps.h
https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32s3/include/soc/soc_caps.h
https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32c2/include/soc/soc_caps.h
https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32c3/include/soc/soc_caps.h
https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32c5/include/soc/soc_caps.h
https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32c6/include/soc/soc_caps.h
https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32c61/include/soc/soc_caps.h
https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32h2/include/soc/soc_caps.h
https://github.com/espressif/esp-idf/blob/v5.5.3/components/soc/esp32p4/include/soc/soc_caps.h
https://github.com/espressif/esp-idf/blob/master/components/soc/esp32h21/include/soc/soc_caps.h
https://github.com/espressif/esp-idf/blob/master/components/soc/esp32h4/include/soc/soc_caps.h
@esphome esphome Bot added the current label May 16, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2873bd40-e871-4090-8cc0-30fe24cfaca7

📥 Commits

Reviewing files that changed from the base of the PR and between be3d62b and 362dbe1.

📒 Files selected for processing (1)
  • src/content/docs/components/output/ledc.mdx
✅ Files skipped from review due to trivial changes (1)
  • src/content/docs/components/output/ledc.mdx

Walkthrough

This pull request updates the LEDC output component documentation for ESP32 devices. The recommended frequencies table now includes variant-specific annotations clarifying which hardware configurations support different bit-depth timers, with footnote text distinguishing 14-bit and 20-bit LEDC timer support across ESP32 variants.

Changes

LEDC Frequency Documentation

Layer / File(s) Summary
LEDC frequency table and variant notes
src/content/docs/components/output/ledc.mdx
The recommended frequencies table is updated with asterisk-annotated alternative bit-depth values for the 1220 Hz and 2441 Hz rows. Footnote text explains which ESP32 variants are limited to 14‑bit LEDC timers versus those supporting 20‑bit timers (resulting in up to 16‑bit resolution), with a commented note about future variant support.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • esphome/esphome.io#6638: Also updates src/content/docs/components/output/ledc.mdx to clarify ESP32-variant LEDC timer limitations and frequency/bit-depth guidance.

Suggested reviewers

  • guillempages
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: documenting a 14-bit LEDC restriction for four ESP32 variants, which directly matches the documentation update in the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining the motivation for the documentation update with specific variant details and reference links to source material.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 16, 2026

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 362dbe1
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6a1c7f3b0106da0008842552
😎 Deploy Preview https://deploy-preview-6634--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@guillempages guillempages left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@guillempages guillempages enabled auto-merge (squash) May 31, 2026 18:34
@guillempages guillempages merged commit 5c52b79 into esphome:current May 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants