0

Why does the act of removing the CMOS battery reset BIOS settings and/or clear date and time settings? The settings are probably not stored "in the battery"...

1 Answer 1

4

This is a question that is rooted in partially historical reasoning, and it's changed somewhat with modern machines. Why do we need a battery? The answer is two-fold:

  1. To maintain our BIOS / configuration settings (historical)
  2. To keep date/time current

Regarding number one, prior to the common introduction of non-volatile flash memories at very low cost points, BIOS and other configuration data was retained in volatile SRAM. SRAM is static random-access memory -- it's fast, simple to interface with and doesn't need to be refreshed like DRAM. The downside is that it is volatile -- if you remove power, it'll lose all the data in it. This is why removing the battery could fix issues -- if you made a dumb configuration choice, removing power will make that dumb choice disappear.

Additionally, CMOS stands for complementary metal-oxide semiconductor and is the semiconductor process almost all modern logic is built on these days. It doesn't refer to the battery -- that's a conventional coin-cell chemistry, but colloquially it has become a term to refer to the logic/technology that the battery supports.

Modern machines store not only the BIOS, but also the configuration information on a non-volatile flash memory, usually with a SPI interface. Flash became incredibly cheap, the advent of on-die charge pumps removed the need for separate high-voltage programming, and best of all, you could have a much, much larger storage space (SRAM is fast, but tiny!).

However, folks differ on how they implement the removal of CMOS battery for these newer chips. The chipset will let the BIOS software know that a power-loss happened, and from here the designers can do different things. They can choose to emulate old-school behavior and reset everything. They can choose to load a "safe" set of default settings, but retain all of your stuff so you can pick and choose what you want. They can also choose to do simply nothing.

Now, for time-keeping. The basic method of time keeping is a crystal oscillator -- an external 32.768kHz crystal is provided, and the on-die RTCC (real-time clock/calendar) uses this crystal to keep time after you set it. When you turn off your computer, depending on how the power-supply is implemented, stand-by power may not be provided to this sub-circuit / RTCC peripheral, and it will stop running. Hence, a small battery is generally present to power the RTCC when AC power is not available.

When you yank the battery, you'll kill off the power needed to keep that oscillator / time-keeping circuit running, and additionally, you'll clear the current date/time information because the power that was running the registers they were stored in is now gone.

This has not changed in recent times -- you still need a power source to keep it running. Some folks have talked about using super-capacitors, but you can't beat a CR2032 button-cell for longevity and cost reasons. A simple Diode-OR is used to share the power sources:

enter image description here

So in the end:

  1. Batteries used to be needed to actually maintain your settings; nowadays it's stored in non-volatile memory
  2. Batteries still needed to keep the RTCC going / maintain date & time when the machine is off

(Trying out the 'answer your own question' thing)

2
  • "you'll kill the SRAM (discussed above) that does hold the current time/date information" -- The date and time are maintained/stored in registers in the RTC chip itself. There's no need to have additional copies of this data in any SRAM. "SRAM is fast, but tiny" -- No it's not "tiny", but relatively more expensive and usually requires more physical space (i.e. it's less dense than DRAM).
    – sawdust
    Jun 28, 2016 at 23:13
  • Good point, updated -- the registers might be implemented as large-signal or small-signal but I clarified anyway Jun 28, 2016 at 23:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .