From: Jonathan McDowell Date: Sat, 14 Jan 2017 11:41:14 +0000 (+0000) Subject: Use existing OSCCAL as starting point for calibration X-Git-Url: https://the.earth.li/gitweb/?p=riso-kagaku-clone.git;a=commitdiff_plain;h=197a3de5d357296015fe30c4300946231b8133eb;ds=sidebyside 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. --- 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