25 ms·
Sadly some do! The best kind of RTC in hardware is a second counter that the OS can program as it pleases. This design choice offers the least chance to mess it
by dmitrygr 5y ago
Sadly some do! The best kind of RTC in hardware is a second counter that the OS can program as it pleases. This design choice offers the least chance to mess it up. Yet, for some reason so many companies invent over-complicated RTC hardware blocks that count days, weeks, time zones, moon phases, and who the hell knows what else. Most of them suffer from myopic design (I've seen chips with y2k issues in hardware) or outright bugs (as seen in TFA).
You know what most drivers do to those? They use them as second counters in the simplest way the driver writer could imagine.
And yet, more and more chips keep being made with over-complex RTCs
- exikyut 5y agoWhat's a good knee-jerk "use this" recommendation that's inexpensive and likely to exist for a long time? Popularity and/or intuitivity would be nice bonuses, but I'd value functionally correct/sane behavior more highly. (I'm guessing this question belies my extreme ignorance of the field :), and that the RTCs in even eg basic Arduino etc designs are probably already reasonably decent.) Edit: Just noticed the parent sibling comment about RTCs obviating divide/multiply logic. Much clicks into place now.
- marcan_42 5y agoYou don't buy RTCs. You buy a big SoC with a 5000 page datasheet, of which 3-10 pages are the RTC, and you take what they give you. There is no room for the RTC type/design to be part of the part selection process for a SoC, which is why they can be vaguely crappy and nobody cares or can do anything about it. Edit: it's a power management IC for a SoC, not the SoC itself, but you often don't get much choice of those either since SoCs tend to be designed to pair with a specific PMIC. Whether the RTC is in the SoC or PMIC (or both) depends on the design.