libftdi Archives

Subject: Re: Hi-speed UARTs (3Mbps to 12Mbps) on FT2232H/FT4232H

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 18 May 2010 14:09:07 +0200
Hello Manu,

On Tuesday, 4. May 2010 18:08:32 Emmanuel Blot wrote:
> I have not found a reference to this feature in the current FTDI lib,
> sorry if a patch has already been posted.
> Here is a quick patch to the current libftdi GIT HEAD to support
> hi-speed baudrates on recent FTDI devices
> I've kept the original 5% tolerance on UART speed, although many
> devices do not tolerate such a drift at hi baudrates (I'm using a 3%
> max tolerance with my own devices)

Thanks for your patch! Some small questions:

- FTDI_BAUDRATE_TOLERANCE doesn't seem to get used?

- Could you check if this piece of code doesn't break
  the bitbang mode as it multiplies the baud rate by four:

+        if ( baudrate > (FTDI_BAUDRATE_REF_CLOCK>>1) )
+        {
+            ref_clock *= 4; // 12 MHz
+            hispeed = 1;
+        }


I haven't looked at the baudrate code in a long time...

- Where does this "magic" come from: "*index |= 1<<9; // use hispeed mode"?
  Maybe a #define would be nice to give it a concrete name.


libftdi - see for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread