How does it work?
nvSRAM Click is based on the CY14B101J, a 1-Mbit nvSRAM organized as 128K words of 8 bits each with a nonvolatile element in each memory cell from Infineon. The CY14B101J integrates an SRAM cell and a nonvolatile memory cell into a single nvSRAM cell. In the Normal mode, all reads and writes happen directly from and to the SRAM portion of the nvSRAM. This provides faster write and read access compared to any existing nonvolatile memory technology such as EEPROM and Flash.
The nvSRAM specifies one million endurance cycles for nonvolatile cells with data retention of a minimum of 20 years. In the event of system power loss, data from the SRAM is transferred to its nonvolatile cell automatically by using energy stored in a capacitor labeled as C2. During the Power-Up, data from the nonvolatile cell is recalled automatically in the SRAM array and available to the user. The endurance cycle is consumed only when data transfer happens from the SRAM cells to nonvolatile cells during the Power-Down.
nvSRAM Click communicates with MCU using the standard I2C 2-Wire interface with a clock frequency up to 100kHz in the Standard, up to 400kHz in the Fast, up to 1MHz in the FastPlus, and up to 3.4MHz in the High-Speed Mode. The CY14B101J offers zero cycle delay write operation with infinite SRAM write endurance. Besides, it also allows the choice of the least significant bit (LSB) of its I2C slave address by positioning SMD jumpers labeled as ADDR SEL to an appropriate position marked as 0 and 1.
An additional feature of this Click board™ represents the configurable Write Protection function labeled as WP routed on the PWM pin of the mikroBUS™ socket. The WP pin is an active-high pin that protects the entire memory and all registers from write operations. This pin must be held high to inhibit all the write operations. When this pin is high, all memory and register writes are prohibited, and the address counter is not incremented.
This Click board™ is designed to be operated only with a 3.3V logic voltage level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with different logic levels.
Specifications
Type
SRAM
Applications
Can be used for all applications that require fast access and high reliability of stored data, and unlimited endurance.
On-board modules
nvSRAM Click is based on the CY14B101J, a 1-Mbit nvSRAM organized as 128K words of 8 bits each with a nonvolatile element in each memory cell from Cypress Semiconductor.
Key Features
Low power consumption, 1-Mbit nonvolatile static random access memory, high reliability, high speed interface, write protection feature, and more.
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on nvSRAM Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1-JP2 | ADDR SEL | Left | I2C Address Selection: Left position 0, Right position 1 |
nvSRAM Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.5 | 3.3 | 4.1 | V |
Memory Size | – | – | 1 | Mbit |
nvSRAM Write Endurance | 1.000.000 | – | – | Write Cycles |
nvSRAM Data Retention | 20 | – | – | Years |
Operating Temperature Range | -40 | – | +85 | °C |
Software Support
We provide a library for the nvSRAM Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control nvSRAM Click board™. Library performs a standard I2C interface communication.
Key functions:
uint32_t nvsram_read_dev_id ( void )
– Read device ID function.void nvsram_memory_write ( uint32_t mem_adr, uint8_t *p_tx_data, uint16_t n_bytes )
– Write memory function.void nvsram_memory_read ( uint32_t mem_adr, uint8_t *p_rx_data, uint16_t n_bytes )
– Read memory function.
Examples description
The application is composed of three sections :
- System Initialization – Initializes I2C, set PWM pin as outputs, begins to write log.
- Application Initialization – Initialization driver enables – I2C, lock Serial Number write, disable Block Protection and enable Memory Write, also write log.
- Application Task – (code snippet) This is an example that demonstrates the use of the nvSRAM Click board™. In this example, we write and then read data from nvSRAM memory. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes approximately for every 5 sec.
void application_task ( ) { mikrobus_logWrite( " Write data : ", _LOG_TEXT ); mikrobus_logWrite( demo_data, _LOG_TEXT ); nvsram_memory_write( 12345, &demo_data[ 0 ], 9 ); mikrobus_logWrite( "- - - - - - - - - - - -", _LOG_LINE ); Delay_ms( 100 ); mikrobus_logWrite( " Read data : ", _LOG_TEXT ); nvsram_memory_read( 12345, &read_data[ 0 ], 9 ); mikrobus_logWrite( read_data, _LOG_TEXT ); mikrobus_logWrite( "-----------------------", _LOG_LINE ); Delay_ms( 5000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.