libftdi Archives

Subject: CBUS bitbang disconnects serial interface

From: "Andrew Kohlsmith (mailing lists account)" <aklists@xxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 27 Jul 2010 17:48:56 -0400
Good evening, everyone,

I've developed a board that uses the FT232RL as the "console" interface to a 
microcontroller. I've also wired up CBUS0 through a diode to the 
microcontroller's reset line, such that driving CBUS0 low will activate the 
microcontroller RESET# line.

The serial interface works great; hardly a surprise as this device must be in 
thousands of products with the exact same configuration. :-)

However, when I try to toggle CBUS0, the computer that the FT232R is plugged 
in to says that the serial interface has been removed. The FT232R still shows 
up in the USB device listing and I can still talk to it, but the serial 
interface is gone.

I'm using Linux on the host system, and using libftdi to play with the CBUS 
pins.

(error checking removed, no errors are reported anyway)

struct ftdi_context ftdic;
struct ftdi_device_list *list, *i

ftdi_init(&ftdic);
ftdi_usb_open(&ftdic, 0x0403, 0x6001);

unsigned char bitmode = BITMODE_CBUS;

ftdi_set_bitmode(&ftdic, 0x1e, bitmode);
sleep(1);
ftdi_set_bitmode(&ftdic, 0x1f, bitmode);

ftdi_usb_close(&ftdic);
ftdi_deinit(&ftdic);

If my understanding of the CBUS bitmode is correct, that should configure CBUS0 
for an output, toggling it low for 1 second.

I don't think the issue is with the ftdi_set_bitmode() function at all, 
because with that commented out the serial port seems to get disconnected.  
Perhaps something unusual is happening with the open?

-A.


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread