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-08-26
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: MRAM
Downloaded: 2105 times
Not followed.
License: MIT license
MRAM 2 Click is a compact add-on board for applications that must store and retrieve data and programs quickly using a small number of pins. This board features the MR10Q010, 1Mb Quad Output High-Speed Serial SPI MRAM memory solution from Everspin Technologies.
Do you want to subscribe in order to receive notifications regarding "MRAM 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "MRAM 2 click" changes.
Do you want to report abuse regarding "MRAM 2 click".
Library Description
The library covers all the necessary functions that enables the usage of the MRAM 2 Click board. It initializes and defines the SPI bus driver and drivers that offer a full functionality of the click board. User has Read Status Register, Write Enable, Write Disable, Write Status Register, Read Data Bytes, Fast Read Data Bytes, Write Data Bytes, Enter Sleep Mode, Exit Sleep, Tamper Detect, Tamper Detect Exit and Read IDfunctions at his disposal.
Key functions:
void mram2_write ( uint32_t mem_adr, uint8_t *wr_data, uint8_t n_bytes );
- The Write Data Bytes function allows data bytes to be written sequentially.void mram2_read ( uint32_t mem_adr, uint8_t *rd_data, uint8_t n_bytes );
- The Read Data Bytes function allows data bytes to be continuously read starting at an initial address.void mram2_wren ( );
- Function is used to enable write operation.Examples description
The application is composed of three sections :
void application_task ( )
{
mikrobus_logWrite( "Write enable!", _LOG_LINE );
mram2_wren( );
Delay_ms( 100 );
mikrobus_logWrite( "Writing : ", _LOG_TEXT );
mikrobus_logWrite( val_in, _LOG_TEXT );
mram2_write( 0x000000, &val_in[ 0 ], 9 );
Delay_ms( 100 );
mikrobus_logWrite( "Write disable!", _LOG_LINE );
mram2_wrdi ( );
Delay_ms( 100 );
mikrobus_logWrite( "Reading : ", _LOG_TEXT );
mram2_read ( 0x000000, &val_out[ 0 ], 9 );
mikrobus_logWrite( val_out, _LOG_TEXT );
mikrobus_logWrite( "-------------------", _LOG_LINE );
Delay_ms( 5000 );
}
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.