3 Replies Latest reply on May 15, 2019 4:46 AM by SrinathS_16

    CyUSB.dll - x64 - Matlab problem

    sestc_4109851

      Hi,

      i am using the FX3 SuperSpeed Explorer Kit, Windows 7 64 bit, Matlab 2018a.

       

      If i try to connect Matlab to the Board via the CyUSB.dll, it results in error:

      System.OverflowException: Arithmetic operation resulted in an overflow.

       

      The code i am running is simple, the second line causes the error:

       

      cyusb_lib = NET.addAssembly('E:\Projekte\Cypress\CyUSB.dll');

      devList = CyUSB.USBDeviceList(CyUSB.CyConst.DEVICES_CYUSB);

       

      I read a lot about problems with x64 and the CyUSB.dll, but theres nothing that is working for me.

      I use the latest drivers and CyUSB.dll version 3.4.7

       

       

      I have to add, that the code can run without error in like 1 out of 10-15 trials, but then matlab crashes after i try to run:

      myUSBDevice = devList.Item(0);

      which is also a known issue to many other users.

       

      Thank you for your help

      Sebastian

       

       

      Down below i post the full error-log from Microsoft .NET Framework popup (why does it only say Win32 all the time, not Win64?):

       

       

       

      ************** Exception Text **************

      System.OverflowException: Arithmetic operation resulted in an overflow.

         at CyUSB.PInvoke.CountDevices(Guid g)

         at CyUSB.USBDevice.get_DeviceCount()

         at CyUSB.USBDeviceList.Add()

         at CyUSB.USBDeviceList.PnP_Event_Handler(IntPtr pnpEvent, IntPtr hRemovedDevice)

         at CyUSB.MsgForm.WndProc(Message& m)

         at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

       

       

      ************** Loaded Assemblies **************

      mscorlib

          Assembly Version: 4.0.0.0

          Win32 Version: 4.7.3062.0 built by: NET472REL1

          CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

      ----------------------------------------

      dotnetcli

          Assembly Version: 1.0.6611.7500

          Win32 Version:

          CodeBase: file:///E:/Programme/Matlab2018/bin/win64/dotnetcli.DLL

      ----------------------------------------

      System

          Assembly Version: 4.0.0.0

          Win32 Version: 4.7.3062.0 built by: NET472REL1

          CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

      ----------------------------------------

      System.Configuration

          Assembly Version: 4.0.0.0

          Win32 Version: 4.7.3062.0 built by: NET472REL1

          CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

      ----------------------------------------

      System.Xml

          Assembly Version: 4.0.0.0

          Win32 Version: 4.7.3062.0 built by: NET472REL1

          CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

      ----------------------------------------

      CyUSB

          Assembly Version: 3.4.7.0

          Win32 Version: 3.4.7.0

          CodeBase: file:///E:/Projekte/Cypress/CyUSB.dll

      ----------------------------------------

      System.Windows.Forms

          Assembly Version: 4.0.0.0

          Win32 Version: 4.7.3062.0 built by: NET472REL1

          CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

      ----------------------------------------

      System.Drawing

          Assembly Version: 4.0.0.0

          Win32 Version: 4.7.3062.0 built by: NET472REL1

          CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

      ----------------------------------------

      Accessibility

          Assembly Version: 4.0.0.0

          Win32 Version: 4.7.3062.0 built by: NET472REL1

          CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

      ----------------------------------------