comparison doc/DUART28-EEPROM-config @ 43:dbaf239436cf

doc/DUART28-EEPROM-config: update for fc-duart28-conf
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 11 Sep 2023 01:06:03 +0000
parents f5fbcf1ff032
children
comparison
equal deleted inserted replaced
42:2746b160afb7 43:dbaf239436cf
21 The physical hardware is identical between the two configurations, only the 21 The physical hardware is identical between the two configurations, only the
22 EEPROM programming changes, thus end users need to be able to switch freely 22 EEPROM programming changes, thus end users need to be able to switch freely
23 between the two EEPROM configs as they wish. This article explains how to 23 between the two EEPROM configs as they wish. This article explains how to
24 program the EEPROM back and forth between the two configs. 24 program the EEPROM back and forth between the two configs.
25 25
26 Determining your current DUART28 config 26 Using fc-duart28-conf utility
27 ======================================= 27 =============================
28 28
29 Connect the USB cable between your DUART28 board and your Linux host, and 29 The present fc-usbser-tools package includes a specialized high-level utility
30 observe dmesg output. If your DUART28 board is in the C configuration, it will 30 for examining and changing DUART28 adapter configuration. This utility has two
31 present as USB ID 0403:7152, and if it is in the S config, it will present as 31 operation modes:
32 USB ID 0403:6010. You can also see these USB IDs with lsusb. The product ID
33 string is also programmed as "DUART28C" or "DUART28S".
34 32
35 Converting from DUART28S to DUART28C 33 fc-duart28-conf show -- check and show current configuration
36 ==================================== 34 fc-duart28-conf set C|S -- set new config by programming the EEPROM
37 35
38 If your DUART28 board is currently in the S config, its USB ID will be 36 The show command is completely non-invasive: it looks through the system tree
39 0403:6010, which is the default ID for FTDI's two-channel FT2232x family. 37 of connected USB devices, looking for a DUART28 adapter (as identified not only
40 Because it is the standard default, there are plenty of other gadgets using the 38 by USB VID:PID, but also by manufacturer and product ID strings), and if it
41 same ID - thus you need to ensure that you have no other USB devices with the 39 finds a DUART28 device, the tool reports its current configuration.
42 same ID connected to your system during the reprogramming operation. Run lsusb
43 and ensure that you see only one USB device with ID 0403:6010. Ensure that this
44 one device really is your DUART28 board: unplug that USB cable and make sure
45 that the device disappears, plug it back in and make sure that it reappears.
46 40
47 One you have confirmed that you won't inadvertently hit some other FT2232x 41 The set command is invasive by necessity, as the fundamental identity of the
48 device, execute the actual programming command as follows (from the top 42 connected USB device is being changed: the tool commands the Linux kernel to
49 directory of this code repository): 43 unbind the ftdi_sio driver from both interfaces (both ttyUSB devices disappear),
44 checks the current EEPROM configuration, and then reprograms it for the new
45 desired config. Once the operation completes, the DUART28 adapter needs to be
46 unplugged and replugged for the EEPROM change to take effect and for the
47 ftdi_sio driver to rebind.
50 48
51 ftee-gen2232c eeproms/duart28c $Serial | fteeprom-prog i:0x0403:0x6010 49 Unless you intentionally fool it by programming DUART28C or DUART28S EEPROM
50 config into some other FTDI device, fc-duart28-conf cannot hit a non-DUART28
51 USB device by mistake: VID:PID, manufacturer ID string and product ID string
52 all have to match either DUART28C or DUART28S. If you have multiple DUART28
53 adapters plugged in, the tool will hit the first one it finds - not a
54 recommended arrangement, but also one which is not expected to arise by
55 accident.
52 56
53 (See FTDI-EEPROM-tools article for other ways to specify the target device to 57 Manual programming with ftee-gen2232c and fteeprom-prog
54 fteeprom-prog.) 58 =======================================================
55 59
56 Replace the $Serial metavariable with the 3-digit serial number of your DUART28 60 In order to be safe in terms of not accidentally hitting some other FTDI-based
57 adapter board as it appears on the factory serial number sticker. 61 USB device, fc-duart28-conf requires the current state of the DUART28 adapter
58 62 to be either valid DUART28C or valid DUART28S. Under ordinary expected usage
59 After this operation completes successfully, unplug and replug the USB cable 63 this requirement is not a problem, but if you somehow manage to totally hose
60 between the DUART28 board and your host - the adapter should now show up with 64 your adapter's EEPROM, then fc-duart28-conf won't be able to recover it. If
61 USB ID 0403:7152. 65 you find yourself in the latter situation, see DUART28-EEPROM-manual article
62 66 for the older manual method which is always possible.
63 Converting from DUART28C to DUART28S
64 ====================================
65
66 If your DUART28 board is currently in the C config, its USB ID will be
67 0403:7152, which is a private ID that belongs to us and should not be used by
68 other parties. The reverse conversion command is as follows:
69
70 ftee-gen2232c eeproms/duart28s $Serial | fteeprom-prog i:0x0403:0x7152