Serial eeprom api
This presentation is the property of its rightful owner.
Sponsored Links
1 / 13

Serial EEPROM API PowerPoint PPT Presentation


  • 137 Views
  • Uploaded on
  • Presentation posted in: General

Serial EEPROM API. Supported Serial EEPROM parts Serial EEPROM API introduction Detailed Serial EEPROM API Function presentation Serial EEPROM example application. NET+OS Software Group. Supported Serial EEPROM Parts. Atmel AT25080/160/320/640 family of SPI serial EEPROMs.

Download Presentation

Serial EEPROM API

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Serial eeprom api

Serial EEPROM API

Supported Serial EEPROM parts

Serial EEPROM API introduction

Detailed Serial EEPROM API Function presentation

Serial EEPROM example application

NET+OS Software Group

1-1


Supported serial eeprom parts

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 NET+50 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.


Supported serial eeprom parts continued

Supported Serial EEPROM Parts (continued)

  • Driver supports the write protection features of the serial EEPROM.


Serial eeprom api1

Serial EEPROM API

  • NASEInit()

  • NASECreateSemaphores()

  • NASEWrite()

  • NASERead()

  • NASEMemset()

  • NASEBlockWriteProtect()


Naseinit

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


Naseinit continued

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


Nasecreatesemaphores

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.


Nasewrite

NASEWrite()

  • int NASEWrite(unsigned long offset, char * buffer, unsigned long length);

  • Writes data starting from the specified offset location in the serial EEPROM memory.


Naseread

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.


Nasememset

NASEMemset()

  • int NASEMemset (unsigned long offset, char data, unsigned long length);

  • Initializes sections of the serial EEPROM with the specified character.


Naseblockwriteprotect

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.


Naseblockwriteprotect continued

NASEBlockWriteProtect() (continued)

  • Write protection settings are “non-volatile”. Thus, the write protection setting will remain until it is changed.


Serial eeprom example application

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 EEPROM’s 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.


  • Login