Component - EEPROM V1.50 Datasheet.pdf

PSoC® Creator™ Component Data Sheet
EEPROM
1.50
Features
•
512 B to 2 KB EEPROM memory
•
1,000,000 cycles, 20 year retention
•
Read 1 byte at a time
•
Program 16 bytes at a time
General Description
The EEPROM component provides an API to write a row (16 bytes) of data to the EEPROM. The
term write implies erase and then program in one operation.
The EEPROM component is tightly coupled with various system elements contained within the
cy_boot component. These elements are generated upon a successful build. Refer to the
System Reference Guide for more information about the cy_boot component and its various
elements.
When to use an EEPROM
You can use an EEPROM component:
•
For additional storage of data (freeing up on-chip RAM)
•
For read-only (or rarely-changing) program data
•
For data that must survive power cycles (e.g., calibration tables or device configuration)
Input/Output Connections
There are no IO connections for the EEPROM component. It is an API only.
Parameters and Setup
The EEPROM has no configurable parameters other than standard Instance Name and Built-in
parameters.
Cypress Semiconductor Corporation • 198 Champion Court • San Jose, CA 95134-1709 • 408-943-2600
Document Number: 001-61982 Rev. *A
Revised December 14, 2010
EEPROM
PSoC® Creator™ Component Data Sheet
Resources
API Memory
(Bytes)
Digital Blocks
Analog Blocks
Datapaths
Macro
cells
Status
Registers
Control
Registers
Counter7
Flash
RAM
Pins (per
External I/O)
N/A
N/A
N/A
N/A
N/A
N/A
724
0
N/A
Application Programming Interface
Application Programming Interface (API) routines allow you to configure the component using
software. The following table lists and describes the interface to each function. The subsequent
sections cover each function in more detail.
To read from the EEPROM, no APIs are needed. The entire contents of the EEPROM are
mapped into memory space and can be read directly. The following defines can be used for
reading EEPROM:
•
CYDEV_EE_BASE – the base pointer of the EEPROM memory
•
CYDEV_EE_SIZE – The size of the EEPROM memory space in bytes
EEPROM_1_EEPROM_SIZE is also defined as the size of the EEPROM memory space in bytes
(where EEPROM_1 is the instance name of the EEPROM component).
To write to the EEPROM, you must first acquire the die temperature. You only need to acquire
the temperature once to use the write functions. If the application will be used in an environment
where the die temperature changes 20°C or more, the temperature should be refreshed to allow
the Smart Write Algorithm to work correctly.
By default, PSoC Creator assigns the instance name "EEPROM_1" to the first instance of a
component in a given design. You can rename it to any unique value that follows the syntactic
rules for identifiers. The instance name becomes the prefix of every global function name,
variable, and constant symbol. For readability, the instance name used in the following table is
"EEPROM".
Function
Description
EEPROM_Enable
Enables the EEPROM block operation
EEPROM_Start
Starts EEPROM
EEPROM_Stop
Stops and powers down EEPROM
EEPROM_EraseSector
Erases an EEPROM sector
EEPROM_Write
Blocks while writing a row to EEPROM
Page 2 of 6
Document Number: 001-61982 Rev. *A
PSoC® Creator™ Component Data Sheet
EEPROM
EEPROM_StartWrite
Starts writing a row of data to EEPROM
EEPROM_QueryWrite
Checks the state of a write to EEPROM
void EEPROM_Enable(void)
Description:
Enables the EEPROM block operation. This API is available only for PSoC 3 ES3 or later.
Parameters:
None
Return Value:
None
Side Effects:
A call to EEPROM_Start() will call EEPROM_Enable(). You can call either EEPROM_Start()
or EEPROM_Enable() function directly; both have the same effect.
void EEPROM_Start(void)
Description:
Starts the EEPROM. This API is available only for PSoC 3 ES3 or later.
Parameters:
None
Return Value:
None
Side Effects:
A call to EEPROM_Start() will call EEPROM_Enable(). You can call either EEPROM_Start()
or EEPROM_Enable() function directly; both have the same effect.
void EEPROM_Stop(void)
Description:
Stops and powers down the EEPROM. This API is available only for PSoC 3 ES3 or later.
Parameters:
None
Return Value:
None
Side Effects:
None
cystatus EEPROM_EraseSector(uint16 sectorNumber)
Description:
Erases a sector (64 rows) of memory. This function blocks until the operation is complete.
This API is available only for PSoC 3 ES3 or later.
Parameters:
uint16 sector. Sector number to erase.
Return Value:
CYRET_SUCCESS if the operation was successful.
CYRET_BAD_PARAM if the parameters were invalid.
CYRET_LOCKED if the EEPROM control block is busy.
CYRET_TIMEOUT if the operation timed out.
CYRET_UNKNOWN if there was an EEPROM control block error.
Side Effects:
None
Document Number: 001-61982 Rev. *A
Page 3 of 6
EEPROM
PSoC® Creator™ Component Data Sheet
cystatus EEPROM_Write(uint8 * rowData, uint16 rowNumber)
Description:
Writes a row (16 bytes) of data to the EEPROM. This is a blocking call. It will not return until
the function succeeds or fails.
Parameters:
uint8 * rowData. Address of the data to write to the EEPROM.
uint16 rowNumber. EEPROM row number to program.
Return Value:
CYRET_SUCCESS if the operation was successful.
CYRET_BAD_PARAM if the parameters were invalid.
CYRET_LOCKED if the EEPROM CONTROL BLOCK is busy.
CYRET_TIMEOUT if the operation timed out.
CYRET_UNKNOWN if there was an EEPROM CONTROL BLOCK error.
Side Effects:
None
cystatus EEPROM_StartWrite(uint8 * rowData, uint16 rowNumber)
Description:
Starts the SPC write function. This function does not block, it returns once the command has
begun the SPC write function. Once this function has been called the SPC will be locked until
EEPROM_QueryWrite() does not return CYRET_STARTED. To abandon the write, call
CySpcUnlock() to unlock the SPC.
Parameters:
uint8 * rowData. Address of the data to write to the EEPROM.
uint16 rowNumber. EEPROM row number to program.
Return Value:
CYRET_STARTED if the command to write was successfully started.
CYRET_BAD_PARAM if the parameters were invalid.
CYRET_LOCKED if the EEPROM control block is busy.
CYRET_TIMEOUT if the operation timed out.
CYRET_UNKNOWN if there was an EEPROM control block error.
Side Effects:
None
cystatus EEPROM_QueryWrite(void)
Description:
Checks the state of a write to EEPROM. This function must be called until the return value is
not CYRET_STARTED.
Parameters:
Void
Return Value:
CYRET_SUCCESS if the operation was successful.
CYRET_BAD_PARAM if the parameters were invalid.
CYRET_LOCKED if the EEPROM control block is busy.
CYRET_STARTED if the command to write was successfully started.
CYRET_TIMEOUT if the operation timed out.
CYRET_UNKNOWN if there was an EEPROM control block error.
Side Effects:
None
Page 4 of 6
Document Number: 001-61982 Rev. *A
PSoC® Creator™ Component Data Sheet
EEPROM
Sample Firmware Source Code
PSoC Creator provides numerous example projects that include schematics and example code
in the Find Example Project dialog. For component-specific examples, open the dialog from the
Component Catalog or an instance of the component in a schematic. For general examples,
open the dialog from the Start Page or File menu. As needed, use the Filter Options in the
dialog to narrow the list of projects available to select.
Refer to the "Find Example Project" topic in the PSoC Creator Help for more information.
Functional Description
Not applicable.
References
Refer also to the Die Temperature component data sheet and the System Reference Guide.
DC and AC Electrical Characteristics
The following values are indicative of expected performance and based on initial characterization
data.
DC Specifications
Parameter
Description
Conditions
Erase and program voltage
Min
1.71
Typ
Max
--
5.5
Units
V
AC Specifications
Parameter
TWRITE
Description
Conditions
Min
Typ
Max
Units
Single row erase/write cycle
time
--
2
15
ms
EEPROM endurance
1M
--
--
program/
erase cycles
--
--
years
EEPROM data retention time Retention period
20
measured from last erase
cycle (up to 100 K cycles)
Document Number: 001-61982 Rev. *A
Page 5 of 6
EEPROM
PSoC® Creator™ Component Data Sheet
Component Changes
This section lists the major changes in the component from the previous version.
Version
1.50.a
Description of Changes
Reason for Changes / Impact
Added characterization data to datasheet
Noted in EEPROM_EraseSector() API in
datasheet that it is only available for
PSoC 3 ES3 or later.
Minor datasheet edits and updates
1.50
1.20.a
1.20
Modified the EEPROM.c file to switch the
include file from cydevice.h file to
cydevice_trm.h.
The cydevice.h file is obsolete. So the generated source
and APIs provided with PSoC Creator should use
cydevice_trm.h instead.
Updated the EEPROM_EraseSector()
section of the example code.
The Erase Sector command does not function on
EEPROM for PSOC 3 ES1 and ES2 silicon or on PSOC
5 ES1 silicon. This API can be used on EEPROM for
PSOC 3 ES3 or later.
Added EEPROM_Enable(),
EEPROM_Start(), and EEPROM_Stop()
APIs.
To support PSoC 3 ES3 silicon requirement that the
EEPROM is powered off by default.
A call to EEPROM_Start() will call EEPROM_Enable().
You can call either EEPROM_Start() or
EEPROM_Enable() function directly; both have the
same effect.
Moved component into subfolders of the
component catalog.
Added information to the component that
advertizes its compatibility with silicon
revisions.
The tool reports an error/warning if the component is
used on incompatible silicon. If this happens, update to
a revision that supports your target device.
The Configure dialog was updated.
Digital Port was changed to Pins component in the
schematic.
© Cypress Semiconductor Corporation, 2009-2010. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the
use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to
be used for medical, life support, life saving, critical control or safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize its
products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress
products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
PSoC® is a registered trademark, and PSoC Creator™ and Programmable System-on-Chip™ are trademarks of Cypress Semiconductor Corp. All other trademarks or registered trademarks
referenced herein are property of the respective corporations.
Any Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and
foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create
derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in
conjunction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source Code except as
specified above is prohibited without the express written permission of Cypress.
Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described herein.
Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in lifesupport systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support systems application
implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
Use may be limited by and subject to the applicable Cypress software license agreement.
Page 6 of 6
Document Number: 001-61982 Rev. *A
Similar pages