Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > firmware problem

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



firmware problem
Moderator:
RSKV

Post Reply
Follow this topic



firmware problem

wayne_likehome posted on 18 Mar 2012 1:11 AM PST
Member
7 Forum Posts

i edit the bulkloop firmware,and edit the td_init() function as follows,but when i use cyconsole to see the pipe info,it shows 

 

"pipe: 0        type:blk     endpoint : 1   out   maxpktsize:0x40

 pipe:1         type:blk     endpoint: 1     IN .................................

 pipe:2         type:blk      endpoint:2     OUT mxpktsize:0x200"

 

i just active ep2,but it seems that the result is not as i config.

 

does anywhere else need to be edited??????  

p.s . : the firmware before i edit, config the ep1in ep1out and ep2.

 

 void TD_Init(void)           

{

 

   CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1) ;

   IFCONFIG = 0xeb;            

  EP1OUTCFG = 0x00;          

  SYNCDELAY;

  EP1INCFG = 0x00;

  SYNCDELAY;                  

    

  EP2CFG = 0xA2;

  SYNCDELAY;                    

  EP4CFG = 0x00;

  EP6CFG = 0x00;

  SYNCDELAY;                    

  EP8CFG = 0x00;

SYNCDELAY; 

  // reset all FIFOs

  FIFORESET = 0x80;      

  SYNCDELAY;                    // see TRM section 15.14

  FIFORESET = 0x02;     

  SYNCDELAY;   

  FIFORESET = 0x00;   

                                           // deactivate NAK-ALL

  SYNCDELAY;     

  EP2FIFOCFG = 0x11;       

  SYNCDELAY;

  EP2FIFOBCH = 0x10;

  SYNCDELAY; 

  EP2FIFOBCL = 0x00; 

  

  SYNCDELAY;

  PINFLAGSAB = 0x00;      

  SYNCDELAY;              

  PINFLAGSCD = 0x00;      

  SYNCDELAY;              

  SYNCDELAY;                    

  EP2BCL = 0x80;                

  SYNCDELAY;                    

  EP2BCL = 0x80;

  SYNCDELAY;                    

 

  Rwuen = TRUE;                 // Enable remote-wakeup

}

 

 




Re: firmware problem

wayne_likehome posted on 18 Mar 2012 07:00 AM PST
Member
7 Forum Posts

it seems that the result of "getpipe" is depend on the content of dscr.a51.

but i`m still not sure if 68013 can  work well when one ep is configured as one way in td_init() but descriped as another different way in dscr.a51. 



Re: firmware problem

Gayathri posted on 18 Mar 2012 09:52 AM PST
Cypress Employee
428 Forum Posts

 Hi,

 

Yes, as you guessed the host takes information about the various pipes from the DSCR.a51. DSCR.a51 stores the various descriptors that will be sent to the host during enumeration. You need to update the DSCR.a51 with the appropriate endpoint descriptors depending on your application. You need to ensure that the configurationj being done in the FX2LP firmware and the descriptors match.

 

Secondly, the Endpoint configuration that you are choosing should be valid. It should be one among the 12 valid configiurations supported by FX2LP. You can find details about the valid Endpoint configurations in section 1.17 EZ USB endpoint Buffers of FX2LP TRM which you can find at http://www.cypress.com/?rID=38232. The EP2 only configuration is invalid.

 

Regards,

Gayathri

 



Re: firmware problem

wayne_likehome posted on 18 Mar 2012 05:57 PM PST
Member
7 Forum Posts

 thank you so much. ^_^

and there is another thing i`m not sure.

if i config ep2 as 1024x4.

the value of "maximun packet size" should be   400h or 1000h?????

 

----------------------------------------------------------------------------------------------------------------------------------------

Endpoint Descriptor

      db   DSCR_ENDPNT_LEN      ;; Descriptor length

      db   DSCR_ENDPNT         ;; Descriptor type

      db   01H               ;; Endpoint number, and direction

      db   ET_BULK            ;; Endpoint type

      db   40H               ;; Maximun packet size (LSB)

      db   00H               ;; Max packect size (MSB)

      db   00H               ;; Polling interval



Re: firmware problem

PRJI posted on 19 Mar 2012 10:30 PM PST
Cypress Employee
333 Forum Posts

 Hi,

      USB 2.0 spec supports only 512 byte max packet size for bulk endpoint. Following is the configuration for 512 x 4

      db   00H                  ;; Maximum packet size (LSB)

      db   02H                  ;; Maximum packet size (MSB)

Thanks

Prajith



Re: firmware problem

PRJI posted on 19 Mar 2012 02:16 AM PST
Cypress Employee
333 Forum Posts

 Hi,

      When you say EP4EF is always active how do you check it?Please take trace of USB INtransfer using a USB bus analyser r and upload it here so that we can have a look at it.



Re: firmware problem

PRJI posted on 20 Mar 2012 10:05 PM PST
Cypress Employee
333 Forum Posts

 Hi,

       I apologize for the above wrong post.

Thanks

Prajith






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