|
Hello,
TCExpire is like a flag/RDY signal, which when selected, is set when the GPIFTCB[3:0] register becomes zero. For every transfer of 1 Byte (in case of 8bit data bus)/ 2 Bytes (in case of 16bit data bus), GPIFTCB[3:0] is decremented. TCExpire option can be selected or de-selected in the GPIF Designer, as you design your GPIF waveforms. There is no need to access that in the firmware. Following is a briefing regarding the TCExpire, which I believe you already know, but I am repeating it just in case for clarification:
In normal operation, oncce a GPIF transfer is triggered, it does not terminate until the Transaction Count (TC) has expired. The GPIF engine checks the state of the TC only when in IDLE state. While designing a GPIF waveform, you must have the waveform pass through an IDLE state in order for the GPIF to check the TC and finally terminate when TC has expired.
GPIF does allow you to save time and avoid going through the IDLE state by using the ‘Transaction Count Expired’ (TCxpire) signal. This TCxpire replaces RDY5, if GPIFREADYCFG.5 = 1. This is so as to enable reading the status of the transaction count in a DP (decision point) state. The EZ-USB sets the transaction-count expiration flag to ‘1’ when the transaction count expires. This feature allows the Transaction Counter to be used without passing through the Idle State after each transaction.
Thus, once TCExpire flag is selected using GPIF designer. Once waveforms are designed and imported, there is no need to worry about TCExpire anymore. As to change the count, you just need to change the no: of bytes to be transferred in GPIFTCB[3:0] registers and then trigger the GPIF transaction.
Regards,
Gayathri
|