Quadrature Decoder (Q-Decoder)
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
463
This field sets a value changed on the position counter which triggers the position changed
interrupt.
00: +/- 1
01: +/- 2
10: +/- 4
11: Reserved (never set 0x11 to these bits)
2
MNU_INI
R/W
0
This bit is used to enable the function of manually initial the phase state of the Q-decoder.
1: Manual set (software may read the state via GPIO and then write it to ‘INI_PHASE’)
0: Auto load when the Q-decoder is enabled; only trigger the auto load after rising edge
of ‘AXIS_EN‘ = 1.
1:0
INI_PHASE
R/W
0
The manual initial (A, B) phase state of the quadrature decoder
00: (0, 0)
01: (0, 1)
10: (1, 0)
11: (1, 1)
This field is valid only when the manually initial phase state function is enabled (MNU_INI = 1).
21.3.2
Position Measurement Registers
21.3.2.1
REG_MPC
Name
: Q-Decoder Max Position Counter Register
Size
: 32 bits
Address offset
: 0x0008
Read/write access
: read/write
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
PCC
R/W
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
MPC
R/W
Bit
Name
Access
Default
Description
31:16
PCC
R/W
0
The value to be compared with the position counter. If the position counter is equal to this
value then the corresponding interrupt (pc_cmp) is asserted.
15:0
MPC
R/W
0xFFFF
The maximum value of the position counter.
If the position counter is equal to this value and the movement direction is forward,
the position counter is reset to 0 on the next counter increment. And the position
counter overflow interrupt also occurs.
If the position counter is equal to 0 and the movement direction is backward, the
position counter is reset to this value on the next counter decrement. And the position
counter underflow interrupt also occurs.
21.3.2.2
REG_RC
Name
: Q-Decoder Max Rotation Compare Register
Size
: 32 bits
Address offset
: 0x000C
Read/write access
: read/write
31
30
29
28
…
15
14
13
12
11
10
9
…
2
1
0
RSVD
RCC
R/W
Bit
Name
Access
Default Description
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03