Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Large Data

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Large Data
Moderator:
RSKV

Post Reply
Follow this topic



Large Data

ABM posted on 17 Feb 2013 2:44 PM PST
Member
9 Forum Posts

 

HI,

      I am working on transferring video data to the USB host using fx2lp development kit. Can you help me with this. My camera is 320x240 so my buffer size would be 76800. Even on my firware code if i make a loop 76800, windows doesn't recognize the drivers. CyConsole download the hex file and but doesn't recognize the drivers.

 

i am doing this in my code

WORD i,j;

WORD *Destination = (WORD *) (&EP6FIFOBUF);

for(j=0;j<150;j++)

{

      for(i=0;i<512;i++)

     {

            *Destination++ = 1;

      }

     EP6BCH = MSB(count);

     SYNCDELAY;

      EP6BCL = LSB(count);

       SYNCDELAY;   

}

 

Please let me know how I can do this. 

 

Regards,

ABM




Re: Large Data

RSKV posted on 17 Feb 2013 06:55 PM PST
Cypress Employee
851 Forum Posts

Hi,

Did you look at the CATC trace to see what is going wrong with the enumeration.

Or did you check the enumeration process by commenting out the piece of code that you pasted here. Is it successful after that.?

Please attach your project here, if possible.

Thanks,

Sai Krishna.

 



Re: Large Data

ABM posted on 18 Feb 2013 06:55 AM PST
Member
9 Forum Posts

 Hi RSKV,

                  Thanks for your reply. I troubleshoot further and found the problem

WORD *Destination = (WORD *) (&EP6FIFOBUF);

 

The above line has the problem. If i don't use the above line and assign values directly to EP6FIFOBUF then the code works but it doesn't work when i try to cast EP6FIFOBUF to WORD. 

What I am saying is that the following code works

void TD_Poll(void)              // Called repeatedly while the device is idle

{

       WORD i,j;

      WORD count;

if(!(EP2468STAT & bmEP6FULL))

{  // check EP6 FULL(busy) bit in EP2468STAT (SFR), core set's this bit when FIFO is full

   // loop EP2OUT buffer data to EP6IN

count = 0;

for (i=0;i<150;i++)

       {

                for (j=0;j<512;j++)

              {

                            EP6FIFOBUF[j] = j;

               }

    EP6BCH = 0x02;

                 EP6BCL = 0x00;

   count++;

  }

}  

 

But The above approach has two problems.

1. I want to send 16 bits of data. Since EP6FIFOBUF is an array of BYTE so I can't send it 16 bytes with it. 

2. I looked in the example of CyStream where there second loop was 1024 bytes instead of 512 bytes. I rather send packet of 1024 bytes but when i do that in my host program I start to get garbage value after 512 bytes. Can you explain why it is happening? Will there be any speed advantage by sending 1024 bytes instead of 512 bytes?

 

Thanks for your support.

 

Regards,

Abhishek Madaan

 

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20