![ARTERY AT32F435 Series Скачать руководство пользователя страница 497](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592497.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 497
Rev 2.03
Figure 22-2 ACC block diagram
控制寄存器
(CTRL)
CALIBRATION
CONTROL
USB_SOF1
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
0
1
SOFSEL
USB_SOF2
22.5 Principle
USB_SOF period signal: 1ms of period must be accurate, which is a prerequisite of the normal operation
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 triggering auto calibration is reached.
Cross:
If the auto calibration condition is met, the actual sampling data in 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.