04-25-2011 06:42 PM
Hello,
I have an FTDI FT2232H mini module. When executing SPI_Init_Device the VI hangs up. I have to unplug the FT2232H module to get control of LabView again. Has anyone using the FT2232H, LabView, and the FTCSPI.DLL had this same problem?
I am using Labview 8.5 and version 2.0 of the FTCSPI.dll.
I have successfully gotten the following functions working in LabView using the Call Library Node Function and the FTCSPI.dll (ver2.0):
- SPI_Get_DLL_Version (returned value - 2.0)
- SPI_getHiSpeedDeviceNameLocIDChannel (returned values - Device Name: Dual RS232-HS A, Channel: A, LocID: 1329, HS Device Type: 01)
- SPI_OpenHiSpeedDevice (returned value - Handle: 0x8756CF0)
- SPI_GetHiSpeedDeviceType (returned value - FT2232H)
- SPI_Close_Device
Along with the FTCSPI DLL Application Note AN_111 I used the C++ example in the application note (AN_114 - Interfacing FT2232H Hi-Speed Devices to SPI BUS Application) as a guidline and have been successful up to the point i have to execute the SPI_InitDevice.
The function prototype is: uint32_t SPI_InitDevice(uint32_t Handle, uint32_t ClockDivisor);
I looked at the functions for the I2C and JTAG libraries and the dll.h files and they are exaclty the same for the SPI function.
I am passing in the Handle (0x8756CF0) that i recieved from the SPI_OpenHiSpeedDevice and a legal value for the ClockDivisor, but it just hangs.
Just wondering what i'm missing here?!?!
Any help would be greatly appreciated.
04-27-2011 11:36 AM
Hi whtrsh,
I have not worked with this specific device, but I don't see anything that stands out - your VI seems correct based on the function prototype. You mentioned that you are using a C++ example as a guide - have you been able to run that C++ code to confirm that the DLL's SPI_InitDevice function works outside of LabVIEW?
Morgan S
Applications Engineer
National Instruments
10-03-2013 09:23 AM
I have the same problem. Followed the function prototypes too. No idea. Did you figure it out?