libftdi Archives

Subject: Re: [EEPROM branch] "size_check" init value

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 24 Sep 2010 21:02:22 +0200
On 09/24/2010 05:26 PM, Uwe Bonnes wrote:
>     Thomas> Thanks for checking, I'll change the code to limit the string
>     Thomas> length to 48 characters in total.
>     >>  As explained, this is wrong due to an error in AN_121. If done so,
>     >> it will ovveride checksum...
>     Thomas> What about limit it to 46 then? :)
> The limit is Type dependant. Perhaps another case structure would bring
> this up more clearfully. What about appended patch?

I like it, applied.

> B.t.w. my last explanation was wrong, and the old calculation too. I missed
> that the PNP descriptor works on a word...

Hmm. This makes me think some more...

There's room for 47 words (94 bytes) in the FT2232C eeprom
as it contains two more bytes at the "beginning" (0x14 and 0x15)
compared to the BM type chips.

What about the two more words used for the PNP stuff?
IMHO we must add them to the size check (and FTDI also
forgot about it in the AN_121 document...)

Also it just occurred to me that the usable eeprom area
for the BM type chips is 98 bytes instead of 96 bytes: 

 128         <- total eeprom size
-(0x14 +2)   <- Basic configuration data/Offset of first string descriptor
                + 2 as we start counting at zero.
- 3*2 bytes  <- Overhead for the string descriptors
- 2 bytes    <- checksum

-> 98 bytes -> 49 characters. Though we can keep the "official"
48 words limit and waste one word to make sure our eeproms
are compatible with the official software.


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

Current Thread