SPRUHX5I August 2014 – May 2024 TMS320F28374S , TMS320F28375S , TMS320F28375S-Q1 , TMS320F28376S , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28378S , TMS320F28379S
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