libftdi Archives

Subject: Re: [PATCH] Use BM/R series baud rate computation for FT230X

From: Joe Zbiciak <intvnut@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 16 Aug 2016 08:55:54 -0700
I assume you're referring to this patch to the test case: 


Yes, that looks like the right place in the code to add it, as it includes TYPE_230X under the same branch as TYPE_R and TYPE_BM.  The 'H' devices pack the INTERFACE_{A,B,C,D} into the 8 LSBs of index, while the others do not.  The FT230X data sheet points to the same AN232B-05 app-note for computing divisors as used for the FT232R, FT2232 and FT232B, so based on FTDI's documentation, it matches their recommendations for FT230X.

I looked through why that code is there (reassembling the 3-bit frac_code field, effectively), and that looks right too.  It's taking the 2 MSBs of 'value' and 1 LSB of 'index' to reassemble the 3-bit frac_code, correct?

—J



On Tue, Aug 16, 2016 at 5:57 AM, Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx> wrote:
Hello Joe,

On Saturday, 13. August 2016 12:49:17 Joe Zbiciak wrote:
> I've reformatted my suggested tweak below as a proper git patch.

good catch and thanks for the git-consumable patch! Applied.

I've also added TYPE_230X to the baudrate unit test.
Can you verify the "fractional_bits" parts is correct?
I just added it to the "correct looking" place.

Cheers,
Thomas


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




--


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


Current Thread