Dynamic Random Access Memory (DDR)

Supported ICs[ RTL8730E ]

Overview

DDR (Double Data Rate SDRAM) is the main memory of RTL8730E, and DDR2/DDR3/DDR3L are supported. The storage cells of DDR rely on periodic refresh to retain data, so the refresh interval and the self-refresh mode must match the operating temperature.

Usage Notes

Using DDR in High-Temperature Environments

DDR relies on periodic refresh to maintain data integrity. By default, the SDK configures the refresh interval and the self-refresh mode for normal temperatures (T ≤ 85°C). If the application involves high temperatures (T > 85°C), the user must modify the code as described below to ensure data reliability.

Configuration Rules:

The DDR configuration in different temperature ranges is shown in the table below:

Temperature range

Refresh interval (tREFI)

Self-refresh mode

T ≤ 85°C

7.8μs

Normal-temperature rate

T > 85°C

3.9μs

High-temperature rate (modify MR2, see below)

Note

Set the refresh interval and the self-refresh bit according to the high-temperature requirements in the datasheet of the DRAM in use.

Modification Steps:

  1. Modify the refresh interval.

    Open the ameba_ddr_param_defs.h file in the SDK and change the macro DRAM_REF_TIME to 3900000 (3.9μs). The macro is converted to the tREFI cycle count in rxi316_dram_init() in ameba_rxi316_dram_init.c.

    #define DRAM_REF_TIME            3900000
    
  2. Modify the high-temperature self-refresh bit.

    In the same file, change DDR_MR2_DDR2_OR_VAL and DDR_MR2_DDR3_OR_VAL according to the DRAM type as follows:

    • DDR2: set A7 of MR2 to 1.

    • DDR3: set A6 of MR2 to 1.

    #define DDR_MR2_DDR2_OR_VAL      BIT7
    #define DDR_MR2_DDR3_OR_VAL      BIT6
    

    The MR2 value is written to the DRAM during DDR initialization.

Note

The above is a fixed configuration: DDR runs with high-temperature parameters even at normal temperatures, which slightly increases power consumption. If you need to adjust the refresh interval dynamically according to temperature, please contact Realtek.