4 Replies Latest reply on Oct 4, 2018 8:43 AM by dkalbertson_1894036

    CyUSB.dll in FX3

    jayasimha.mandya

      Hi,

         

       

         

      We use the CyUSB.dll version 3.4.7.0 for one of our applications. Everything is fine but for the thread safety. Hence we were thinking of trying the new driver released by Cypress, the FX3 suite. But as it turns out, the CyUSB.dll version available in this is 1.2.2.0. Are we missing something here? Kindly let us know if this is indeed the newer version. Also, let us know about thread safe version of CyUSB.dll. Thanks.. :)

         

       

         

      Regards,

         

      Jay

        • 1. Re: CyUSB.dll in FX3
          vikasv_56

           Hi 

             

           

             

          Please refer the KBA in the link http://www.cypress.com/?id=4&rID=97631 .

             

           

             

          Regards,

             

          Vikas.

          • 2. Re: CyUSB.dll in FX3
            jayasimha.mandya

            Hi Vikas,

               

             

               

            Thanks for the reply. The link about migration that you have suggested just mentions about the "New CyUSB.dll" and does not mention anything about the version number. It is just the version number that leads us to the confusion.

               

            So would you say CyUSB.dll version 1.2.2.0 is the latest version of the dll? Could you also kindly comment on the thread safety aspect of this new dll, nothing is mentioned about this in the documentation. Thanks.

               

             

               

            Regards,

               

            Jay

            • 3. Re: CyUSB.dll in FX3
              mjones_1522096

              Jay,

                 

              Did this get resolved? I am getting crashes in a multi-threaded application, that seem to be related to calls to GetOverlappedResult.

                 

              The problem is, I am using 4 EP, and without threads or with lock() in the C# application, the performance is really bad. So I need them.

                 

              Mike

              • 4. Re: CyUSB.dll in FX3
                dkalbertson_1894036

                I realize this post is old. However, for the sake of others who stumble upon this post, I had the same issue. There are several issues here. For one, this causes all kinds of issues with installers. The installers will refuse to overwrite the old CyUSB.dll because the new DLL has a lower version than the "old" one. I had to go in a rename the whole CYUSB.dll and re-export it with a different name so that the installer would think it's a different dll (therefore, removing the old one and installing the new one). Secondly, there is a SERIOUS regression in the CyUSBEndPoint.xferData implementation. All three of the managed buffers used are not pinned properly. When the GC moves those managed buffers during async operations, it corrupts the managed heap. I just spent the last week tracking down that bug. I've decompiled the 1.2.2 version and the 3.4.7 version and can verify that all buffers were properly pinned in the 3.47 version and not in the 1.2.2 version. I ended up creating an Extension method that pins all of the buffers for the duration of the xferData method.