Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

USB low-full-high speed peripherals Forum Discussions

Anonymous
Not applicable

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

   

}

0 Likes
1 Solution
Anonymous
Not applicable

 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

View solution in original post

0 Likes
6 Replies
Anonymous
Not applicable

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. 

0 Likes
Anonymous
Not applicable

 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

0 Likes
Anonymous
Not applicable

 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

0 Likes
Anonymous
Not applicable

 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

0 Likes
Anonymous
Not applicable

 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.

0 Likes
Anonymous
Not applicable

 Hi,

   

       I apologize for the above wrong post.

   

Thanks

   

Prajith

0 Likes