Skip to content

Commit 783baaa

Browse files
committed
Seems that removing the redudant resetting of edge interrupt mode shaves 0.5us off rearm latency.
1 parent 91e4bb6 commit 783baaa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cores/esp8266/core_esp8266_waveform.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ constexpr int32_t DELTAIRQCCYS = clockCyclesPerMicrosecond() == 160 ?
5555
microsecondsToClockCycles(3) >> 1 : microsecondsToClockCycles(3);
5656
// The latency between in-ISR rearming of the timer and the earliest firing
5757
constexpr int32_t IRQLATENCYCCYS = clockCyclesPerMicrosecond() == 160 ?
58-
(microsecondsToClockCycles(3) / 2) >> 1 : microsecondsToClockCycles(3) / 2;
58+
microsecondsToClockCycles(1) >> 1 : microsecondsToClockCycles(1);
5959

6060
// Set/clear GPIO 0-15 by bitmask
6161
#define SetGPIO(a) do { GPOS = a; } while (0)
@@ -453,5 +453,4 @@ static ICACHE_RAM_ATTR void timer1Interrupt() {
453453
// 80MHz binaries in 160MHz boost (SDK) need NMI scaling
454454
// to maintain duty/idle ratio.
455455
T1L = CPU2X & 1 ? nextTimerCcys >> 1 : nextTimerCcys;
456-
TEIE |= TEIE1; // Edge int enable
457456
}

0 commit comments

Comments
 (0)