SPRUII0F May 2019 – June 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
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