
Apoorv_Sangal wrote:
Hello All, I am customizing Uboot for PowerQuiccII 8266 based PMC card. Can anyone please let me know how the value of the PSDMR register is obtained / calculated? We are using MT48LC16M16A2 SDRAM (SODIMM). Specifically, we are looking or the values of RFRC, PRETOACT, ACTTORW, LDOTOPRE and WRC fields in PSDMR. The datasheet of SDRAM gives those values in nanoseconds. But the PSDMR register in Uboot needs values in clock cycles. Can anyone please tell me how to calculate the values for the required fields (in clock cycles) from the values in the datasheet (in nanosecs)?
Thanks & Regards, Apoorv Sangal.
freq = 1/time time = 1/freq clock cycles = time * freq
Pick the one that matches the problem and use consistent units.
Read the 8266 User's Manual and your board documentation/schematic to determine the frequency that your CPU is clocked at. Use the "ceiling" function on your clock cycles calculation (i.e. "round up").
gvb