Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2005 20:44:53 -0700 (PDT)
From:      User Tomdean <tomdean@speakeasy.org>
To:        freebsd-usb@freebsd.org
Subject:   Interfacing FT245BM With Ucom
Message-ID:  <200508200344.j7K3irmQ021004@asus.tddhome>

next in thread | raw e-mail | index | archive | help
I am running FreeBSD 5.4, GENERIC.

I have a UMP2 module based on the FTDI FT8U245BM chip, a USB to
parallel chip.  The module in intended to interface processors like
the AVR or 68HC1x to the USB.  I am using the FTDI ATmega16, clocked
at 16 mHz.

My project will have 3 or 3 bytes put into the USB every 6.0 to 7.8
uSec or every 11.2 to 12.8 uSec, depending on the degradation of
precision due to over-clocking the ATMega16 ADC.

Most of the data flow is into FreeBSD.  So, I need about 0.75 mBytes
thruput.  Maybe a few bytes per second out of FreeBSD.

The UMP2 is recognized as a ucom device,

vendor  0x0403
product 0x6001
release 0x0200

If I 'kldload uftdi', I get uftdi.ko and ucom.ko loaded.  Then,
powering up the UMP2 results in the device being connected.  From
dmesg:

ucom0: FTDI USB HS Serial Converter, rev 1.10/2.00, addr 2

I can connect to the device with tip.  But, I cannot disconnect!  '~.'
displays [EOT] but tip does not exit.  I can disconnect as root!  The
device is 

crw-rw----  1 uucp     dialer    232, 128 Aug 18 04:43 ucom0

When tip is hung,
# ps
...
1001 17030   553   0   6  0  1272   728 ttywai IE+ p1 0:00.00 /usr/bin/tip ucom
1001 17031 17030   0 -84  0     0     0 -      Z+  p1 0:00.00 <defunct>
...

I have to cycle power on the UMP2 to get tip to exit!  And, cycle
power on the UMP2 to get it recognized again!.  Sometimes, it takes
several minutes before one of the drivers gets in sync with the
hardware.

BTW, the behavior of tip has changed from a UNIX-style 0x0a to a
WINDOZE style 0x0d,0x0a to get UNIX display behavior!

I plan to try tip with ucom0 with an echo process in the AVR to just
return any char received by the UMP2.

Can I get the 0.75 mByte thruput with uftdi driver, accessed thru
ucom?

tomdean



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508200344.j7K3irmQ021004>