Serial EEPROM API - PowerPoint PPT Presentation

About This Presentation
Title:

Serial EEPROM API

Description:

Serial EEPROM API Supported Serial EEPROM parts Serial EEPROM API introduction Detailed Serial EEPROM API Function presentation Serial EEPROM example application – PowerPoint PPT presentation

Number of Views:275
Avg rating:3.0/5.0
Slides: 14
Provided by: Jac143
Category:

less

Transcript and Presenter's Notes

Title: Serial EEPROM API


1
Serial EEPROM API
  • Supported Serial EEPROM parts
  • Serial EEPROM API introduction
  • Detailed Serial EEPROM API Function presentation
  • Serial EEPROM example application

NETOS Software Group
2
Supported Serial EEPROM Parts
  • Atmel AT25080/160/320/640 family of SPI serial
    EEPROMs.
  • EEPROM sizes are 1KB, 2KB, 4KB and 8KB
    respectively.
  • Driver uses four NET50 GPIO lines to interface
    with the serial EEPROM to free up a chip select
    (CS) line and the SPI interface.
  • PortC, PortD, PortF, PortG and PortH GPIO lines
    are supported and I/O lines from different Ports
    can be mixed and matched.
  • Driver supports the burst mode read and page mode
    write features of the serial EEPROM for optimal
    performance.

3
Supported Serial EEPROM Parts (continued)
  • Driver supports the write protection features of
    the serial EEPROM.

4
Serial EEPROM API
  • NASEInit()
  • NASECreateSemaphores()
  • NASEWrite()
  • NASERead()
  • NASEMemset()
  • NASEBlockWriteProtect()

5
NASEInit()
  • int NASEInit (unsigned long eepromType, unsigned
    long chipSelectLine, unsigned long clockLine,
    unsigned long serialIn, unsigned long
    serialOut)
  • Specifies the EEPROM part and the GPIO lines used
    to interface the EEPROM. Also initializes global
    variables and the GPIO ports used to interface
    with the EEPROM part.
  • Called ONCE after power up.
  • eepromType can be
  • AT25080, AT25160, AT25320 or AT25640

6
NASEInit() (continued)
  • chipSelectLine, clockLine and serialIn can be
  • PORTC_BITx, PORTD_BITx, PORTF_BITx
  • serialOut can be
  • PORTC_BITx, PORTD_BITx, PORTF_BITx, PORTG_BITx,
    PORTH_BITx

7
NASECreateSemaphores()
  • int NASECreateSemaphores()
  • Creates the semaphores used to synchronize access
    to the serial EEPROM driver API.
  • Called by the user application ONCE after power
    up.
  • NASEWrite(), NASERead(), NASEMemset() and
    NASEBlockWriteProtect() are semaphore protected.

8
NASEWrite()
  • int NASEWrite(unsigned long offset, char
    buffer, unsigned long length)
  • Writes data starting from the specified offset
    location in the serial EEPROM memory.

9
NASERead()
  • int NASERead(unsigned long offset, char
    buffer, unsigned long length)
  • Reads data from the serial EEPROM starting at the
    specified offset location in the serial EEPROM
    memory.

10
NASEMemset()
  • int NASEMemset (unsigned long offset, char data,
    unsigned long length)
  • Initializes sections of the serial EEPROM with
    the specified character.

11
NASEBlockWriteProtect()
  • int NASEBlockWriteProtect (unsigned char
    protectionLevel)
  • Sets the write protect level for the serial
    EEPROM.
  • protectionLevel can be
  • WRITE_PROTECT_LEVEL0 write protection disabled
  • WRITE_PROTECT_LEVEL1 write protection enabled
    for last ¼ of the address range
  • WRITE_PROTECT_LEVEL2 write protection enabled
    for the second ½ of the address range
  • WRITE_PROTECT_LEVEL3 write protection enabled
    for the entire address range.

12
NASEBlockWriteProtect() (continued)
  • Write protection settings are non-volatile.
    Thus, the write protection setting will remain
    until it is changed.

13
Serial EEPROM Example Application
  • \netosx\src\examples\naseeprom
  • Configured to access a AT25640 serial EEPROM
    using I/O lines from various GPIO ports.
  • Verifies the functionality of the serial EEPROMs
    write protection feature.
  • Allows reading / writing entire serial EEPROM
    memory 1 byte per NASERead() / NASEWrite() call
    to reading / writing 8KB with one NASERead() /
    NASEWrite() call.
Write a Comment
User Comments (0)
About PowerShow.com