nvSRAM 4 Click Board
nvSRAM 4 Click Board
The nvSRAM 4 Click Board™ is a compact add-on board that contains the most reliable nonvolatile memory. This board features the CY14B101PA, a 1-Mbit nvSRAM with a fully-featured real-time clock from Cypress Semiconductor. The memory is organized as 128K words of 8 bits each, where the embedded elements incorporate the QuantumTrap technology that provides highly reliable, nonvolatile data storage. It provides infinite read and writes cycles with an additional automatic backup switch. Data transfer, initiated by the user through SPI commands, takes place automatically at Power-Down. On the other hand, during the Power-Up, data is restored to the SRAM from the nonvolatile memory. This Click Board™ is suitable for all applications that require fast access and high reliability of stored data, and unlimited endurance.
The nvSRAM 4 Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
Software Support
We provide a library for the nvSRAM 4 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on the mikroE Github account.
Library Description
This library contains API for nvSRAM4 Click Board™ driver.
Key Functions
void nvsram4_cfg_setup ( nvsram4_cfg_t *cfg );
- Config Object Initialization function.NVSRAM4_RETVAL nvsram4_init ( nvsram4_t *ctx, nvsram4_cfg_t *cfg );
- Initialization function.void nvsram4_default_cfg ( nvsram4_t *ctx );
- Click Default Configuration function.
Example Description
This is an example that demonstrates the use of the nvSRAM 4 Click board™.
The demo application is composed of two sections :
void application_task ( void ) { nvsram4_get_rtc_time( &nvsram4, &time ); Delay_ms( 1 ); nvsram4_get_rtc_date( &nvsram4, &date ); Delay_ms( 1 ); if ( time.sec != new_sec ) { log_printf( &logger, " Date : %.2d-%.2d-%.2drn", ( 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; Delay_ms( 10 ); if ( date.year != c_year ) { log_printf( &logger, " Happy New Year rn" ); c_year = date.year; Delay_ms( 10 ); } else { nvsram4_burst_read_memory( &nvsram4, memory_addr, &rx_data[ 0 ], 9 ); log_printf( &logger, " Read data : %s", rx_data ); } log_printf( &logger, "-----------------------rn" ); } else { Delay_ms( 1 ); } } 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.nvSRAM4
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The nvSRAM4 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.
nvSRAM 4 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.