Cypress USB FX2 Bulkloop sample application closes itself!.
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Cypress USB FX2 Bulkloop sample application closes itself!.

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
ja.......@.mail.com
Guest





Posted: Thu Dec 22, 2005 5:15 pm    Post subject: Cypress USB FX2 Bulkloop sample application closes itself!. Reply with quote

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
Back to top
Nappy
Guest





Posted: Fri Dec 23, 2005 1:15 am    Post subject: Re: Cypress USB FX2 Bulkloop sample application closes itsel Reply with quote

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...
Quote:
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
Back to top
ja.......@.mail.com
Guest





Posted: Fri Dec 23, 2005 9:15 am    Post subject: Re: Cypress USB FX2 Bulkloop sample application closes itsel Reply with quote

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
Back to top
Nappy
Guest





Posted: Sat Dec 24, 2005 1:15 am    Post subject: Re: Cypress USB FX2 Bulkloop sample application closes itsel Reply with quote

"ja.......@.mail.com" <jasimpson@gmail.com> wrote in message
news:1135320925.077281.214150@g44g2000cwa.googlegroups.com...
Quote:
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?



Quote:

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.



Quote:

Thanks again,

-Jim
Back to top
Bill Davy
Guest





Posted: Wed Dec 28, 2005 10:01 am    Post subject: Re: Cypress USB FX2 Bulkloop sample application closes itsel Reply with quote

"Nappy" <noemail@all.com> wrote in message
news:CsZqf.44320$tV6.22585@newssvr27.news.prodigy.net...
Quote:

"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);
}
}
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB