Download presentation
Presentation is loading. Please wait.
Published byCoral Robbins Modified over 9 years ago
2
1-1 NET+OS Software Group Serial EEPROM API Supported Serial EEPROM parts Serial EEPROM API introduction Detailed Serial EEPROM API Function presentation Serial EEPROM example application
3
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.
4
Supported Serial EEPROM Parts (continued) Driver supports the write protection features of the serial EEPROM.
5
Serial EEPROM API NASEInit() NASECreateSemaphores() NASEWrite() NASERead() NASEMemset() NASEBlockWriteProtect()
6
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
7
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
8
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.
9
NASEWrite() int NASEWrite(unsigned long offset, char * buffer, unsigned long length); Writes data starting from the specified offset location in the serial EEPROM memory.
10
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.
11
NASEMemset() int NASEMemset (unsigned long offset, char data, unsigned long length); Initializes sections of the serial EEPROM with the specified character.
12
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.
13
NASEBlockWriteProtect() (continued) Write protection settings are “non-volatile”. Thus, the write protection setting will remain until it is changed.
14
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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.