TOP Contributors

  1. MIKROE (2780 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139569 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57257 times)
  4. USB Device Library (47631 times)
  5. Network WiFi Library (43228 times)
  6. FT800 Library (42566 times)
  7. GSM click (29932 times)
  8. mikroSDK (28293 times)
  9. PID Library (26934 times)
  10. microSD click (26309 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

ReRAM Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.17

mikroSDK Library: 2.0.0.0

Category: ReRAM

Downloaded: 338 times

Not followed.

License: MIT license  

ReRAM Click features ReRAM (Resistive Random Access Memory) module which contains the cell array made of 524.288 words x 8 bits, which totals 4 Mbits of data. The used memory module can withstand a large number of write cycles, it has data retention period greater than 10 years and it can read and write to random addresses with no delay.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "ReRAM Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "ReRAM Click" changes.

Do you want to report abuse regarding "ReRAM Click".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


ReRAM Click

ReRAM Click features ReRAM (Resistive Random Access Memory) module which contains the cell array made of 524.288 words x 8 bits, which totals 4 Mbits of data. The used memory module can withstand a large number of write cycles, it has data retention period greater than 10 years and it can read and write to random addresses with no delay.

reram_click.png

Click Product page


Click library

  • Author : Nemanja Medakovic
  • Date : Oct 2019.
  • Type : SPI type

Software Support

We provide a library for the Reram 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.

Library Description

This library contains API for Reram Click driver.

Standard key functions :

  • Configuration Object Setup function.

    void reram_cfg_setup( reram_cfg_t *cfg );

  • Click Initialization function.

    reram_err_t reram_init( reram_t ctx, reram_cfg_t cfg );

  • Click Default Configuration function.

    void reram_default_cfg ( reram_t *ctx );

Example key functions :

  • Command Send function.

    reram_err_t reram_send_cmd( reram_t *ctx, reram_spi_data_t cmd_code );

  • Status Read function.

    reram_spi_data_t reram_read_status( reram_t *ctx );

  • Memory Write function.

    reram_err_t reram_write_memory( reram_t ctx, uint32_t mem_addr, reram_spi_data_t data_in, uint16_t n_bytes );

Examples Description

This example demonstrates the use of the ReRAM Click board.

The demo application is composed of two sections :

Application Init

Initializes SPI serial interface and puts a device to the initial state. Data from 0 to 255 will be written in memory block from address 0x0 to address 0xFF.


void application_init( void )
{
    reram_cfg_t reram_cfg;
    log_cfg_t logger_cfg;

    //  Click object initialization.
    reram_cfg_setup( &reram_cfg );
    RERAM_MAP_MIKROBUS( reram_cfg, MIKROBUS_1 );
    reram_init( &reram, &reram_cfg );

    //  Click start configuration.
    reram_default_cfg( &reram );

    /** 
     * 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( logger_cfg );
    log_init( &logger, &logger_cfg );

    reram_wake_up( &reram );

    uint32_t id_data = reram_read_id( &reram );

    if ( RERAM_ID_DATA != id_data )
    {
        log_printf( &logger, "***  ReRAM Error ID  ***\r\n" );
        for( ; ; );
    }
    else
    {    
        log_printf( &logger, "***  ReRAM Initialization Done  ***\r\n" );
        log_printf( &logger, "***********************************\r\n" );
    }


    reram_send_cmd( &reram, RERAM_CMD_WREN );
    Delay_ms ( 1000 );
}

Application Task

Reads same memory block starting from address 0x0 to address 0xFF and sends memory content to USB UART, to verify memory write operation.


void application_task( void )
{
    reram_spi_data_t data_out;
    static uint16_t mem_addr = RERAM_MEM_ADDR_START;

    reram_read_memory( &reram, mem_addr, &data_out, 1 );

    log_printf( &logger, "* Memory Address [0x%X] : %u", mem_addr, data_out );
    log_write( &logger, "", LOG_FORMAT_LINE );

    if (mem_addr < 0xFF)
    {
        mem_addr++;
    }
    else
    {
        mem_addr = RERAM_MEM_ADDR_START;
    }

    Delay_ms ( 500 );
}

Note

Write Enable Latch is reset after the following operations:

  • After 'Write Disable'command recognition.
  • The end of writing process after 'Write Status' command recognition.
  • The end of writing process after 'Write Memory' command recognition.

Data will not be written in the protected blocks of the ReRAM array.

  • Upper 1/4 goes from address 0x60000 to 0x7FFFF.
  • Upper 1/2 goes from address 0x40000 to 0x7FFFF.
  • The entire ReRAM array goes from address 0x00000 to 0x7FFFF.

The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.

Other mikroE Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.Reram

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.


ALSO FROM THIS AUTHOR

Hall Current 10 Click

0

Hall Current 10 Click is a compact add-on board that provides economical and precise AC or DC current sensing solutions. This board features the ACHS-7194, a fully integrated Hall-effect-based isolated linear current sensor designed for the current range of ±40A from Broadcom Limited. Inside ACHS-7194 is a precise, low-offset, linear Hall circuit with a copper conduction path located near the surface of the die. Applied current flowing through this copper conduction path generates a magnetic field that the differential Hall sensors convert into a proportional voltage, where after that, the user is given the option to process the output voltage as an analog or digital value. This Click board™ is suitable for AC or DC current-sensing in industrial, commercial, and communications systems.

[Learn More]

Surface Temp click

5

The Surface Temp Click is a Click board equipped with the ADT7420, high accuracy digital temperature sensor offering breakthrough performance over a wide industrial range. Surface Temp Click is supported by a mikroSDK compliant library, which includes functions that simplify software development.

[Learn More]

Magneto 5 click

5

Magneto 5 click is a very accurate and reliable magnetic sensor device, which features the MEMSIC MMC34160PJ, a 3-axis magnetic sensor IC.

[Learn More]