How does it work?
MRAM 3 Click as its foundation uses the AS3001204, a 1Mb MRAM memory with an SPI interface and Write Protection feature from Avalanche Technology. The AS3001204 is organized as 128K words of 8 bits each and benefits from 1.000.000 years of data retention combining their unprecedented data storage with excellent energy efficiency. It is highly reliable, lasting 1014 full-memory read/write/erase cycles, which makes this Click board™ suitable for high-reliability applications as a non-volatile storage media or temporary RAM expansion for storing data in any embedded application.
The AS3001204 is an accurate random-access memory allowing both reads and writes to occur randomly in memory. It offers low latency, low power, and scalable non-volatile memory technology. The MRAM technology is analog to Flash technology with SRAM compatible read/write timings (Persistent SRAM, P-SRAM), where data is always non-volatile.
MRAM 3 Click communicates with MCU using the SPI serial interface that supports the Dual/Quad SPI and the two most common modes, SPI Mode 0 and 3, with a maximum SPI frequency of 108MHz. Alongside an SPI-compatible bus interface, the AS3001204 also features an eXecute-In-Place (XIP) functionality which allows completing a series of reading and writing instructions without having to individually load the read or write command for each instruction and hardware/software-based data protection mechanisms.
Hardware Write Protection function, labeled as WP routed to the PWM pin of the mikroBUS™ socket, allows the user to freeze the entire memory area, thus protecting it from Write instructions. The other pin, the IO3 pin routed to the RST pin of the mikroBUS™ socket, represents the bidirectional I/O that transfers data into and out of the device in Dual and Quad SPI modes.
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. However, the Click board™ 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 applications that need data storage and retrieval without incurring significant latency penalties
On-board modules
AS3001204 – 1Mb MRAM memory from Avalanche Technology
Key Features
Virtually unlimited endurance and data, hardware/software-based data protection mechanisms, low power consumption, SPI/QSPI interface, and more
Interface
QSPI,SPI
Feature
No 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 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 |
MRAM 3 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Memory Size | – | – | 1 | Mb |
Endurance | 1014 | – | – | Cycles |
Data Retention | 106 | – | – | Years |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the MRAM 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 MRAM 3 Click driver.
Key functions
-
mram3_memory_write
This function writes a desired number of data bytes starting from the selected memory address. -
mram3_memory_read
This function reads a desired number of data bytes starting from the selected memory address. -
mram3_aug_memory_write
This function writes a desired number of data bytes starting from the selected augmented memory address.
Example Description
This example demonstrates the use of MRAM 3 Click board™ by writing specified data to the memory and reading it back.
void application_task ( void )
{
uint8_t data_buf[ 128 ] = { 0 };
memcpy ( data_buf, DEMO_TEXT_MESSAGE_1, strlen ( DEMO_TEXT_MESSAGE_1 ) );
if ( MRAM3_OK == mram3_memory_write ( &mram3, STARTING_ADDRESS,
data_buf, sizeof ( data_buf ) ) )
{
log_printf ( &logger, "Data written to address 0x%.5LX: %srn", ( uint32_t ) STARTING_ADDRESS,
data_buf );
}
memset ( data_buf, 0, sizeof ( data_buf ) );
if ( MRAM3_OK == mram3_memory_read ( &mram3, STARTING_ADDRESS,
data_buf, sizeof ( data_buf ) ) )
{
log_printf ( &logger, "Data read from address 0x%.5LX: %srn", ( uint32_t ) STARTING_ADDRESS,
data_buf );
Delay_ms ( 3000 );
}
memcpy ( data_buf, DEMO_TEXT_MESSAGE_2, strlen ( DEMO_TEXT_MESSAGE_2 ) );
if ( MRAM3_OK == mram3_memory_write ( &mram3, STARTING_ADDRESS,
data_buf, sizeof ( data_buf ) ) )
{
log_printf ( &logger, "Data written to address 0x%.5LX: %srn", ( uint32_t ) STARTING_ADDRESS,
data_buf );
}
memset ( data_buf, 0, sizeof ( data_buf ) );
if ( MRAM3_OK == mram3_memory_read ( &mram3, STARTING_ADDRESS,
data_buf, sizeof ( data_buf ) ) )
{
log_printf ( &logger, "Data read from address 0x%.5LX: %srnn", ( uint32_t ) STARTING_ADDRESS,
data_buf );
Delay_ms ( 3000 );
}
}
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.MRAM3
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 MikroElektronika compilers.
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.