FreeCalypso > hg > fc-usbser-tools
comparison doc/FTDI-EEPROM-format @ 72:6dc3aa777fd6
doc/FTDI-EEPROM-format: document config file language
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 25 Sep 2023 00:04:22 +0000 |
parents | 0b37be8b23ca |
children | f14d04e4d85d |
comparison
equal
deleted
inserted
replaced
71:0b37be8b23ca | 72:6dc3aa777fd6 |
---|---|
324 Our current ftee-gen* tools replicate these quirks, as they are essentially | 324 Our current ftee-gen* tools replicate these quirks, as they are essentially |
325 harmless. The only downside of this design is that one cannot use a 93C56 | 325 harmless. The only downside of this design is that one cannot use a 93C56 |
326 EEPROM to include longer strings - but designing a product with unnaturally | 326 EEPROM to include longer strings - but designing a product with unnaturally |
327 long ID strings, so long that FTDI's official tools won't support them, seems | 327 long ID strings, so long that FTDI's official tools won't support them, seems |
328 like a bad idea. | 328 like a bad idea. |
329 | |
330 ftee-gen* tools: config file language | |
331 ===================================== | |
332 | |
333 The format of EEPROM config files read by our ftee-gen* tools is line-based. | |
334 Each non-blank, non-comment line defines or tweaks one setting. The following | |
335 settings are common to all ftee-gen* chip variants: | |
336 | |
337 Setting Format Meaning | |
338 ------------------------------- | |
339 vid hex USB vendor ID | |
340 pid hex USB product ID | |
341 manuf string Manufacturer ID string | |
342 product string Product ID string | |
343 byte00 hex Raw setting of byte 00 | |
344 byte01 hex Raw setting of byte 01 | |
345 byte08 hex Raw setting of byte 08 | |
346 byte0A hex Raw setting of byte 0A | |
347 maxpower decimal bMaxPower declaration, number in mA | |
348 usbver hex bcdUSB word (ftee-gen2232c and ftee-gen232r only) | |
349 | |
350 Additional settings for FT2232H (ftee-gen2232h): | |
351 | |
352 group0 hex I/O electrical config for ADBUSx | |
353 group1 hex I/O electrical config for ACBUSx | |
354 group2 hex I/O electrical config for BDBUSx | |
355 group3 hex I/O electrical config for BCBUSx | |
356 | |
357 Additional settings for FT232R (ftee-gen232r): | |
358 | |
359 byte0B hex Raw setting of byte 0B | |
360 cbus0 hex CBUS0 config code | |
361 cbus1 hex CBUS1 config code | |
362 cbus2 hex CBUS2 config code | |
363 cbus3 hex CBUS3 config code | |
364 cbus4 hex CBUS4 config code | |
365 | |
366 Only two settings are strictly mandatory: manuf and product strings. For all | |
367 other settings the EEPROM generator tool provides chip-matching defaults: | |
368 | |
369 * ftee-gen2232[ch] defaults match the configuration attained by the chip | |
370 with a blank or missing EEPROM; | |
371 | |
372 * ftee-gen232r defaults match FTDI's default factory programming of the | |
373 chip-internal EEPROM. | |
374 | |
375 As one can see, the config language is very low-level, most bits are set in raw | |
376 hex. This design is justified by the paradigm of writing each config file once: | |
377 if you are designing a new board with an FTDI chip on it, and you need to change | |
378 some setting away from the FTDI chip's default, you research it once, figure out | |
379 the right bits, code the needed byte-level configuration in an EEPROM config | |
380 file, and then you just run a standard command line every time you need to | |
381 program a board. | |
382 | |
383 The serial number string is never specified in the config file, instead it is | |
384 specified on the command line - this tool design is in accord with factory | |
385 production paradigm, where each EEPROM config is written once for a given board | |
386 design, and then a shell pipeline is executed for each board to be programmed. | |
387 | |
388 Byte 0A bit 3 is always overridden by the generator tool based on the serial | |
389 number command line argument: set if a serial number is given and cleared if | |
390 this argument is omitted. |