cancel
Showing results for 
Search instead for 
Did you mean: 

USB Low-Full-High Speed Peripherals

Anonymous
Not applicable

 Hi 

   

i'm using FX2LP in ISO & GPIF

   

i config EP2 as ISO OUT , AUTOOUT = 1; EP6 as ISO IN, AUTOIN = 1;

   

i want to test is there any packet missing during ISO IN/OUT and GPIF FIFO read/write , but the ez-usb cpu can't cap isoerr interrupt in this configuration, and the host aways says the iso transfer is successful.

   

what do i need to do ?

   

thanks !

0 Likes
11 Replies
Anonymous
Not applicable

 Hi,

   

If you are interested in knowing whether data is missing at the GPIF interface itself, then you can probe for FULL flag of EP6 to find whether you are loosing data when GPIF is reading data.

   

Thanks,

   

Sai Krishna.

0 Likes
Anonymous
Not applicable

thanks !

   

if i don't use gpif or slave fifo , and rearm an endpoint by writting EPxBCL for the ISO OUT endpoint .

   

is it the only way i can find if there any packet lost during ISO OUT , to cap the ISOERR interrupt for this endpoint?

   

thanks!

0 Likes
Anonymous
Not applicable

 Hi,

   

 

   

Can you please detail your application? If you are particular about data integrity, ISOC EP will not be a good choice for your applciation. As per USB protocol, ISOCHRONOUS transfers are guarantee bandwidth and not data integrity. It is usually chosen for real time applciation like video/ audio.

   

 

   

Regards

0 Likes
Anonymous
Not applicable

 hi 

   

i'm using the EZ-USB as a data aquisition. it aquisition data from outside logic, transfer them to the host (PC), then the host processes the data, and the EZ-USB transfers them to the outside logic at last. it's a bandwidth critical using. the sample rate is 10M Byte per sec, so i have to using the ISO transfers .

   

i configed my EZ-USB as follows:  EP2 ISOOUT EP, 2 x 1024 buffers , EP6 ISOIN EP , 2 x 1024 buffers ,with GPIF AUTOOUT/AUTOIN.

   

now i want to test the max bandwidth of my design. since the ISO transfer doesn't return NAK or ACK , when i use XferData in my PC application , it always returns successfully .so i don't know whether the data packets has transfer successfully or missing , as a result i don't know whether i have reached the max bandwidth of my design.

0 Likes
Anonymous
Not applicable

 Hi,

   

 

   

How about using Interrupt endpoints? In that the data integrity and bandwitdh are both assured.

   

 

   

Regards

0 Likes
Anonymous
Not applicable

hi:

   

thanks!

   

but i want to find a way to know the max bandwidth of my ISO transfer. and try to reach it . is there any way to test it ?

0 Likes
Anonymous
Not applicable

 Hi,

   

 

   

As per USB 2.0 spec, maximum allowed for ISOC ttransfers: 3 packets per microframe; and maximum packet size is 1024 bytes. Thus, maximum possible bandwidth with ISOC transfers is 24 MBps. Please note, it is not possible to get data integrity with ISOC.

   

 

   

Regards

0 Likes
Anonymous
Not applicable

Hi!

   

I have configured the Ep2 like this:(showing as follows)

   

And the Cpress USB console have detected a Ep2 ISO pipe, but the click on the button ISO trans, got a "ISO transfer failed"

   

when i configured Ep2 as a bulk endpoint , everthing is ok.

   

ps: my design is like this:PC<——Slave FIFO<——FPGA

   

Waiting for reply urgently, thank you!

   

=================================================================

   

 

   

void TD_Init(void)              // Called once at startup
{
 // set the CPU clock to 48MHz
 CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1) ;
 
 SYNCDELAY;
 IFCONFIG = 0x03;//Externern CLK;;==== Slave_FIFO Mode ======
 //IFCONFIG = 0xe3;//Internel CLK ,48Mhz,IFCLKOE=1;

   

 SYNCDELAY;
 REVCTL = 0x03;
 SYNCDELAY;

   

 
 EP2AUTOINLENH=0x02;
 SYNCDELAY;
 EP2AUTOINLENL=0x00; //512 Bytes
 SYNCDELAY;

   

 PINFLAGSAB = 0x0C;//FLAGA--Ep2 Full flag
 SYNCDELAY;
 PINFLAGSCD = 0x08;//FLAGC--Ep2 Empty flag
 SYNCDELAY;
 
 EP4CFG = 0x02; //clear the valid bits on ep4 and ep8 and ep2
 SYNCDELAY;
 EP8CFG = 0x02;
 SYNCDELAY;
 EP6CFG = 0x02;
 SYNCDELAY;
 EP2CFG = 0xD0; // IN, 512-bytes, 4x, ISO
 SYNCDELAY;
 EP2ISOINPKTS = 0x03;//每帧3个包
 SYNCDELAY;

   

 FIFORESET = 0x80; // activate NAK-ALL to avoid race conditions
 SYNCDELAY;    // see TRM section 15.14
 FIFORESET = 0x02; // reset, FIFO 2
 SYNCDELAY;    //
 FIFORESET = 0x04; // reset, FIFO 4
 SYNCDELAY;    //
 FIFORESET = 0x06; // reset, FIFO 6
 SYNCDELAY;    //
 FIFORESET = 0x08; // reset, FIFO 8
 SYNCDELAY;    //
 FIFORESET = 0x00; // deactivate NAK-ALL

   

 // handle the case where we were already in AUTO mode...
 // ...for example: back to back firmware downloads...
 SYNCDELAY; //
 EP2FIFOCFG = 0x00; // AUTOOUT=0, WORDWIDE=0
 // core needs to see AUTOOUT=0 to AUTOOUT=1 switch to arm endp's
 SYNCDELAY;    //
 EP2FIFOCFG = 0x09; // AUTOIN=1, WORDWIDE=1
 SYNCDELAY;    //
}

0 Likes
Anonymous
Not applicable

 Hi ,

   

 

   

How many bytes that you are requesting from the Control Centre? What is the max packet size of the endpoint in the endpoint descriptor? 

   

If possible please share the entire project.(for both BULK and ISOC)

   

Regards,

   

Vikas.

0 Likes
Anonymous
Not applicable

 Hi!

   

Thanks for your reply!

   

Luckly, yesterday, I have found a solution to perform a ISO trans.  The point is that I must set

   

EP2ISOINPKTS = 0x01;//每微帧1个包 

   

and the length to to be transfered must be eight times of the packet size.

   

But , the new problem is how I can make the ISO trans persistent???? 

   

I have use the CyApi XferData(PCHAR buf, LONG &len, PUCHAR pktInfos = NULL) to perform the ISO trans like this:

   

 

   

which means the trans must stop to start a new trans when the data transfered reach the length of LONG &len.

   

But what if I do NOT want to stop the trans? For example a viedio trans design??? 

   

Waiting for your reply. Thank you!

   

 

   

//=======================================================================================

   

UINT XferRecieve( LPVOID params )

   

{

   

.........

   

for (;dlg->bLooping;) {

   

success = dlg->InEndpt->XferData(dlg->indata, inlen);

   

if (success) 

   

{

   

dlg->nSuccess++;

   

   

else 

   

{

   

dlg->nFailure++;

   

}

   

 

   

::PostMessage(dlg->m_hWnd,MSG_PKT_CNT,

   

(WPARAM)dlg->nSuccess,(LPARAM)dlg->nFailure);

   

if ((!success) && stopOnError) dlg->bLooping = false;

   

   

......

   

}

   

 

   


0 Likes
Anonymous
Not applicable

 Hi,

   

 

   

The API Xferdata() returns when it receives the number of bytes that it has requested or after time out.To wait for infinite time set the timeout to 0xFFFFFFFF, then xferdata waits for infinte time. But if it receives the number of bytes that it has requested for , then it will return.

   

For the applications like video streaming, you have to call the API xferdata() repeatedly in a thread or in a while loop.

   

For better bandwidth we recommend to use the asynchronous transfers by using BeginDataXfer( ). Please refer the streamer example example.(path : C:\Cypress\Cypress Suite USB 3.4.7\CyUSB.NET\examples after installing Cy3684 DVK http://www.cypress.com/?rID=14321).

   

 

   

Regards,

   

Vikas.

0 Likes