How does it work?
MRAM 2 Click is based on the MR10Q010, 1Mb Quad Output High-Speed Serial SPI MRAM memory solution from Everspin Technologies. The MR10Q010 is the ideal memory solution for applications that must store and retrieve data and programs quickly using a small number of pins, low power, and the space-saving 16-pin SOIC package. The four I/O’s in Quad SPI mode allow very fast reads and writes, making it an attractive alternative to conventional parallel data bus interfaces in next-generation RAID controllers, server system logs, storage device buffers, and embedded system data and program memory.
This Click board™ includes an LDO regulator BH18PB1WHFVCT from Rohm Semiconductor to provide the 1.8 V supply voltage. The LDO cut power consumption by lowering its current consumption to approximately 2 μA when the application is operating in the standby state. During normal-current operation, it will automatically switch to high-speed operating mode. The output from the LDO regulator is providing a needed reference voltage for one side of the TXB0106, a 6bit bidirectional level shifting and voltage translator with automatic direction sensing, from Texas Instruments. The reference voltage for the other side of the level shifter is taken from the 3.3V pin from the mikroBUS™.
The MRAM 2 Click communicates with MCU using the standard SPI serial interface that supports SPI Mode 0 and 3 and operates at clock rates up to 104 MHz. It also supports modes like Quad Peripheral Interface (QPI) and Quad SPI organized as 131.072 words of 8 bits. Both read and write operations can occur randomly in memory with no delay between writes. The MR10Q010 uses Write Protect signal routed to the RST pin on the mikroBUS™ to prevent write operations to the Status Register, while HOLD signal routed to the INT pin on the mikroBUS™ is used to interrupts a memory operation for another task. When HOLD is low, the current operation is suspended.
This Click Board™ is designed to be operated only with a 3.3V logic level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with different logic levels. More information about the MR10Q010 can be found in the attached datasheet. However, the Click board™ comes equipped with a library that contains easy to use functions and a usage example that can be used as a reference for the development.
Specifications
Type
MRAM
Applications
Can be used both as a non-volatile storage media, or temporary RAM expansion for storing data in any embedded application.
On-board modules
MRAM 2 Click is based on the MR10Q010, 1Mb Quad Output High-Speed Serial SPI MRAM memory solution from Everspin Technologies.
Key Features
Low power consumption, high bandwidth, data protection, unlimited write endurance, tamper detect function, 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 2 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 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.5 | – | 4.3 | V |
Maximum Output Current | – | – | 20 | mA |
SPI Clock Frequency | – | – | 104 | MHz |
Operating Temperature Range | -45 | – | +95 | V |
Software Support
We provide a library for the MRAM 2 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
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 :
- System Initialization – Initializes SPI module, LOG structure, sets CS, RTS and INT pins as output.
- Application Initialization – Initalizes SPI driver and sets up the device.
- Application Task – This example shows capabilities of MRAM 2 Click board by writting “MikroE” into first 6 memory locations, and then reading it back.
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 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- SPI
- UART
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.
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.