- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Need your help here.
Right now my application is using End Point 2 with 512bytes as the buffer size for bulk transfer.
Once Cypress chip receives 512Bytes, bit 1 (EP2EF) of EP24FIFOFLGS is set to zero.
How to configure EndPoint2 to receive less than 512bytes and which register to poll for when EP2 is configured to receive less than 512Bytes.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Apologies for the delay in my response.
I'm sorry for missing that you are using an OUT endpoint. Please check section 9.3.7, Pg 115 in the EZ-USB TRM. In AUTO-OUT mode, data is always auto-committed in 512 or 1024-byte packets.
Foe checking the status, you can use flags. Please check section 15.5.3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please let me know which mode are you using for the transfers- Auto or Manual?
Regards,
Mallika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mallika,
I am using Auto mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mallika,
I looked at bit3-AUTOIN. It is mentioned as "This bit applies only to IN endpoints".
EP2 is used as bulk output endpoint in my application.
Setting AUTOIN bit and Configuring EP2AUTOINLEN to less than 512bytes (in my example value of 200 is used) is not working as expected. Below is the initialization code.
EP2FIFOCFG = 0x01; // allow core to see zero to one transition of auto out bit
SYNCDELAY;
EP2FIFOCFG = 0x11; // auto out mode, disable PKTEND zero length send, word ops
SYNCDELAY;
EP2_FifoSize = 200;
EP2FIFOCFG |= bmBIT3;
EP2AUTOINLENL = (BYTE)EP2_FifoSize;
EP2AUTOINLENH = (BYTE)(EP2_FifoSize >> 8);
SYNCDELAY;
To find out if packet is received, i am polling for bit1-EP2EF of EP24FIFOFLGS register.
if (!( EP24FIFOFLGS & 0x02 ))
{
// Buffer is full.
}
Using the USB control center for bulk transfer, i have to transfer data of 200 bytes 3 times for the above if condition to become true.
Can you please help me with all the register configurations for setting EP2 to receive less than 512 bytes data and which register to poll for to know if the bulk data is received.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mallika,
Can you please suggest on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Apologies for the delay in my response.
I'm sorry for missing that you are using an OUT endpoint. Please check section 9.3.7, Pg 115 in the EZ-USB TRM. In AUTO-OUT mode, data is always auto-committed in 512 or 1024-byte packets.
Foe checking the status, you can use flags. Please check section 15.5.3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mallika,
Thanks for the clarification.