Hi,
What is the easiest way to switch between using interface A in
synchrounous FIFO mode and interface B in MPSSE mode (since I can't
use them at the same time)?
Right now I need to power toggle my device if I ever tried the sync
FIFO on interface A to configure interface B for MPSSE mode.
Must I use the external device reset pin or what???
Regards
Mikael
Will Zhang skrev 2010-10-13 12:26:
Hi Mikael,
I found the following text in the FT2232H data sheet:
3.4.2 FT2232H pins used in an FT245 Style Synchronous FIFO
Interface
"In this mode the 'B' channel is not available as all resources
have been switched onto channel A."
Regards
Will
On Wed, Oct 13, 2010 at 9:17 PM, Mikael
Krus <mk@xxxxxxxxxx>
wrote:
Hi Will,
If I read the datasheet correct, single channel means that
the synchronous FIFO mode is only available in interface A
and not in B.
So you mean if I choose this mode in interface A, interface
B must be unconfigured?
Regards
Mikael
Will Zhang skrev 2010-10-13 11:06:
Hi Mikael,
To my knowledge, FT2232H supports SINGLE CHANNEL
synchronous FIFO mode. I suggest double check the data
sheet to make sure your desired configuration is
possible in hardware.
Will
On Wed, Oct 13, 2010 at 7:13
PM, Mikael Krus <mk@xxxxxxxxxx>
wrote:
Hi,
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?
Best regards
Mikael
--
libftdi - see http://www.intra2net.com/en/developer/libftdi
for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|
|