5 Replies Latest reply on Dec 2, 2011 9:17 AM by anand.srinivasan.asokan

    Maximum size of DMA Buffer

    savouret.rodolphe

      Hi,

         

      What's the maximum size of DMA Buffer on the Cypress FX3 ?

      I've do some tryies :

      - 256 Buffer of 1024 B (256 kB)

      - 16 Buffer of 16 kB (256 kB)

      But when i want to take more size, the device does not work.

         

      That's possible ? how ?

      I'm interested about 512 kB or 1 MB (1024 kB - 1048576 Bytes).

         

       

         

      Regards,

         

      Rodolphe

        • 1. Re: Maximum size of DMA Buffer
          anand.srinivasan.asokan

          Hi,

             

          The system memory is 512kB, the system memory contains the firmware, DMA buffer, DMA descriptor and cache (page 24 of programmer's manual).

             

          The API user guide specifies 64kB as the recommended buffer size (page 57 of FX3 API user guide)

             

          Regards,

             

          Anand

          • 2. Re: Maximum size of DMA Buffer
            savouret.rodolphe

            Hi Anand,

               

             

               

            Thanks for your answer, but when using 64KB buffer, it is impossible to make some transferts. What's the problem ?

               

            (I take 4 buffer of 64 KB)

               

             

               

            I think using 16Kb DMA size is the better way, according with the maximum burst size, isnt it ?

               

             

               

            Another Questions :

               

            2. Using CY_U3P_DMA_MODE_BUFFER is faster than CY_U3P_DMA_MODE_BYTE ?

               

            3. During my benchmarks, i saw that some packets were transfered up to 325 MB/s, and some others at less than 150 MB/s, with an average of 250 MB/s without failures transferts. Do you know why ? And how I can stabilize the bandwith in the better and the faster way?

            • 3. Re: Maximum size of DMA Buffer
              anand.srinivasan.asokan

              When you say transfer is impossible are you not able to use the endpoint at all or few transfers of failing?

                 

              Transfer speed is kind of subjective it can't really be commented upon. It is just a method as to whether you want your end application to wait for a particular byte count or buffer count before it transfers the data.

                 

              When you say speed varies, do you mean there are INs and the device NAKs sometimes (leading to bandwidth reduction) or there are INs sent at varying rate?

                 

              Regards,

                 

              Anand

              • 4. Re: Maximum size of DMA Buffer
                savouret.rodolphe

                Transfers are impossible because there are an error :
                - CyU3PDmaChannelConfig_t uint16_t size;
                - The size is stocked on 16 bit, so : 2^16 = 65536
                There are 65536 values, 0 to 65535. (unsigned int,16 bit)
                It's impossible to set 64Kb.

                   

                Speed varying by transfering INs and OUTs at varying rate, without any failure transfert.

                   

                 

                   

                Regars,

                   

                Rodolphe

                • 5. Re: Maximum size of DMA Buffer
                  anand.srinivasan.asokan

                  The maximum size is 64k - 16. Sorry my bad with 64k.

                     

                  Windows 8 will support USB3 natively and the host controllers are also maturing. Given that the varying rate is due to host not sending IN requests I don't think there is much that can be done at this point of time.

                     

                  Regards,

                     

                  Anand