We've got a device that uses a Cypress EZ-USB FX1 configured for CDC USB-Serial interface with the latest Cypress drivers. We're using NI-MAX with Switch Executive to interface with the serial device. I've setup the driver session to use a custom dll that uses the following settings:
VI_READ_BUF | VI_WRITE_BUF = 4096 bytes
VI_ATTR_WR_BUF_OPER_MODE = flush on access, same for RD mode
NI Spy shows that viOpen, setTimeout, set buffer sizes seem to work. Then we call a particular function implemented by the flashed FX1: setRelay(...), which elicits an I/O error having status 0xBFFF003E. (also, the relay gets set properly, I can hear the physical device switching, and the function returns nothing for the host to read).
However, doing the same thing manually in the VISA test panel works without error. Also, this used to work in Win7 with the old Cypress Win7 driver.
I've tried a bunch of stuff and haven't found an answer yet. Could someone here point me in the right direction?
Solved! Go to Solution.
Hey! Have you checked this link?
Other questions regarding this particular error suggest to just ignore the error. I don't think that's a good solution for this issue, so please let me know if the KB worked for you.
Thanks for sharing the KB, I checked those issues and didn't find a fix there.
What ended up working was switching from formatted I/O (like viPrintf()) to direct I/O (like viWrite()). That seemed to work. I have no idea why.
For what it's worth, I called setBuffer on all buffers, read/write and formatted/direct.
I am happy that it works now, but not sure why it worked under Win7 but not Win10. If anybody knows or has a hunch then I'm still open to hearing more about why this happened.
Hey, I'm glad you were able to make it work. Unfortunately, I don't know why that was the solution but if you can mark your comment as solution we can help people that might experience this in the future =)