02-09-2022 05:02 AM
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:
The prototype in datasheet is:
Function is always returning me error 1015 and I think this is "GPIO Write not supported"
Please help!
Solved! Go to Solution.
02-09-2022 05:13 AM - edited 02-09-2022 05:29 AM
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?
02-16-2022 11:23 PM
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?
02-17-2022 02:33 AM - edited 02-17-2022 02:34 AM
@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?