From d8264755f93d6da966b5d0db36aa5126dd26de80 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Wed, 2 Jul 2025 23:08:07 -0400 Subject: [PATCH 1/4] Use beta RMT high-priority interrupt --- platformio.ini | 4 ++-- wled00/bus_wrapper.h | 31 +++++++++++++++++++------------ 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/platformio.ini b/platformio.ini index 9bdf58d341..036f04cf80 100644 --- a/platformio.ini +++ b/platformio.ini @@ -140,8 +140,8 @@ lib_compat_mode = strict lib_deps = fastled/FastLED @ 3.6.0 IRremoteESP8266 @ 2.8.2 - makuna/NeoPixelBus @ 2.8.3 - #https://github.com/makuna/NeoPixelBus.git#CoreShaderBeta + #makuna/NeoPixelBus @ 2.8.3 + https://github.com/willmmiles/NeoPixelBus.git#esp32-rmt-high-interrupt https://github.com/Aircoookie/ESPAsyncWebServer.git#v2.4.0 # for I2C interface ;Wire diff --git a/wled00/bus_wrapper.h b/wled00/bus_wrapper.h index 5d8f306f5e..0908f5ffdc 100644 --- a/wled00/bus_wrapper.h +++ b/wled00/bus_wrapper.h @@ -244,53 +244,60 @@ typedef NeoEsp32I2s1Tm1914Method X1Tm1914Method; #endif +// RMT driver selection +#ifdef __XTENSA__ +#define NeoEsp32RmtMethod(x) NeoEsp32RmtHIN ## x ## Method +#else +#define NeoEsp32RmtMethod(x) NeoEsp32RmtN ## x ## Method +#endif + //RGB -#define B_32_RN_NEO_3 NeoPixelBusLg // ESP32, S2, S3, C3 +#define B_32_RN_NEO_3 NeoPixelBusLg // ESP32, S2, S3, C3 //#define B_32_IN_NEO_3 NeoPixelBusLg // ESP32 (dynamic I2S selection) #define B_32_I2_NEO_3 NeoPixelBusLg // ESP32, S2, S3 (automatic I2S selection, see typedef above) #define B_32_IP_NEO_3 NeoPixelBusLg // parallel I2S (ESP32, S2, S3) //RGBW -#define B_32_RN_NEO_4 NeoPixelBusLg +#define B_32_RN_NEO_4 NeoPixelBusLg #define B_32_I2_NEO_4 NeoPixelBusLg #define B_32_IP_NEO_4 NeoPixelBusLg // parallel I2S //400Kbps -#define B_32_RN_400_3 NeoPixelBusLg +#define B_32_RN_400_3 NeoPixelBusLg #define B_32_I2_400_3 NeoPixelBusLg #define B_32_IP_400_3 NeoPixelBusLg // parallel I2S //TM1814 (RGBW) -#define B_32_RN_TM1_4 NeoPixelBusLg +#define B_32_RN_TM1_4 NeoPixelBusLg #define B_32_I2_TM1_4 NeoPixelBusLg #define B_32_IP_TM1_4 NeoPixelBusLg // parallel I2S //TM1829 (RGB) -#define B_32_RN_TM2_3 NeoPixelBusLg +#define B_32_RN_TM2_3 NeoPixelBusLg #define B_32_I2_TM2_3 NeoPixelBusLg #define B_32_IP_TM2_3 NeoPixelBusLg // parallel I2S //UCS8903 -#define B_32_RN_UCS_3 NeoPixelBusLg +#define B_32_RN_UCS_3 NeoPixelBusLg #define B_32_I2_UCS_3 NeoPixelBusLg #define B_32_IP_UCS_3 NeoPixelBusLg // parallel I2S //UCS8904 -#define B_32_RN_UCS_4 NeoPixelBusLg +#define B_32_RN_UCS_4 NeoPixelBusLg #define B_32_I2_UCS_4 NeoPixelBusLg #define B_32_IP_UCS_4 NeoPixelBusLg// parallel I2S //APA106 -#define B_32_RN_APA106_3 NeoPixelBusLg +#define B_32_RN_APA106_3 NeoPixelBusLg #define B_32_I2_APA106_3 NeoPixelBusLg #define B_32_IP_APA106_3 NeoPixelBusLg // parallel I2S //FW1906 GRBCW -#define B_32_RN_FW6_5 NeoPixelBusLg +#define B_32_RN_FW6_5 NeoPixelBusLg #define B_32_I2_FW6_5 NeoPixelBusLg #define B_32_IP_FW6_5 NeoPixelBusLg // parallel I2S //WS2805 RGBWC -#define B_32_RN_2805_5 NeoPixelBusLg +#define B_32_RN_2805_5 NeoPixelBusLg #define B_32_I2_2805_5 NeoPixelBusLg #define B_32_IP_2805_5 NeoPixelBusLg // parallel I2S //TM1914 (RGB) -#define B_32_RN_TM1914_3 NeoPixelBusLg +#define B_32_RN_TM1914_3 NeoPixelBusLg #define B_32_I2_TM1914_3 NeoPixelBusLg #define B_32_IP_TM1914_3 NeoPixelBusLg // parallel I2S //Sm16825 (RGBWC) -#define B_32_RN_SM16825_5 NeoPixelBusLg +#define B_32_RN_SM16825_5 NeoPixelBusLg #define B_32_I2_SM16825_5 NeoPixelBusLg #define B_32_IP_SM16825_5 NeoPixelBusLg // parallel I2S #endif From db4cbfbd9bd9e2fc75c94bc8d145a483429d95a8 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Wed, 30 Jul 2025 22:48:44 -0400 Subject: [PATCH 2/4] Pin NeoPixelBus rmt-hi version Ensure repeatable test builds. --- platformio.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 036f04cf80..ea90874f1d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -141,7 +141,8 @@ lib_deps = fastled/FastLED @ 3.6.0 IRremoteESP8266 @ 2.8.2 #makuna/NeoPixelBus @ 2.8.3 - https://github.com/willmmiles/NeoPixelBus.git#esp32-rmt-high-interrupt + # Fork with high-priority RMT driver; commit pinned to esp32-rmt-hi branch 2025-07-30 + https://github.com/willmmiles/NeoPixelBus.git#b5682e3b https://github.com/Aircoookie/ESPAsyncWebServer.git#v2.4.0 # for I2C interface ;Wire From c950d24ebc4d7e103c23bad1de59d543d814bfc5 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Thu, 31 Jul 2025 23:04:14 -0400 Subject: [PATCH 3/4] Use RMT HI on RISCV (C3) --- platformio.ini | 2 +- wled00/bus_wrapper.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index ea90874f1d..7c0b966765 100644 --- a/platformio.ini +++ b/platformio.ini @@ -142,7 +142,7 @@ lib_deps = IRremoteESP8266 @ 2.8.2 #makuna/NeoPixelBus @ 2.8.3 # Fork with high-priority RMT driver; commit pinned to esp32-rmt-hi branch 2025-07-30 - https://github.com/willmmiles/NeoPixelBus.git#b5682e3b + https://github.com/willmmiles/NeoPixelBus.git#2baf9120 https://github.com/Aircoookie/ESPAsyncWebServer.git#v2.4.0 # for I2C interface ;Wire diff --git a/wled00/bus_wrapper.h b/wled00/bus_wrapper.h index 0908f5ffdc..a4ae22fce0 100644 --- a/wled00/bus_wrapper.h +++ b/wled00/bus_wrapper.h @@ -245,7 +245,7 @@ #endif // RMT driver selection -#ifdef __XTENSA__ +#ifndef WLED_USE_SHARED_RMT #define NeoEsp32RmtMethod(x) NeoEsp32RmtHIN ## x ## Method #else #define NeoEsp32RmtMethod(x) NeoEsp32RmtN ## x ## Method From 4f3243b510c183bdf1ec10736b8dd522fa497e1f Mon Sep 17 00:00:00 2001 From: Will Miles Date: Tue, 5 Aug 2025 23:09:11 -0400 Subject: [PATCH 4/4] Update NPB pin --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 7c0b966765..4f8bdb7ab8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -142,7 +142,7 @@ lib_deps = IRremoteESP8266 @ 2.8.2 #makuna/NeoPixelBus @ 2.8.3 # Fork with high-priority RMT driver; commit pinned to esp32-rmt-hi branch 2025-07-30 - https://github.com/willmmiles/NeoPixelBus.git#2baf9120 + https://github.com/willmmiles/NeoPixelBus.git#fc4df7d7 https://github.com/Aircoookie/ESPAsyncWebServer.git#v2.4.0 # for I2C interface ;Wire