]> the.earth.li Git - riso-kagaku-clone.git/commitdiff
Use existing OSCCAL as starting point for calibration
authorJonathan McDowell <noodles@earth.li>
Sat, 14 Jan 2017 11:41:14 +0000 (11:41 +0000)
committerJonathan McDowell <noodles@earth.li>
Sat, 14 Jan 2017 11:41:14 +0000 (11:41 +0000)
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

index 60d6fb9e15bdc746a51de06b1434132689712770..dd9379e152b350b47dbc095e533b85a229f5536f 100644 (file)
@@ -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