4 Replies Latest reply on Sep 24, 2013 2:49 AM by userc_24743

    about fx3 ZLP


       Hi,problems met when i used fpga to send data to pc through fx3,


      each buffer of fx3 socket was set 16kB and each pc bluk buffer set 64kB,


      I sent 1kB data and a ZLP  once to fx3 ,the timing is shown in the follow.


      I receive nothing through bus hound tool at the first time,but two packets received at the second time,one is 2kB,another is 0 B


      So,i want to know :


      1.when i sent once from fpga to fx3,did  the fx3 receive the ZLP?why How can i know?


      2.if fx3 received ZLP,why the pc received nothing at the first time when  i sent 1kB+ZLP


      3.if not,why the pc received 0 length packet at the second time when i sent 1kB+ZLP


      4.when and how to use ZLP?

        • 1. Re: about fx3 ZLP




          Please share more details on the buffers that you created. How many buffers are you using. I can understand that the buffer size as 16KB.     



          Actually, we have reference code that sends a full packet followed by a short packet and also for sending a full packet followed by a ZLP. You can find this code as attachment to the following application note:     



          AN65974 - Designing with the EZ-USB® FX3™ Slave FIFO Interface     



          The code attached to the above application note will be a good starting point for your project development.     



          Also please let me know the reason behind sending a ZLP after 1KB data.     






          Sai Krishna.     


          • 2. Re: about fx3 ZLP
                    1.I used 4 buffers for each address line,and the buffer size is 16KB, pc bluk buffer size is 64KB 2.I want to send 1KB data to pc,but data could not be received on the pc side when i sent 1kB , the PKTEND# signal asserted with the last word of which, so i sent 1KB +ZLP to see whether it can work.   
            • 3. Re: about fx3 ZLP
                      Does the size of buffer must be set as the size of full packet?   
              • 4. Re: about fx3 ZLP



                If you want to just send 1KB of data then assert both PKTEND# and SLWR# simultaneously. Then it should commit just 1KB of data (short packet) to USB. 


                Please try this and let me know the result.


                You can also do this by changing the buffer size to 1KB. But it will reduce the data rate if you are doing bulk data transfers.




                Sai Krishna.

                • 5. Re: about fx3 ZLP

                  After i did it , Pc received nothing  when buffer size is 16kB, but received 1kB when buffer size is 1KB.


                  The same is when i want to send nkB (smaller than 16KB), buffer size must be set as 1KB.


                  I  want to know when to use ZLP.


                  If the buffer size is 16KB, what ' s the size of data to send when ZLP must be asserted?