EEPROM Platform Interface

EEPROM Platform Interface

EEPROM Overview

EEPROM (Electrically Erasable Programmable Read-Only Memory) is a type of non-volatile memory used in embedded systems and electronic devices to store small amounts of data that must be preserved even after power is removed. It allows data to be electrically written, erased, and reprogrammed multiple times.

Supported Communication Modes

The following modes of EEPROM communication are supported:

  • Blocking - Here the read/write function waits(blocked) till the operation is performed or time out

  • Non-Blocking - The read/write function returns immediately and the registered callback is invoked after the completion of operation or time out

EEPROM BUS Interface

The EEPROM bus interface defines how the EEPROM is connected to the system, enabling communication with the device:

  • EEPROM Interface Internal : EEPROM is integrated within the device’s internal memory space.

  • EEPROM Interface I2C : EEPROM is connected via the I2C (Inter-Integrated Circuit) protocol.

  • EEPROM Interface SPI : EEPROM is connected via the SPI (Serial Peripheral Interface) protocol.

These interfaces provide flexibility in integrating EEPROM with various system architectures.

The middleware part will be responsible for managing read/write/erase/write protect operations along with some convenience functions to read/write memory.

Application Interface

The below table captures the functions that are to be called from the application layer.

API Functions

Function

Description

rs_eeprom_open

To open the EEPROM interface.

rs_eeprom_set_config

To configure the EEPROM interface.

rs_eeprom_enable_write

To enables write access for the EEPROM

rs_eeprom_disable_write

To disables write access in the EEPROM

rs_eeprom_erase

To erases the given page in the EEPROM

rs_eeprom_write

To writes the given data in the eeprom

rs_eeprom_read

To reads the data from the EEPROM

rs_eeprom_register_completion_callback

To registers the given callback function for EEPROM operation

rs_eeprom_close

To close the EEPROM interface.

Error Code

  • Every API’s for the EEPROM returns some success or failure values. Please refer below section,

Implementation Guide

This section explains how to implement the EEPROM interface using the RAPIDSEA stack, the steps to be followed are

  • Configure the preferred method of RX or TX communication(Blocking / Non-Blocking).

  • Configure the EEPROM interface.

  • Then call the open call of the EEPROM interface.

  • Perform the read and write operations as required and handle the error codes.

  • Close the EEPROM interface.

Documentation from the relevant header as follows:

Warning

doxygenfile: Cannot find file “rs_eeprom.h