AM263Px MCU+ SDK: EEPROM

| AM263Px MCU+ SDK 26.00.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

        - CAT24M

- 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);
DebugP_assert(SystemP_SUCCESS == status);

EEPROM Write API

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

# API

APIs for I2C based EEPROM

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:187