Skip to content

Flashing the FTDI EEPROM under linux

Dave Hylands edited this page Jan 4, 2017 · 2 revisions

The very first batch of boards (5) have an FTDI EEPROM that doesn't seem to work under linux properly.

I discovered that libftdi comes with a couple utilities that can read and write the FTDI EEPROM.

I cloned this repository and followed the build instructions here.

When I did the make, it failed part way through, but it was after it had built the ftdi_eeprom utility, so I never bothered to investigate the build failure.

You should find build/ftdi_eeprom/ftdi_eeprom.

You can read the EEPROM by doing (assumes you're in the build directory):

cd ftdi_eeprom
wget wget https://raw.githubusercontent.com/mozilla-sensorweb/sensorweb-wiki/master/jtag-eeprom.conf
sudo modprobe -r ftdi_sio
./ftdi_eeprom --read-eeprom jtag-eeprom.conf

and then you can update the EEPROM by doing:

$ ./ftdi_eeprom --flash-eeprom jtag-eeprom.conf

FTDI eeprom generator v0.17
(c) Intra2net AG and the libftdi developers <opensource@intra2net.com>
FTDI read eeprom: 0
EEPROM size: 128
Used eeprom space: 90 bytes
FTDI write eeprom: 0
Writing to file: eeprom.bin
FTDI close: -1

After updating the EEPROM, you should unplug and replug the board.

You can then verify the contents by re-reading the eeprom:

$ ./ftdi_eeprom --read-eeprom jtag-eeprom.conf 

FTDI eeprom generator v0.17
(c) Intra2net AG and the libftdi developers <opensource@intra2net.com>
FTDI read eeprom: 0
EEPROM size: 128
VID:     0x0451
PID:     0xc32a
Release: 0x0500
Bus Powered: 500 mA
Manufacturer: FTDI
Product:      USB <-> JTAG/SWD
Serial:       cc3101
Checksum      : 65f8
Attached EEPROM: 93x46
PNP: 1
Channel A has Mode FIFO
FTDI close: 0

$ hd eeprom.bin 
00000000  01 08 51 04 2a c3 00 05  80 fa 08 00 00 02 96 0a  |..Q.*...........|
00000010  a0 22 c2 0e 46 00 0a 03  46 00 54 00 44 00 49 00  |."..F...F.T.D.I.|
00000020  22 03 55 00 53 00 42 00  20 00 3c 00 2d 00 3e 00  |".U.S.B. .<.-.>.|
00000030  20 00 4a 00 54 00 41 00  47 00 2f 00 53 00 57 00  | .J.T.A.G./.S.W.|
00000040  44 00 0e 03 63 00 63 00  33 00 31 00 30 00 31 00  |D...c.c.3.1.0.1.|
00000050  02 03 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 f8 65  |...............e|
00000080