cariboulabs-cariboulite/docs/flashing
David Michaeli 8ab40c3cdf Merge develop_R1 into main 2023-02-14 10:39:24 -05:00
..
README.md Merge develop_R1 into main 2023-02-14 10:39:24 -05:00

README.md

EEPROM

Each CaribouLite is pre-configured by the contract manufacturer before shipping. The Full and the ISM versions are further distinguishable by the configuration resistors placed on the back side of the board (marked as "CFG/1234").

CaribouLite doesn't have an FPGA configuration flash device, as the ICE40 device is dynamically configured by the RPI quickly and on-demand. It rather has a general board configuration device (EEPROM) as required by RPi's HAT device rules.

EEPROM Data Structure

The code is located here and is based on RPi EERPROM Utils Tools provided by RaspberryPi. The ID EEPROM internal structure is described here.

The general structure is as follows:

  1. HEADER: containing a valid header key (SIGN), its version, the number of ATOMs that follow the header and the total size of the EEPROM contents.
  2. VENDOR INFO: Product information and Vendor information, and the product UID (unique 128bit identifier / serial number).
  3. GPIO MAP: a listing of CaribouLite's RPi GPIO states and flags, for each GPIO pin (GPIO2-GPIO27).
  4. DEVICE TREE: as the system is booting, the RPi kernel automatically reads this ATOM from the EEPROM and sets it as an overlay. As a result, the kernel modules needed for CaribouLite to operate (SMI, SPI, etc.) are probed on startup and configured according to the overlay.
  5. PROPRIETARY DATA: this part contains additional configuration information for the board - I/Q imbalance calibration values, Tx-Power calibration, TCXO calibration, GPIO and PMOD states, etc. Some of these values shall be programmed by the CM, others are just place-holders for the user to better organize his work.

Gracefully Accessing Data

To access the EEPROM data, one can use our code which also validates and decodes the information. The easier way to access the information within the programmed EEPROM is to use Raspbian's Linux sysfs as follows:

cd /proc/device-tree/hat/

# name
cat name

# product: "CaribouLite RPI Hat"
cat product

# product_id: "0x0001"
cat product_id

# product_ver: "0x0001"
cat product_ver

# uuid: "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE" GUID format
#       which is also the board's raw serial number
cat uuid

# vendor: "CaribouLabs.co"
cat vendor

Reprogramming the EEPROM

Reprogramming the EEPROM is possible using our EEPROM utilities. More info - coming soon.

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.