6 Replies Latest reply on Mar 20, 2012 12:05 AM by prajithc_

    firmware problem

      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;          




        EP1INCFG = 0x00;






        EP2CFG = 0xA2;




        EP4CFG = 0x00;


        EP6CFG = 0x00;




        EP8CFG = 0x00;




        // reset all FIFOs


        FIFORESET = 0x80;      


        SYNCDELAY;                    // see TRM section 15.14


        FIFORESET = 0x02;     




        FIFORESET = 0x00;   


                                                 // deactivate NAK-ALL




        EP2FIFOCFG = 0x11;       




        EP2FIFOBCH = 0x10;




        EP2FIFOBCL = 0x00; 






        PINFLAGSAB = 0x00;      




        PINFLAGSCD = 0x00;      






        EP2BCL = 0x80;                




        EP2BCL = 0x80;






        Rwuen = TRUE;                 // Enable remote-wakeup



        • 1. Re: firmware problem

          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. 

          • 2. Re: firmware problem





            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.







            • 3. Re: firmware problem

               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

              • 4. Re: firmware problem



                      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)





                • 5. Re: firmware problem



                        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.

                  • 6. Re: firmware problem



                           I apologize for the above wrong post.