[esp32_rmt] Updates for IDF 5+#7770
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #7770 +/- ##
==========================================
+ Coverage 53.70% 53.77% +0.06%
==========================================
Files 50 50
Lines 9408 9840 +432
Branches 1654 1361 -293
==========================================
+ Hits 5053 5291 +238
- Misses 4056 4223 +167
- Partials 299 326 +27 ☔ View full report in Codecov by Sentry. |
|
Have not tested this on arduino only on idf. Not sure if/when this would get merged but at least there is a working proof of concept. |
|
I tried to use this PR in conjuction with the CC1101 PR #6300 . I get the following error, is this expected? |
|
Arduino won't compile, no drivers/rmt_rx/tx.h there. My first test subject was a c3, same error, cannot allocate rmt for the receiver. |
|
I found this, something about 64 symbols. http://esp32.io/viewtopic.php?t=28393
Definitely 3 times the limit. Yep, Needs some checks in |
|
S3 has a nice RGB led. There are three different components for WS2811, only esp32_rmt_led_strip compiles with esp-idf, and using the old rmt headers, it creates a conflict. I cannot receive on the same pin, but two pin mode works. On C3, it worked both ways. |
|
|
|
rmt_receive can't even return ESP_ERR_NOT_SUPPORTED according to the docs. There is a note though:
|
To use 1 pin mode you have to uncomment this, I have to add an option for it: // TODO: add support for a rx/tx 1-wire gpio I can do that today |
Maybe that is the problem, it always worked for me though. Not sure how to enable that. |
|
Could this enable that option? |
You can add "one_wire: true" to remote transmitter and it should work now without modifying anything. |
|
Actually it cant be the iram thing, this happens in the setup function not the isr. It can only be channel, filter, idle or the buffer pointer. The channel was just created without an error. Maybe the buffer pointer is invalid? I don't know. |
I pushed a new change can you try it again? |
|
@swoboda1337 I hope you don't mind...I jumped in and pushed a few more changes to keep things moving along. 😇 |
Looks good thanks! I will look at the remaining things today. I finished the docs but want to give them a second read. EDIT: done |
kbx81
left a comment
There was a problem hiding this comment.
I think this is it...I've been testing on both an ESP32 and a C3 and it seems to be good...thanks for all the work! 🍻
|
I created #7974 to update split default to work with C6 and H2. Right now those defaults aren't right. I can update them if that pr gets merged. |
|
Last 2 commits broke it for esp32dev board |
It didn't actually break it, there was another change made to core. If you build on dev it will should work. Not sure if there is a way to sync to a previous change with a pr + external components. |
Yes you should be to sync to a prev commit if you need to: |
kbx81
left a comment
There was a problem hiding this comment.
Re-tested & still working for me here. 😄
kbx81
left a comment
There was a problem hiding this comment.
Re-tested & still working for me here. 😄
Thanks, this source works for me. |
|
@kbx81 should mark this as breaking since rmt_channel, clock_divider and memory_blocks have been removed from IDF. |
|
Oh! I thought we did that... 🤦🏻 |
What does this implement/fix?
Newer versions of the framework have a new RMT driver:
One big difference is the user cannot choose the RMT channel. Will simplify the esphome code as there is no need to coordinate between components as its all done in the driver.
Newer driver has a number of other advantages:
Remote code and led code have been updated to support both versions of the RMT driver. Arduino doesn't support the newer drivers yet. We have to support both drivers for a while.
Note neopixelbus also used RMT but it doesn't work with IDF anyways so it wont be a problem.
Types of changes
Related issue or feature (if applicable):
Pull request in esphome-docs with documentation (if applicable):
Test Environment
Example entry for
config.yaml:Checklist:
tests/folder).If user exposed functionality or configuration variables are added/changed: