libftdi Archives

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

From: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 24 Sep 2010 16:58:02 +0200
>>>>> "Thomas" == Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx> writes:

    Thomas> On Friday, 24. September 2010 16:38:51 Uwe Bonnes wrote: Could
    Thomas> you check with MProg if they limit all strings to a
    >> total Thomas> of 96 bytes?  If yes, we can greatly simplify our
    >> "size_check" Thomas> code like this:
    >> 
    >> I don't have access to modified wine here. So I testet linux ftd2xx.
    >> 
    Thomas> if (manfacturer_size*2 + product_size*2 + serial_size*2) >
    >> 96) Thomas> explode_and_die(); On a FT232R, FT_EE_Program() failed
    >> with error 18 if the string size was
    >> 
    >> > 46. So I think, there's a bug in AN_121, and using plain 96 on all
    >> > chips

    Thomas> Interesting, the new FTProg manual also mentions 46 characters
    Thomas> as the upper limit, so this seems to be a documentation bug.

It is 48 for TYPE_BM, 47 for TYPE_FT2232C, 46 for TYPE_R and 44 for TYPE_H

    >> will lead to error. E.g. on a FT2232H, strings start at 0x1a(0x9a)
    >> and + 0x66 (0x60 bytes and 3 times length and string marker) will
    >> bring us to 0x7f(0xff), leaving no room for the checksum. And then
    >> the PNP marker (0x02030000 or 0x02030100) is left out too.

    Thomas> Please see the updated eeprom map, I've documented the magic
    Thomas> bytes 0x2 0x3 0x1. (I noticed they are mentioned on the NDAed
    Thomas> FT2232C eeprom document at the end)

Make it 0x2 0x3 0x1 0x0, as we work on words...

    Thomas> AN_121 also mentions the "manufacturer ID" string
    >> additionally Thomas> to the "manufacturer" string. Any idea what that
    >> is?
    >> 
    >> The manufacturer ID is a tag used for the "automatic" generation of
    >> serial numbers. I have never seen it in the real EEPROM, beside
    >> eventually as the first letters of the generated

    Thomas> So I guess this is something "software only" and not stored in
    Thomas> the eeprom at all, too.

It is software only.


-- 
Uwe Bonnes                bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

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

Current Thread