A method for determining a frequency (Sref clk) for performing self-refresh and self-correction operation in a Dynamic Random Access Memory, DRAM, array comprising: - measuring an operating temperature; - determining an optimal frequency that minimizes a number of errors likely to occur based on the measured operating temperature; and - setting the frequency (Sref clk) for performing self-refresh and self-correction operations at the determined optimal frequency, wherein each self-correction operation includes: • detecting whether the DRAM array includes an error; and • correcting the DRAM array when an error is detected; further comprising: - providing a table classifying DRAM arrays into several categories, each category being associated with a respective range of accumulated errors likely to occur over a predetermined number of cycles of self-refresh and self-correction operations; - accumulating a number of errors occurring over the predetermined number of cycles of self-refresh and self-correction operations; - determining the category of the DRAM array based on the accumulated number of errors; and - determining the optimal frequency based on the measured operating temperature and the determined category. - measuring an operating temperature; - determining an optimal frequency that minimizes a number of errors likely to occur based on the measured operating temperature; and - setting the frequency (Sref clk) for performing self-refresh and self-correction operations at the determined optimal frequency, wherein each self-correction operation includes: • detecting whether the DRAM array includes an error; and • correcting the DRAM array when an error is detected; further comprising: - providing a table classifying DRAM arrays into several categories, each category being associated with a respective range of accumulated errors likely to occur over a predetermined number of cycles of self-refresh and self-correction operations; - accumulating a number of errors occurring over the predetermined number of cycles of self-refresh and self-correction operations; - determining the category of the DRAM array based on the accumulated number of errors; and - determining the optimal frequency based on the measured operating temperature and the determined category. • detecting whether the DRAM array includes an error; and • correcting the DRAM array when an error is detected; further comprising: - providing a table classifying DRAM arrays into several categories, each category being associated with a respective range of accumulated errors likely to occur over a predetermined number of cycles of self-refresh and self-correction operations; - accumulating a number of errors occurring over the predetermined number of cycles of self-refresh and self-correction operations; - determining the category of the DRAM array based on the accumulated number of errors; and - determining the optimal frequency based on the measured operating temperature and the determined category. - providing a table classifying DRAM arrays into several categories, each category being associated with a respective range of accumulated errors likely to occur over a predetermined number of cycles of self-refresh and self-correction operations; - accumulating a number of errors occurring over the predetermined number of cycles of self-refresh and self-correction operations; - determining the category of the DRAM array based on the accumulated number of errors; and - determining the optimal frequency based on the measured operating temperature and the determined category.