From 197a3de5d357296015fe30c4300946231b8133eb Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Sat, 14 Jan 2017 11:41:14 +0000 Subject: [PATCH] Use existing OSCCAL as starting point for calibration If we're being loaded from micronucleus it will have already performed calibration on OSCCAL, so use that as the starting point for our recalibration. This seems to improve things on an older Dell host that previously had issues enumerating the device. --- libs-device/osccalASM.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs-device/osccalASM.S b/libs-device/osccalASM.S index 60d6fb9..dd9379e 100644 --- a/libs-device/osccalASM.S +++ b/libs-device/osccalASM.S @@ -93,7 +93,7 @@ calibrateOscillatorASM: cli ldi opD, 255 - ldi try, 128 ; calibration start value + in try, OSCCAL ; calibration start value ldi stp, 64 ; initial step width ldi i, 10 ; 10 iterations -- 2.39.2