Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx

Ads

Discussion Groups

Discussion Groups | Comp.Arch.Embedded | Cypress USB FX2 Bulkloop sample application closes itself!. Solution?

There are 5 messages in this thread.

You are currently looking at messages 0 to 5.

Cypress USB FX2 Bulkloop sample application closes itself!. Solution? - ja.......@.mail.com - 12:09 22-12-05

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




Re: Cypress USB FX2 Bulkloop sample application closes itself!. Solution? - Nappy - 19:36 22-12-05

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" <j...@gmail.com> wrote in message
news:1...@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
>



Re: Cypress USB FX2 Bulkloop sample application closes itself!. Solution? - ja.......@.mail.com - 01:55 23-12-05

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


Re: Cypress USB FX2 Bulkloop sample application closes itself!. Solution? - Nappy - 15:52 23-12-05

"ja.......@.mail.com" <j...@gmail.com> wrote in message
news:1...@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
>



Re: Cypress USB FX2 Bulkloop sample application closes itself!. Solution? - Bill Davy - 05:01 28-12-05

"Nappy" <n...@all.com> wrote in message 
news:CsZqf.44320$t...@newssvr27.news.prodigy.net...
>
> "ja.......@.mail.com" <j...@gmail.com> wrote in message
> news:1...@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);
     }
    }