How does it work?
MRAM 4 Click is based on the EM064LXQADG13IS1R, an industrial STT-MRAM persistent memory from Everspin Technologies. It can deliver up to 400Mbps reads and writes via eight I/O signals with a clock frequency 200MHz. As this is a persistent memory, byte-level writes and reads do not require erasing. Nonvolatile settings are not reflow protected, which you have to keep in mind. A dedicated 256-byte OTP area outside the main memory is readable and user-lockable, with a permanent lock WRITE OTP command. The EM064LX is capable of chip/bulk and sector erase. Subsector erase is possible in 4KB, 32KB granularity. In addition, the MRAM memory features 16 configurable hardware write-protected regions plus top/bottom select, program/erase protection during power-up, and CRC command to detect accidental changes to user data.
As the EM064LXQADG13IS1R works at the recommended 1.8V voltage, the MRAM 4 Click is equipped with a BH18PB1WHFV, a CMOS LDO regulator from Rohm Semiconductor. To work with different logic level voltage, this Click board™ comes with a TXB0106, a 6-bit bidirectional level-shifting and voltage translator from Texas Instruments. On board, there are two unpopulated jumpers labeled R5 and R6. The chip select and write protection can be pulled up for further hardware development.
MRAM 4 Click uses a standard 4-Wire SPI serial interface to communicate with the host MCU. You can use write protection functionality over the WP pin. The hardware reset is available over the HLD pin, whereas in the low logic state, the memory will self-initialize and return the device to the ready state. There is an unpopulated R6 resistor for an external pull-up, as this pin shouldn’t be allowed to float.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. Also, it comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Specifications
Type
MRAM
Applications
Can be used for the development of applications that need data storage and retrieval without incurring significant latency penalties
On-board modules
EM064LXQADG13IS1R – industrial STT-MRAM persistent memory from Everspin Technologies
Key Features
Security and write protections, erase capability as bulk and subsector, dedicated OTP area outside main memory, wide range SPI compatibility, low power modes, data integrity, 10 years of data retention, data endurance with unlimited read, write, and erase operations, and more
Interface
SPI
Feature
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 MRAM 4 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 |
R4 | – | Unpopulated | Write Protection Signal Pull-Up Resistor |
R5 | – | Unpopulated | Chip Select Signal Pull-Up Resistor |
R6 | – | Unpopulated | Hold Signal Pull-Up Resistor |
MRAM 4 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Memory Size | – | – | 64 | Mb |
Memory Organization | 8M x 8 |
Software Support
We provide a library for the MRAM 4 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for MRAM 4 Click driver.
Key functions
-
mram4_memory_write
MRAM 4 memory write function. -
mram4_memory_read
MRAM 4 memory read function. -
mram4_block_erase
MRAM 4 block erase function.
Example Description
This example demonstrates the use of MRAM 4 Click board™. The demo app writes specified data to the memory and reads it back.
void application_task ( void )
{
uint8_t data_buf[ 128 ] = { 0 };
log_printf( &logger, " Memory address: 0x%.6LXrn", ( uint32_t ) STARTING_ADDRESS_1 );
if ( MRAM4_OK == mram4_block_erase( &mram4, MRAM4_CMD_ERASE_4KB, STARTING_ADDRESS_1 ) )
{
log_printf( &logger, " Erase memory block (4KB)rn" );
Delay_ms( 100 );
}
memcpy( data_buf, DEMO_TEXT_MESSAGE_1, strlen( DEMO_TEXT_MESSAGE_1 ) );
if ( MRAM4_OK == mram4_memory_write( &mram4, STARTING_ADDRESS_1, data_buf, sizeof( data_buf ) ) )
{
log_printf( &logger, " Write data: %srn", data_buf );
Delay_ms( 100 );
}
memset( data_buf, 0, sizeof( data_buf ) );
if ( MRAM4_OK == mram4_memory_read( &mram4, STARTING_ADDRESS_1, data_buf, sizeof( data_buf ) ) )
{
log_printf( &logger, " Read data: %srn", data_buf );
Delay_ms( 3000 );
}
log_printf( &logger, " ----------------------------rn" );
log_printf( &logger, " Memory address: 0x%.6LXrn", ( uint32_t ) STARTING_ADDRESS_2 );
if ( MRAM4_OK == mram4_block_erase( &mram4, MRAM4_CMD_ERASE_4KB, STARTING_ADDRESS_2 ) )
{
log_printf( &logger, " Erase memory block (4KB)rn" );
}
memcpy( data_buf, DEMO_TEXT_MESSAGE_2, strlen( DEMO_TEXT_MESSAGE_2 ) );
if ( MRAM4_OK == mram4_memory_write( &mram4, STARTING_ADDRESS_2, data_buf, sizeof( data_buf ) ) )
{
log_printf( &logger, " Write data: %srn", data_buf );
Delay_ms( 100 );
}
memset( data_buf, 0, sizeof( data_buf ) );
if ( MRAM4_OK == mram4_memory_read( &mram4, STARTING_ADDRESS_2, data_buf, sizeof( data_buf ) ) )
{
log_printf( &logger, " Read data: %srn", data_buf );
Delay_ms( 3000 );
}
log_printf ( &logger, " ----------------------------rn" );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.MRAM4
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. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE 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.