Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RMT timing clock base #6101

Merged
merged 2 commits into from
Jan 16, 2024
Merged

Fix RMT timing clock base #6101

merged 2 commits into from
Jan 16, 2024

Conversation

majkrzak
Copy link
Contributor

@majkrzak majkrzak commented Jan 15, 2024

What does this implement/fix?

RMT on ESP32 is no longer clocked with the ABP clock, which value were used in the esp32_rmt_led_strip component. In recent C6 (and probably couple previous) PLL_F80M_CLK 80 MHz clocks used, while earlier ABP_CLK was used, which is stated to be always 80 MHz for that case also, as stated in Tehnical Reference Manuals.

This cause wrong timings in esp32_rmt_led_strip for chips like ESP32 C6 and most likely P4, H2, C5 and sometimes C2.

To fix it, I suggest adding a constant missing from esp-idf framework, and using it istead.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

# Example config.yaml

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

References

@probot-esphome
Copy link

Hey there @jesserockz, mind taking a look at this pull request as it has been labeled with an integration (esp32_rmt_led_strip) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d551a2e) 53.60% compared to head (6c15dc3) 53.68%.
Report is 10 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #6101      +/-   ##
==========================================
+ Coverage   53.60%   53.68%   +0.07%     
==========================================
  Files          50       50              
  Lines        9374     9385      +11     
  Branches     1650     1651       +1     
==========================================
+ Hits         5025     5038      +13     
+ Misses       4050     4049       -1     
+ Partials      299      298       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jesserockz jesserockz added this to the 2023.12.7 milestone Jan 16, 2024
@jesserockz jesserockz merged commit ea03058 into esphome:dev Jan 16, 2024
53 checks passed
jesserockz pushed a commit that referenced this pull request Jan 16, 2024
@jesserockz jesserockz mentioned this pull request Jan 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants