I am trying to configure both interfaces in FT2232H, and use them and at
the same time. This isn't working as expected though.
This is how I like it:
Interface A should be in synchrounous FIFO mode continously reading the
buffer waiting for data.
Interface B should be in MPSSE mode (simple general purpose IO).
Toggling a pin writes data to the FIFO (for interface A to read).
This is a snippet from my code when sertting up the interfaces (I can
attach my full code if someone like to see it):
// Select and open interface A, reset and purge, enable syncFIFO
ret = ftdi_set_interface(&ftdicA, INTERFACE_A);
ret |= ftdi_usb_open_dev(&ftdicA, devlist->dev);
ret |= ftdi_usb_reset(&ftdicA);
ret |= ftdi_usb_purge_buffers(&ftdicA);
ret |= ftdi_set_bitmode(&ftdicA, 0, BITMODE_RESET);
ret |= ftdi_set_bitmode(&ftdicA, 0, BITMODE_SYNCFF);
ret = ftdi_set_interface(&ftdicB, INTERFACE_B);
ret |= ftdi_usb_open_dev(&ftdicB, devlist->dev);
ret |= ftdi_usb_reset(&ftdicB);
ret |= ftdi_usb_purge_buffers(&ftdicB);
ret |= ftdi_set_bitmode(&ftdicB, 0, BITMODE_RESET);
ret |= ftdi_set_bitmode(&ftdicB, 0, BITMODE_MPSSE);
After this I try to send a "bogus" command to the MPSSE expecting it to
send back a two byte "error code" message, but this never happens.
If I comment out the setup of interface A, however it works as expected
(regarding the "error message" sent back).
What did I do wrong??
Besides this, what effect will my ftdi_usb_reset() call have on
interface A when calling it for interface B? Does it also get reset?
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx