AM62Ax MCU+ SDK  10.01.00
EEPROM

The EEPROM driver provides API to read and write to I2C based EEPROM devices present in the board. The driver takes care of all sequencing necessary to perform writes across pages and the application need not take care of the programming intricacies.

Features Supported

  • Read and write API from any offset
  • Provide API to return EEPROM attributes like size, page size etc

SysConfig Features

Note
It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.
  • Option to select EEPROM type based on board
  • Supported EEPROMs
      - AT24C
    
  • Option to set the I2C address of the EEPROM

Features NOT Supported

NA

Important Usage Guidelines

None

Example Usage

Include the below file to access the APIs

#include <board/eeprom.h>

EEPROM Read API

status = EEPROM_read(handle, 0, buffer, 100);

EEPROM Write API

status = EEPROM_write(handle, 0, buffer, 100);

API

APIs for I2C based EEPROM

status
uint32_t status
Definition: tisci_lpm.h:1
eeprom.h
EEPROM_write
int32_t EEPROM_write(EEPROM_Handle handle, uint32_t offset, const uint8_t *buf, uint32_t len)
Write to EEPROM.
SystemP_SUCCESS
#define SystemP_SUCCESS
Return status when the API execution was successful.
Definition: SystemP.h:56
EEPROM_read
int32_t EEPROM_read(EEPROM_Handle handle, uint32_t offset, uint8_t *buf, uint32_t len)
Read data from EEPROM.
DebugP_assert
#define DebugP_assert(expression)
Function to call for assert check.
Definition: DebugP.h:175