SPRUHM8K December 2013 – May 2024 TMS320F28374D , TMS320F28375D , TMS320F28376D , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28378D , TMS320F28379D , TMS320F28379D-Q1
The value that must be programmed into the RR field of the SDRAM_RCR must can be calculated by using the frequency of the EM1CLK signal (fEM1CLK) and the required refresh rate of the SDRAM (fRefresh). The following formula can be used:
RR = fEM1CLK / fRefresh
The SDRAM data sheet often communicates the required SDRAM Refresh Rate in terms of the number of REFR commands required in a given time interval. The required SDRAM Refresh Rate in the formula above can therefore be calculated by dividing the number of required cycles per time interval (ncycles) by the time interval given in the data sheet (tRefresh Period) :
fRefresh = ncycles / tRefresh Period
Combining these formulas, the value that must be programmed into the RR field can be computed as:
RR = fEM1CLK × tRefresh Period / ncycles
The following example illustrates calculating the value of RR. Given that:
RR can be calculated as:
RR = 100MHz × 64ms/8192
RR = 781.25
RR = 782 cycles = 30Eh cycles