SPRAC77E January 2022 – February 2022 TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S
To determine the direction, a LUT compares the current QEP-A/B signals to the previous QEP-A/B signals. The previous QEP-A/B values are provided by the QCLK state machine (FSM) described in Section 5.4.1.
There are 4 possible cases shown in Table 5-5:
For case 1 and case 2 the DIRECTION signal does not matter. QCLK is kept low in this case by the QCLK state machine. A low QCLK disables the position counter and it will not increment nor decrement. For the do-not-care cases DIRECTION = 0 has been used.
The resulting equations are combined by an OR operator and can be viewed in the CLB tool.
Current State i2, i3 QEP-A(n), B(n) |
|||||
00 | 01 | 11 | 10 | ||
Previous State i0, i1 QEP-A(n-1), B(n-1) |
00 | 0 No movement |
0 Reverse |
0 Invalid |
1 (7) Forward |
01 | 1 (1)
Forward |
0 No movement |
0 Reverse |
0 Invalid |
|
11 | 0 Invalid |
1 (3) Forward |
0 No movement |
0 Reverse |
|
10 | 0 Reverse |
0 Invalid |
1 (5) Forward |
0 No movement |