Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c3ddc59

Browse filesBrowse files
committed
Recalibrated DELTAIRQ and IRQLATENCY. Tested @ 3x 40kHz PWM + 440Hz Tone
1 parent 4638911 commit c3ddc59
Copy full SHA for c3ddc59

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎cores/esp8266/core_esp8266_waveform.cpp

Copy file name to clipboardExpand all lines: cores/esp8266/core_esp8266_waveform.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ constexpr uint32_t ISRTIMEOUTCCYS = microsecondsToClockCycles(14);
5454
// decrement the next IRQ's timer value by a bit so we can actually catch the
5555
// real CPU cycle count we want for the waveforms.
5656
constexpr int32_t DELTAIRQ = clockCyclesPerMicrosecond() == 160 ?
57-
microsecondsToClockCycles(4) >> 1 : microsecondsToClockCycles(4);
57+
microsecondsToClockCycles(1) >> 1 : microsecondsToClockCycles(1);
5858
// The latency between in-ISR rearming of the timer and the earliest firing
5959
constexpr int32_t IRQLATENCY = clockCyclesPerMicrosecond() == 160 ?
60-
microsecondsToClockCycles(3) >> 1 : microsecondsToClockCycles(3);
60+
(microsecondsToClockCycles(5) / 2) >> 1 : (microsecondsToClockCycles(5) / 2);
6161

6262
// Set/clear GPIO 0-15 by bitmask
6363
#define SetGPIO(a) do { GPOS = a; } while (0)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.