Significantly improve your solution by storing more data, enabling faster data access, and consuming less energy than existing electronic memory
A
A
Hardware Overview
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 quickly store and retrieve data and programs 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 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 cuts power consumption by lowering its current
consumption to approximately 2μA when the application operates in the standby state. During normal-current operation, it will automatically switch to high-speed operating mode. The LDO regulator output provides a needed reference voltage for one side of the TXB0106, a 6-bit 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 without delay between writes. The MR10Q010 uses a Write Protect signal routed to the RST pin on the mikroBUS™ to prevent write operations to the Status Register, while the HOLD signal routed to the INT pin on the mikroBUS™ is used to interrupt 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. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Features overview
Development board
Fusion for ARM v8 is a development board specially designed for the needs of rapid development of embedded applications. It supports a wide range of microcontrollers, such as different ARM® Cortex®-M based MCUs regardless of their number of pins, and a broad set of unique functions, such as the first-ever embedded debugger/programmer over WiFi. The development board is well organized and designed so that the end-user has all the necessary elements, such as switches, buttons, indicators, connectors, and others, in one place. Thanks to innovative manufacturing technology, Fusion for ARM v8 provides a fluid and immersive working experience, allowing access anywhere and under any
circumstances at any time. Each part of the Fusion for ARM v8 development board contains the components necessary for the most efficient operation of the same board. An advanced integrated CODEGRIP programmer/debugger module offers many valuable programming/debugging options, including support for JTAG, SWD, and SWO Trace (Single Wire Output)), and seamless integration with the Mikroe software environment. Besides, it also includes a clean and regulated power supply module for the development board. It can use a wide range of external power sources, including a battery, an external 12V power supply, and a power source via the USB Type-C (USB-C) connector.
Communication options such as USB-UART, USB HOST/DEVICE, CAN (on the MCU card, if supported), and Ethernet is also included. In addition, it also has the well-established mikroBUS™ standard, a standardized socket for the MCU card (SiBRAIN standard), and two display options for the TFT board line of products and character-based LCD. Fusion for ARM v8 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU
Type
8th Generation
Architecture
ARM Cortex-M4
MCU Memory (KB)
1024
Silicon Vendor
Texas Instruments
Pin count
128
RAM (Bytes)
262144
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic
Step by step
Project assembly
Track your results in real time
Application Output via UART Mode
1. Once the code example is loaded, pressing the "FLASH" button initiates the build process, and programs it on the created setup.
2. After the programming is completed, click on the Tools icon in the upper-right panel, and select the UART Terminal.
3. After opening the UART Terminal tab, first check the baud rate setting in the Options menu (default is 115200). If this parameter is correct, activate the terminal by clicking the "CONNECT" button.
4. Now terminal status changes from Disconnected to Connected in green, and the data is displayed in the Received data field.
Software Support
Library Description
This library contains API for MRAM 2 Click driver.
Key functions:
mram2_wren
- Write Enable functionmram2_read
- Read Data Bytes functionmram2_write
- Write Data Bytes function
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* \file
* \brief Mram2 Click example
*
* # Description
* This example demonstrates the use of MRAM 2 Click board.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes the driver, sets the write protect and disables the hold signal.
*
* ## Application Task
* Writes "MikroE" into the first 6 memory locations, and then reads it back
* and displays it to the USB UART approximately every 5 seconds.
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "mram2.h"
// ------------------------------------------------------------------ VARIABLES
static mram2_t mram2;
static log_t logger;
char val_in[ 7 ] = { 'M', 'i', 'k', 'r', 'o', 'E', 0 };
char val_out[ 7 ] = { 0 };
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
mram2_cfg_t cfg;
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
// Click initialization.
mram2_cfg_setup( &cfg );
MRAM2_MAP_MIKROBUS( cfg, MIKROBUS_1 );
mram2_init( &mram2, &cfg );
log_printf( &logger, "------------------- \r\n" );
log_printf( &logger, " MRAM 2 Click \r\n" );
log_printf( &logger, "------------------- \r\n" );
mram2_write_protect( &mram2, MRAM2_WP_ENABLE );
mram2_hold( &mram2, MRAM2_HLD_DISABLE );
log_printf( &logger, " Initialized \r\n" );
log_printf( &logger, "------------------- \r\n" );
Delay_ms ( 100 );
}
void application_task ( void )
{
mram2_wren( &mram2 );
log_printf( &logger, "Write enabled!\r\n" );
Delay_ms ( 100 );
log_printf( &logger, "Writing \"%s\" to memory...\r\n", val_in );
mram2_write( &mram2, 0x000000, &val_in[ 0 ], 6 );
Delay_ms ( 100 );
mram2_wrdi ( &mram2 );
log_printf( &logger, "Write disabled!\r\n" );
Delay_ms ( 100 );
mram2_read ( &mram2, 0x000000, &val_out[ 0 ], 6 );
log_printf( &logger, "Read data : %s\r\n", val_out );
log_printf( &logger, "-------------------\r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END
/*!
* \file
* \brief Mram2 Click example
*
* # Description
* This example demonstrates the use of MRAM 2 Click board.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes the driver, sets the write protect and disables the hold signal.
*
* ## Application Task
* Writes "MikroE" into the first 6 memory locations, and then reads it back
* and displays it to the USB UART approximately every 5 seconds.
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "mram2.h"
// ------------------------------------------------------------------ VARIABLES
static mram2_t mram2;
static log_t logger;
char val_in[ 7 ] = { 'M', 'i', 'k', 'r', 'o', 'E', 0 };
char val_out[ 7 ] = { 0 };
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
mram2_cfg_t cfg;
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
// Click initialization.
mram2_cfg_setup( &cfg );
MRAM2_MAP_MIKROBUS( cfg, MIKROBUS_1 );
mram2_init( &mram2, &cfg );
log_printf( &logger, "------------------- \r\n" );
log_printf( &logger, " MRAM 2 Click \r\n" );
log_printf( &logger, "------------------- \r\n" );
mram2_write_protect( &mram2, MRAM2_WP_ENABLE );
mram2_hold( &mram2, MRAM2_HLD_DISABLE );
log_printf( &logger, " Initialized \r\n" );
log_printf( &logger, "------------------- \r\n" );
Delay_ms ( 100 );
}
void application_task ( void )
{
mram2_wren( &mram2 );
log_printf( &logger, "Write enabled!\r\n" );
Delay_ms ( 100 );
log_printf( &logger, "Writing \"%s\" to memory...\r\n", val_in );
mram2_write( &mram2, 0x000000, &val_in[ 0 ], 6 );
Delay_ms ( 100 );
mram2_wrdi ( &mram2 );
log_printf( &logger, "Write disabled!\r\n" );
Delay_ms ( 100 );
mram2_read ( &mram2, 0x000000, &val_out[ 0 ], 6 );
log_printf( &logger, "Read data : %s\r\n", val_out );
log_printf( &logger, "-------------------\r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END