Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit 6e52b7f

Browse files
authored
Fix typo bug
Interval in microsecs, must multiply to 1000 here or crash
1 parent 1022768 commit 6e52b7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/ISR_RPM_Measure/ISR_RPM_Measure.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ void setup()
146146
// For 64-bit timer counter
147147
// For 16-bit timer prescaler up to 1024
148148

149-
// Interval in microsecs
150-
if (ITimer1.attachInterruptInterval(TIMER1_INTERVAL_MS, TimerHandler1))
149+
// Interval in microsecs, must multiply to 1000 here or crash
150+
if (ITimer1.attachInterruptInterval(TIMER1_INTERVAL_MS * 1000, TimerHandler1))
151151
Serial.println("Starting ITimer1 OK, millis() = " + String(millis()));
152152
else
153153
Serial.println("Can't set ITimer1. Select another freq., duration or timer");

0 commit comments

Comments
 (0)