222
5-9-4 Interruption flag of HSC
The 100 segments interruption flags of each HSC are in the following table. For example, the
100 segments interruption flags of HSC0 are I2000, I2001, I2002….. I2099.
5-9-5 Setting value meaning in absolute or relative mode
The setting value meaning is different in absolute and relative mode. Relative/absolute mode
can be set in the software panel. It can also be modified by special Flash register SFD330.
(Note: Driving conditions must be OFF and ON again to make the configuration effective.)
0: Relative mode;
1: Absolute mode.
Relative mode
In relative mode, the set value of high-speed counting 100 segments is relative cumulative
value. When the set value of counting equals the sum of the interruption count value of N-1
segment and the set value of N segment, the segment N interrupt is generated.
N interrupt markers correspond to N interrupt settings. The N+1 interrupt settings register is
reserved for other purposes.
Example1:
The current value of HSC0 is 0, segment one preset value is 10000, the preset value in
segment 2 is -5000, the preset value in segment 3 is 20000. When starting to count, when
the counter's current value is 10000, it generates the segment 1 interruption I2000; when the
counter's current value is 5000, it generates the segment 2 interruption I2001; when the
counter's current value is 25000, it generates the segment 3 interruption I2002.
tudonghoatoancau.com