Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

EPXFIFOBCH/L Registers of FX2LP – KBA219002

Anonymous
Not applicable

EPXFIFOBCH/L Registers of FX2LP – KBA219002

Version: **

Translation - Japanese: FX2LPのEPXFIFOBCH/Lレジスタ – KBA219002 - Community Translated (JA)

Question:

What do the EPXFIFOBCH and EPXFIFOBCL registers contain and how can they be used?

Answer:

The EPXFIFOBCH and EPXFIFOBCL registers contain the number of bytes received from the interface domain. One way of using it is to commit a short packet, which is sent from the external master at the end of a long transfer. To do this, use the following code snippet in TD_Poll of the slave firmware:

if( (( EPXFIFOBCH<<8) | (EPXFIFOBCL)) < 0x200) //if the packet is short(here x is the IN endpoint which //receives data from external master)

{

                  SYNCDELAY;

                  EPXFIFOCFG = 0x00;                  //change from Auto mode to Manual mode

                  SYNCDELAY;

                  INPKTEND = 0x0X;                    //commit the short packet

                  SYNCDELAY;

                  EPXFIFOCFG = 0x0C;                  //back to Auto mode

                  SYNCDELAY;

}

Here, to commit the short packet the FIFO configuration is changed from Auto to Manual mode. Then, it is converted back to Auto mode if the master continues the long transfer.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎Mar 23, 2017 11:02 PM
Updated by:
Anonymous
 
Contributors