From 5a6dafaf8cda2cf6f8149baea989646b05092f12 Mon Sep 17 00:00:00 2001 From: Claudio Indellicati <c.indellicati@arduino.cc> Date: Wed, 15 Apr 2015 18:00:12 +0200 Subject: [PATCH] Fixed default maximum frequency calculation in Tone.cpp. --- cores/arduino/Tone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/arduino/Tone.cpp b/cores/arduino/Tone.cpp index 739eab83..c670626b 100644 --- a/cores/arduino/Tone.cpp +++ b/cores/arduino/Tone.cpp @@ -21,7 +21,7 @@ #define WAIT_TC16_REGS_SYNC(x) while(x->COUNT16.STATUS.bit.SYNCBUSY); -uint32_t toneMaxFrequency = SystemCoreClock / 2; +uint32_t toneMaxFrequency = F_CPU / 2; uint32_t lastOutputPin = 0xFFFFFFFF; volatile uint32_t *portToggleRegister; -- GitLab