LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FT4222.dll GPIO Write returns GPIO Write Not Supported

Solved!
Go to solution

I'm getting error when using GPIO Write Function from FT4222.dll.

I'm using FT4222.dll version 1.4.4.44

 

Calling function like this:

AndrazS_0-1644404460039.png

 

The prototype in datasheet is:

AndrazS_1-1644404494000.png

 

Function is always returning me error 1015 and I think this is "GPIO Write not supported"

AndrazS_2-1644404549770.png

 

AndrazS_3-1644404571404.png

 

Please help!

 

 

0 Kudos
Message 1 of 4
(1,112 Views)
Solution
Accepted by topic author AndrazS

The FTDI Application Node AN-329 explicitly states:

 

FT4222_GPIO_WRITE_NOT_SUPPORTED: Direction on this port is not writing direction

 

So you may have forgotten to configure the according port to be an output port before trying to call this function?

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(1,107 Views)

Hello actually this really helped! but cannot understand the situation...

 

When I configured port as INPUT and call function there wasn't error anymore, but when I reconfigured it back to OUTPUT and call function there also wasn't any error anymore. 

 

Can anyone exmplain it?

0 Kudos
Message 3 of 4
(1,066 Views)

@AndrazS wrote:

Hello actually this really helped! but cannot understand the situation...

 

When I configured port as INPUT and call function there wasn't error anymore, but when I reconfigured it back to OUTPUT and call function there also wasn't any error anymore. 

 

Can anyone explain it?


I don't have any hardware to test with, but maybe a bug in the chip? Does that status remain if you close the driver (VISA Close) and reopen it (may hint at that the driver does some improper session status caching)? Or if you unplug the interface and plug it in again (some optimization on the chip that gets reset with a power cycle)?

 

Or something in the manual that you haven't read or that they forgot to document. Datasheets are always incomplete, that's the nature of datasheets. If a chip doesn't get used very often nobody will bother to update the datasheet. If it gets used often a new chip generation will be developed with a new datasheet that is incomplete again and the old datasheet will slowly be forgotten and definitely not worked on anymore.

 

The art of software driver development for any hardware is about getting a feeling of things that might not be complete in the datasheets and work around it and testing, testing, testing, testing! Did I mention that you need to do lots and lots of tests?

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(1,059 Views)