1 / 13

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. Supported Serial EEPROM Parts. Atmel AT25080/160/320/640 family of SPI serial EEPROMs.

ryu
Télécharger la présentation

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  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 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.

  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 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.

More Related