diff --git a/cores/arduino/Tone.cpp b/cores/arduino/Tone.cpp index 29a5842d..d30e0d79 100644 --- a/cores/arduino/Tone.cpp +++ b/cores/arduino/Tone.cpp @@ -21,7 +21,9 @@ class Tone { void start(void) { ticker.attach(mbed::callback(this, &Tone::toggle), 0.5f / float(frequency)); - start_timeout(); + if (duration != 0) { + start_timeout(); + } } void toggle() {