How does it work?
nvSRAM 3 Click as its foundation uses the CY14B101I, a 1-Mbit nvSRAM organized as 128K words of 8 bits each with a fully-featured real-time clock from Infineon. The CY14B101I specifies one million endurance cycles for cells with data retention of a minimum of 20 years, while the QuantumTrap cells provide highly reliable nonvolatile storage of data. In system power loss, data from the SRAM is automatically transferred to its nonvolatile cell 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 consumes when data transfer happens from the SRAM cells to nonvolatile cells during the Power-Down.
This Click board™ can be permanently powered by placing jumpers labeled as RTC-CAP or RTC-BATT. By utilizing an automatic backup, the CY14B101I uses an external battery power source from the button cell battery holder, suitable for 12mm Coin Cell batteries, when there is no power supply on its main power terminals allowing for uninterrupted operation.
nvSRAM 3 Click communicates with MCU using standard I2C 2-Wire interface, with clock frequency up to 100kHz in the Standard, 400kHz in the Fast, 1MHz in FastPlus, and up to 3.4MHz in High-Speed Mode. The CY14B101I offers zero cycle delay write operation with infinite SRAM write endurance. 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 Write Protection and Interrupt functions labeled as WP and INT routed on the PWM and INT pins of the mikroBUS™ socket. The WP pin is an active-high pin that protects the entire memory and all registers from write operations. MCU must hold the WP pin high to inhibit all the write operations. When this pin is high, all memory and register writes are prohibited, and the address counter does not increment. On the other hand, the CY14B101I can use INT pin in several ways, such as interrupt output, calibration, or a square wave, programmable to respond to the clock alarm, the watchdog timer, and the power monitor.
The STORE operation of the CY14B101I can be controlled and acknowledged via the HSB pin, routed on the RST pin of the mikroBUS™ socket. If no STORE/RECALL is in progress, the CY14B101I can use this pin to request a hardware STORE cycle. When the HSB pin is in a LOW logic state, the CY14B101I conditionally initiates a STORE operation.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before use with MCUs with different logic levels. However, the Click board™ comes equipped with a library that contains functions and an example code that can be used, as a reference, for further development.
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
CY14B101I – a 1-Mbit nvSRAM organized as 128K words of 8 bits each with a fully-featured real-time clock from Cypress Semiconductor
Key Features
Low power consumption, 1-Mbit nonvolatile static random access memory, high reliability, high speed interface, write protection feature, real-time clock, and more.
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on nvSRAM 3 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 0/1: Left position 0, Right position 1 |
JP3 | RTC-BATT | Unpopulated | RTC Battery Backup Selection |
JP4 | RTC-CAP | Populated | RTC Capacitor Backup Selection |
nvSRAM 3 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Memory Size | – | 1 | – | Mbit |
nvSRAM Write Endurance | 1.000.000 | – | – | Write Cycles |
nvSRAM Data Retention | 20 | – | – | Years |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the nvSRAM 3 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Library Description
This library contains API for nvSRAM 3 Click driver.
Key functions:
nvsram3_cfg_setup
– Config Object Initialization function.nvsram3_init
– Initialization function.nvsram3_default_cfg
– Click Default Configuration function.
Examples description
The demo application shows how to write/read data to/from nvSRAM memory. It also sets RTC date and time, then reads it in an infinite loop and displays results on USB UART each second.
The demo application is composed of two sections :
void application_task ( void ) { nvsram3_get_rtc_time( &nvsram3, &time ); nvsram3_get_rtc_date( &nvsram3, &date ); if ( time.sec != new_sec ) { log_printf( &logger, " Date : %.2d-%.2d-%.4drn", ( uint16_t ) date.day, ( uint16_t ) date.month, ( uint16_t ) date.year ); log_printf( &logger, " Time : %.2d:%.2d:%.2drn", ( uint16_t ) time.hours, ( uint16_t ) time.min, ( uint16_t ) time.sec ); log_printf( &logger, "- - - - - - - - - - - - - - -rn" ); new_sec = time.sec; if ( date.year != c_year ) { log_printf( &logger, " Happy New Year rn" ); c_year = date.year; } else { nvsram3_memory_read( &nvsram3, memory_addr, &rx_data[ 0 ], 9 ); log_printf( &logger, " Read data : %s", rx_data ); } log_printf( &logger, "-----------------------rn" ); } else { Delay_ms( 500 ); } }
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Other mikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.nvSRAM3
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.