ArduinoCore-sam icon indicating copy to clipboard operation
ArduinoCore-sam copied to clipboard

delay() is inaccurate, averaging 500us too short.

Open WestfW opened this issue 7 years ago • 0 comments

Since delay(n) waits for n ticks of the millisecond counter, any time already elapsed in the "current" millisecond isn't taken into account.

This was fixed a long time ago for the AVR, but it didn't make it into SAMD/SAM

https://github.com/arduino/Arduino/issues/237

https://github.com/arduino/ArduinoCore-avr/commit/67c0a1995aace2953e481ef6183b1b91e04942fc#diff-ab397febf179e1982f4ee0758df4c982

WestfW avatar Sep 06 '18 07:09 WestfW