Cypress USB FX2 Bulkloop sample application closes itself!.

Embedded computer systems topics

Cypress USB FX2 Bulkloop sample application closes itself!.

Postby ja.......@.mail.com » Thu Dec 22, 2005 5:15 pm

Setup:
Cypress EZ-USB FX2 Dev Board - CY3681
Firmware - Sample Cypress "bulkloop" firmware supplied
Application - Sample Cypress 'bulkloop" applicaiton supplied
Drivers - Supplied CyUSB driver for the bulkloop utility

Sending data from PC to EP4OUT and looping it back in through EP8IN.
Both EP4OUT and EP8IN are the default sizes. (As it is in the sample).

Problem:
Everything works fine except for the fact that, after receiving the
first 1024 bytes looped back, the program simply closes itself! Yes, I
am arm-ing EP8 and re-arm-ing EP4 with 0x80. The transfer size is set
at 1 byte and I'm looping a single byte in each transfer.

Has anyone had this problem before? The firmware seems to be running
fine, so I believe the problem has to be in the sample application.
I've made a case with Cypress, and it's been two weeks and they havent
replied yet.

I need help!

-Jim
ja.......@.mail.com
 

Re: Cypress USB FX2 Bulkloop sample application closes itsel

Postby Nappy » Fri Dec 23, 2005 1:15 am

set the transfer size to 512 or a multiple thereof. Or 64 if you are in
USB1.1

Then just send 1 byte at a time. In fact, if you check the transfer size it
probably isn't 1 after you set it.
"ja.......@.mail.com" <jasimpson@gmail.com> wrote in message
news:1135271360.648331.298780@z14g2000cwz.googlegroups.com...
Setup:
Cypress EZ-USB FX2 Dev Board - CY3681
Firmware - Sample Cypress "bulkloop" firmware supplied
Application - Sample Cypress 'bulkloop" applicaiton supplied
Drivers - Supplied CyUSB driver for the bulkloop utility

Sending data from PC to EP4OUT and looping it back in through EP8IN.
Both EP4OUT and EP8IN are the default sizes. (As it is in the sample).

Problem:
Everything works fine except for the fact that, after receiving the
first 1024 bytes looped back, the program simply closes itself! Yes, I
am arm-ing EP8 and re-arm-ing EP4 with 0x80. The transfer size is set
at 1 byte and I'm looping a single byte in each transfer.

Has anyone had this problem before? The firmware seems to be running
fine, so I believe the problem has to be in the sample application.
I've made a case with Cypress, and it's been two weeks and they havent
replied yet.

I need help!

-Jim
Nappy
 

Re: Cypress USB FX2 Bulkloop sample application closes itsel

Postby ja.......@.mail.com » Fri Dec 23, 2005 9:15 am

I did!

I tried a transfer size of 512, and the program closes itself after
receiving the first two 512 packets!! I tried 1024 too and it closes
after receiving that 1024 bytes!
I'm using USB 2.0 too.

Has anyone tried building an application built up from the bulkloop
application sample?

Thanks again,

-Jim
ja.......@.mail.com
 

Re: Cypress USB FX2 Bulkloop sample application closes itsel

Postby Nappy » Sat Dec 24, 2005 1:15 am

"ja.......@.mail.com" <jasimpson@gmail.com> wrote in message
news:1135320925.077281.214150@g44g2000cwa.googlegroups.com...
I did!

I tried a transfer size of 512, and the program closes itself after
receiving the first two 512 packets!! I tried 1024 too and it closes
after receiving that 1024 bytes!

Ok.. well the transfer size should never be 1. The bytesToSend can be one in
your Endpt->Write(*) call.
Does it crash in the Endpoint call or after?



Has anyone tried building an application built up from the bulkloop
application sample?

I have an entire app which I wrote looking at their samples.



Thanks again,

-Jim
Nappy
 

Re: Cypress USB FX2 Bulkloop sample application closes itsel

Postby Bill Davy » Wed Dec 28, 2005 10:01 am

"Nappy" <noemail@all.com> wrote in message
news:CsZqf.44320$tV6.22585@newssvr27.news.prodigy.net...
"ja.......@.mail.com" <jasimpson@gmail.com> wrote in message
news:1135320925.077281.214150@g44g2000cwa.googlegroups.com...
I did!

I tried a transfer size of 512, and the program closes itself after
receiving the first two 512 packets!! I tried 1024 too and it closes
after receiving that 1024 bytes!

Ok.. well the transfer size should never be 1. The bytesToSend can be one
in
your Endpt->Write(*) call.
Does it crash in the Endpoint call or after?




Has anyone tried building an application built up from the bulkloop
application sample?

I have an entire app which I wrote looking at their samples.




Thanks again,

-Jim




I had terrible trouble setting up the configuration registers especialy as
we were externally clocked. My code has comments like "Make sure of an
AUTOOUT 0->1 transition, if AUTOUT is used, even though REVCTL.1 is true
now" and
"http://tightlink.cypress.com/TLService/XKBase?op=dispart&cid=30020&catId=293727682&artId=310860771
says do this after".

Now it is all working, I would not dare touch it. House of cards.

Rgds,
Bill

PS And of course there is the faster copy loop:

if ( Count )
{
//
// Use Tom Duff's (May 7, 1984) method for fast copying.
// Count > 0 assumed
// As the maximum bulk buffer size is 512 (even isochronous is only
1024),
// we can count cycles in a byte.
//
BYTE n = (Count + 7) / 8;

switch (Count % 8)
{
case 0: do { EXTAUTODAT2 = EXTAUTODAT1;
case 7: EXTAUTODAT2 = EXTAUTODAT1;
case 6: EXTAUTODAT2 = EXTAUTODAT1;
case 5: EXTAUTODAT2 = EXTAUTODAT1;
case 4: EXTAUTODAT2 = EXTAUTODAT1;
case 3: EXTAUTODAT2 = EXTAUTODAT1;
case 2: EXTAUTODAT2 = EXTAUTODAT1;
case 1: EXTAUTODAT2 = EXTAUTODAT1;
} while (--n > 0);
}
}
Bill Davy
 


Return to Embedded System

Who is online

Users browsing this forum: No registered users and 0 guests

cron