
AT32F413
Series Reference Manual
2022.06.27
Page 330
Rev 2.00
Figure 22-2
ACC block diagram
Control register
(CR
)
CALIBRATION
CONTROL
USB_SOF
CRM_HICKCAL
RSLOST
CRM_HICKTRIM
HICKTRIM
HICKCAL
ACC_HICKTRIM
ACC_HICKCAL
C1
C2
C3
ACC
INTERRUPT
CONTROL
CALRDYIEN
EIEN
ENTRIM
HICKCLK
STEP
CALON
0
1
0
1
CALRDY
22.5 Principle
USB_SOF period signal:
1ms of period must be accurate, which is a prerequisite of the normal operaion
of an auto calibration module.
Cross-return algorithm:
This is used to calculate a calibration value closest to the theoretic value. In
theory, the actual frequency after calibration can be adjusted to be within an accuracy range of about
0.5 steps from the target frequency (8MHz)
Figure 22-3
Cross-return algorithm
C1 = 7980
C3 = 8020
C2 = 8000
From the above figure, auto calibration function will adjust the HICKCAL or HICKTRIM according to the
specified step as soon as the condition for trigerring auo calibration is reached.
Cross:
When the auto calibration condition is met, the actual sampling data within the first 1ms period will be
either less than C2, or greater than C2.
When this value is less than C2, the auto calibration module will start increasing either the HICKCAL or
HICKTRIM according to the step definition until the actual sampling value is greater than C2. In this way,
the actual value will cross over C2 from small to large.
When this value is greater than C2, the auto calibration module will start decrease either the HICKCAL
or HICKTRIM according to the step definition until the actual sampling value become less than C1. In
this way, the actual value will cross over C2 from large to small.