About Status Registers in FX2LP - KBA224252
Author: SananyaM_56 Version: **
Translation - Japanese: FX2LPのステータスレジスタについて- KBA224252 - Community Translated (JA)
How are the values in the endpoint status registers updated with the slave FIFO mode firmware of FX2LP?
This knowledge base article (KBA) lists the endpoint status registers of FX2LP and how their values are updated with firmware implementing slave FIFO mode. For more details on the registers, see the Technical Reference Manual (TRM) at <install directory>\ Cypress\USB\CY3684_EZ-USB_FX2LP_DVK\1.1\Documentation\EZ-USB(R) Technical Reference Manual.pdf. The KBA covers points that are not included in the TRM.
The following are the different endpoint registers associated with slave FIFO firmware (where x can be 2, 4, 6, or 8):
- EPxCS: Number of packets in the endpoint FIFO updated when data is transferred either in or out of the FX2LP for both Auto and Manual modes. Bits 2, 3 also indicate whether the FIFO is either Full or Empty.
- EPxBCH, EPxBCL: Number of bytes sent or received in the endpoint FIFO in each data transfer which is in control of the USB interface (maximum of 512 bytes for EP4, EP8, and 1024 bytes for EP2, EP6).
- EPxFIFOBCH, EPxFIFOBCL: Number of bytes committed to the slave FIFO interface which is then in the control of the slave FIFO interface. This value is automatically updated with the total bytes transferred out from the host or sent to the host when the endpoint FIFO is in Auto mode (maximum 4096 bytes).
- EPxFIFOFLGS: Bits 0-3 indicate the endpoint FIFO status before the data is committed to USB interface for IN transfer. The value is updated when data is committed to the slave FIFO interface for OUT transfer in Manual mode. In case of Auto mode, the status cannot be determined for IN transfer. FLAGA-FLAGD pins are configured using the PINFLAGSxx register and reflect the status of the endpoint FIFO as per this register.
- EP2468STAT: Indicates the Empty or Full status of all four endpoint FIFOs before the data is committed to the slave FIFO interface for OUT transfer. The value is updated when the data is committed to the USB interface for IN transfer in Manual mode. In case of Auto mode, the status cannot be distinguished for OUT transfer.
Figure 1 shows the various interfaces in FX2LP and data flow based on the mode of operation.
- bulk transfer
- firmware debug
- high speed
- in transfer
- manual mode
- out transfer
- slave fifo