
302
7530J–AVR–03/12
Atmel ATmega48/88/168 Automotive
Figure 26-3. Dichotomic Algorithm Used for LIN Slave Clock Re-synchronization
26.8
Precaution Against OSCCAL Discontinuity
The
Figure 28-23 illustrates the on-purpose discontinuity of RC Frequency versus OSCCAL
value. For one correct re-synchronization, the frequency change must be kept on the same side
of the discontinuity (no change of OSCCAL[7]). Since there will be no device having frequency
changed by more than 10% (see
Figure 28-21), thus no reason to change the frequency value
by more than 10%. Therefore, when calibration tries to cross the border because of subsequent
increase (or decrease) in OSCCAL values, then the routine must be stopped.
example: For parts operating in the lower part of the curve, if New_OSCCAL >127 then
New_OSCCAL = 127. Similar for parts operating on the high side of the discontinuity.
Measuring
actual TBit
Increment
OSCCAL
Decrement
OSCCAL
-2% < Delta(TBit) < 2%
Delta(TBit) > 2%
Delta(TBit) < -2%
STOP:
Oscillator
Calibrated
Y
N