We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2020-09-30
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: SRAM
Downloaded: 1872 times
Not followed.
License: MIT license
SRAM 3 Click is a 1Mb serial SRAM with a non-volatile SONOS storage element included with each memory cell, organized as 128k words of 8 bits each. This board features the ANV32AA1WDK66 a SRAM memory from Anvo-System Dresden.
Do you want to subscribe in order to receive notifications regarding "SRAM 3 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "SRAM 3 click" changes.
Do you want to report abuse regarding "SRAM 3 click".
Library Description
Library provides functions for communicating with device via SPI module, functions for reading and writing to memory as well as some protective functions to prevent data corruption.
Key functions:
void sram3_read( uint32_t mem_adr, uint8_t *read_buf, uint8_t buf_size )
- Function for reading data from memmoryuint8_t sram3_secure_read( uint32_t mem_adr, uint8_t *read_buf )
- Function for reading data from memmory with crc checksum for data validationvoid sram3_write( uint32_t mem_adr, uint8_t *write_buf, uint8_t buf_size )
- Function for writing data to memmoryvoid sram3_secure_write( uint32_t mem_adr, uint8_t *write_buf )
- Function for writing data to memmory with crc checksum for data validationExamples description
The application is composed of three sections :
void application_task ( )
{
uint8_t buff_out[ 10 ] = { 0 };
mikrobus_logWrite( "Writing "MikroE" to memory...", _LOG_LINE );
sram3_enable_write( );
sram3_write( 0x00, &buf[ 0 ], 6 );
Delay_100ms( );
mikrobus_logWrite( "Data read from memory: ", _LOG_TEXT );
sram3_read( 0x00, &buff_out[ 0 ], 6 );
mikrobus_logWrite( &buff_out[ 0 ], _LOG_LINE );
mikrobus_logWrite( "---------------------------------------------", _LOG_LINE );
Delay_1sec( );
}
Other mikroE Libraries used in the example:
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.