Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > viewing integer values from vendor command

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



viewing integer values from vendor command
Moderator:
RSKV

Post Reply
Follow this topic



viewing integer values from vendor command

giginjose posted on 13 Sep 2012 7:32 AM PST
Top Contributor
36 Forum Posts

 Hi, 

I am working on Cy7C68013-A usb HS controller. I need to issue a vendor command, where I am expecting an integer count value (int final_count). The value of "final_count" can comfortably go beyond 255. But since EP0BUF[0] supports only a maximum value of 255 (8 bits), I am finding trouble to get any value beyond 255. 

Where can I assign my "final_count" variable, so that I can correctly read the integer value even if it crosses the 255 limit. 

I have my vendor command function as follows:

switch (SETUPDAT[1])

  {

case 0xAA:

EP0BUF[0] = final_count;

EP0BCH = 0;

EP0BCL = 1;

EP0CS |= bmHSNAK;

break;

}

In the above case, the EP0BUF[0] has a limit of 255, which will assign incorrect value from  my "final_count". The "final_count" value can go near to 2000. 

Please give me a solution, where I can read the value of "final_count" on issuing a vendor command ? 

Thank You




Re: viewing integer values from vendor command

aasi posted on 13 Sep 2012 06:10 PM PST
Cypress Employee
1090 Forum Posts

 Why not assign the MSB to EP0BUF[1] and output 2 bytes??






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