SPRAC77E January 2022 – February 2022 TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S
The decoder CLB configuration is shown in Figure 5-4 and further described in Table 5-3.
Resource | Function | Notes |
---|---|---|
Inputs | ||
In0 | QEP_RESET | Connected
to GPREG bit 0 for software control of the position counter
reset.
|
In1 | QEP-I | As designed, the rising edge of this signal will prompt the HLC to store the current position counter in the FIFO. This is similar to the eQEP latch on rising edge mode. |
In2 | QEP_ENABLE | Connected
to GPREG bit 2. Provides an position counter enable/disable switch
from software.
|
In3 | QEP-A | The state transitions of QEP-A and QEP-B are used to detect movement, direction of the movement, or an error. |
In4 | Not used | Not used |
In5 | QEP-B | The state transitions of QEP-A and QEP-B are used to detect movement, direction of the movement, or an error. |
In6 | Not used | Not used |
In7 | Not used | Not used |
Outputs | ||
Out0 | Not used | Not used |
Out1 | Not used | Not used |
Out2 | Not used | Not used |
Out3 | Not used | Not used |
Out4 | Not used | Not used |
Out5 | Not used | Not used |
Out6 | Not used | Not used |
Out7 | Not used | Not used |
Logic Resources | ||
LUT0 | Count direction control | Determines
the direction of movement. Decodes the phase by comparing the
current QEP-A, QEP-B state to the previous state. The output sets
the position counter's mode appropriately.
|
LUT1 | Count enable control | Enables the
position counter to increment, or decrement, by one. This occurs
when both of these conditions are met:
|
LUT2 | QEP reset generation | Resets the
position counter when either of these conditions are met:
|
FSM0 | QCLK state machine | This FSM
has two functions:
|
FSM1 | Error detection | Compares the previous QEP-A/B state with the current state. If both signals changed at the same time, then the internal ERROR signal is forced high. As designed, the rising-edge of ERROR will trigger the HLC to send an interrupt with Tag 11. |
FSM2 | Not used | Not used |
CNT0 | Position counter | If enabled
(QCLK is 1) increment or decrement by one on each CLB clock cycle.
The position counter's maximum position (MAXPOS) is specified by the
following:
|
CNT1 | Not used | Not used |
CNT2 | Not used | Not used |
High Level Controller | ||
HLC | Event 0: Error detected. | Sent an error interrupt to the CPU with Tag 11. |
Event 3: Counter capture | Responds to the QEP-I rising edge by copying the current position counter to the FIFO. The HLC then interrupts the CPU and Tag 5 is set. |