MRAM Click Board
MRAM Click Board
The MRAM Click Board™ features the Everspin MR25H256A MRAM module that contains 262,144 magnetoresistive memory cells, organized into 32,768 bytes of memory. It means that MRAM Click Board™ is a memory storage device with 32KB of memory space. The used memory module can withstand an unlimited number of write cycles, it has a data retention period greater than 20 years and it can read and write to random addresses with no delay.
Software Support
We provide a library for the MRAM Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
Library Description
Initializes and defines SPI bus driver and driver functions which are used for storing data to memory and for reading memory.
Library also communicates with the Status register. For more details check the documentation.
Key functions
uint8_t mram_checkStatusBit(uint8_t status_bit)
- The function checks one bit from the Status register determined by the function parameter.
void mram_readDataBytes(const uint16_t address, uint8_t *buffer, const uint16_t nBytes)
- The function reads a number of bytes determined by the nBytes parameter from the memory to the buffer with start address determined by the address parameter.
void mram_writeDataBytes(const uint16_t address, uint8_t *buffer, const uint16_t nBytes)
- The function writes a number of bytes determined by the nBytes parameter from the buffer to memory with start address determined by address parameter.
void mram_enableHoldMode(uint8_t state)
- A low on the Hold pin interrupts a memory operation for another task.
Examples Description
The application is composed of three sections :
- System Initialization - Initializes peripherals and pins.
- Application Initialization - Initializes click driver.
- Application Task - Writes 6 bytes of buffer data in the memory with start address 0x0000. Then reads 3 bytes from the memory with start address 0x0002 and shows the result on USB UART.
void applicationTask() { uint8_t numberBytesWrite; uint8_t numberBytesRead; char txt[20] = {0}; uint16_t i; numberBytesWrite = 6; numberBytesRead = 3; mram_writeDataBytes(0x0000, &data_write[0], numberBytesWrite); mram_readDataBytes(0x0002, &data_read[0], numberBytesRead); for(i = 0; i < numberBytesRead; i++) { WordToStr(data_read[i], txt); mikrobus_logWrite(txt, _LOG_LINE); } Delay_ms(2000); }
The full application code, and ready to use projects can be found on our LibStock page.
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The MRAM 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.
MRAM Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.