Skip to content

Commit 33f0f05

Browse files
committed
Extra info about the state of the port. The esp-idf driver now works.
1 parent 67e2522 commit 33f0f05

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# FastLED-idf & Patterns
22

3-
# WARNING! Currently crashes immediately with more than one string of LEDs, issue #16
4-
53
# TL;DR
64

75
This port of FastLED 3.3 runs under the 4.x ESP-IDF development environment. Enjoy.
@@ -110,9 +108,7 @@ one which doesn't, and claims to be more efficient due to when it's converting
110108
between LED RGB and not.
111109

112110
Whether you can use the "direct" mode or not depends on whether you have other
113-
users of the RMT driver within ESP-IDF - however, *using the ESP-IDF supplied driver is
114-
not currently working or supported*. I've grown tired of trying to figure out the
115-
differences of the different versions.
111+
users of the RMT driver within ESP-IDF.
116112

117113
Essentially, if you have the Driver turned on, you shouldn't use the direct mode,
118114
and if you want to use the direct mode, you should turn off the driver.
@@ -246,6 +242,12 @@ I did.
246242

247243
https://github.com/samguyer/FastLED
248244

245+
## TODO: use the `rmt_translator_init` function
246+
247+
There is no reason to have ones own ISR. The ESP-IDF system has a 'translator', which
248+
is a function which will take pixel bytes to RMT buffers. This is the structure of the
249+
code already, so the entire ISR can be removed. This functionality is not in the Arduino
250+
implementation of RMT, which is why its not used here yet.
249251

250252
# Updating
251253

@@ -454,8 +456,6 @@ Note: what's up with registering the driver? I should, right? Make sure that's d
454456
menuconfig? Doen't seem to be. There are no settings anywhere in the menuconfig regarding
455457
gpio. Should probably look at the examples to see if I have to enable the ISR or something.
456458

457-
458-
459459
## using RMT vs I2S
460460

461461
Note to self: There is a define in the platforms area that lets a person choose.
@@ -537,6 +537,23 @@ and used the -O2 compile option, I got instability. When I switched to using the
537537
constructure, which seems the same to me generally, I get a stable build. I
538538
now wonder if this was some of the issue around not using the IRQ....
539539

540+
## issues regarding ESP-IDF 4.1 and private interrupt handler
541+
542+
The underlying RMT code in ESP-IDF changed fairly radically between 4.0, 4.1, 4.2, and further.
543+
Specifically, the 4.1 code introduces the rmt_ll layer, but also initializes
544+
the structures used by `_set_tx_thr_intr_en` to set values in the chip only
545+
when the ESP-IDF interrupt handler is registered. This is resolved in 4.2, but
546+
in order to support 4.0, 4.1, and 4.2, I've put shadow versions of those functions.
547+
There are only three, so it's not a big deal.
548+
549+
## using mRMT_channel
550+
551+
The definition of the RMT system states that if you're using a buffer size of greater
552+
than 1 MEM_BLOCK, one must not use all the RMT channels. Thus, unlike other similar code
553+
in other systems, there are 8 channels and 8 rmt channels, but because we support MEM_BLOCK,
554+
the number of channels is limited by the MEM_BLOCKs, and it's important to use mRMT_channel,
555+
which is the underlying RMT channel in every case.
556+
540557
## message about no hardware SPI pins defined
541558

542559
It's true! There are no hardware SPI pins defined. SPI is used for 4-wire LEDs, where

0 commit comments

Comments
 (0)