Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature Request: Add support for EEPROM User Area (as per FTDI AN_121) #428

@NsTrmb

Description

@NsTrmb

Hello,

First, thank you for creating and maintaining this excellent library.

I would like to propose the addition of a new feature: direct support for the EEPROM "User Area". This feature is officially documented by FTDI in their Application Note AN_121, which explains how unused space in the EEPROM can be used by developers to store custom data.

Motivation

Many applications require storing small amounts of custom information on-device, such as hardware revision, license keys, or configuration flags. The User Area is the designated space for this purpose. Currently, accessing it with

pyftdi requires creating a custom subclass of FtdiEeprom to manually calculate offsets and modify the internal buffer.

Integrating this feature directly into the library would make it much more complete and easier to use.

Proposed Implementation

A way to implement this could be new properties on the FtdiEeprom class:

1 - user_area_size (read-only property):

  • Returns the available size (in bytes) of the user area.

  • The logic would follow the formulas in AN_121, accounting for the EEPROM size (93C46 vs. 93C56/66) and the length of the manufacturer/product/serial strings .

2 - user_area (read/write property):

  • Getter: Returns the raw bytes currently in the user area.

  • Setter: Takes a bytes object, validates its length against user_area_size, writes the data to the correct offset in the internal _eeprom buffer, and sets the _dirty flag to True.

This would provide a simple and powerful API for developers:

# Example Usage
print(f"Available user area: {eeprom.user_area_size} bytes")

# Read existing data
custom_data = eeprom.user_area

# Write new data
eeprom.user_area = b'\x01\x02\x03\x04'
eeprom.commit()

I believe this would be a valuable addition to pyftdi. I'm happy to provide more details from my own implementation if it helps.

Thank you for your consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions