From a62c7451d5603c680289c10930b19634730dcfc0 Mon Sep 17 00:00:00 2001 From: Sam Guyer Date: Thu, 3 Dec 2020 19:33:35 -0500 Subject: Experimental change: inline rmt library calls that need to be in IRAM during flash operations --- src/platforms/esp/32/clockless_rmt_esp32.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/platforms/esp/32/clockless_rmt_esp32.cpp b/src/platforms/esp/32/clockless_rmt_esp32.cpp index 2dd94b92..e4b6840c 100644 --- a/src/platforms/esp/32/clockless_rmt_esp32.cpp +++ b/src/platforms/esp/32/clockless_rmt_esp32.cpp @@ -252,7 +252,8 @@ void ESP32RMTController::startOnChannel(int channel) // Setting this RMT flag is what actually kicks off the peripheral void ESP32RMTController::tx_start() { - rmt_tx_start(mRMT_channel, true); + //rmt_tx_start(mRMT_channel, true); + RMT.conf_ch[mRMT_channel].conf1.tx_start = 1; mLastFill = __clock_cycles(); } @@ -271,7 +272,9 @@ void ESP32RMTController::doneOnChannel(rmt_channel_t channel, void * arg) gpio_matrix_out(pController->mPin, 0x100, 0, 0); // -- Turn off the interrupts - rmt_set_tx_intr_en(channel, false); + // rmt_set_tx_intr_en(channel, false); + RMT.int_ena.val &= ~(1 << (mRMT_channel * 3)); + RMT.int_ena.val |= (enable << (mRMT_channel * 3)); gOnChannel[channel] = NULL; gNumDone++; -- cgit v1.2.3