LibreHardwareMonitor / LibreHardwareMonitor/LibreHardwareMonitor

Presenting the wrong CMOS battery value for MITX-CLS0

Open
#2,468 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
9.1k
Forks
1k
Avg merge
1d 4h
Merged PRs (30d)
15

Description

Hardware: Quanmax Inc MITX-CLS0, I/O controller Nuvoton NCT6106D
Hardware report: LibreHardwareMonitor.Report.txt

Hello! I believe there is a bug when presenting CMOS Battery/VBAT value for this hardware. I noticed that the battery voltage value did not seem to make sense. For working CMOS batteries I would expect a higher voltage. Image

I tested a couple of different cards I had laying around and got the same issue and checked by other means what the value should be. So, I dug a little more and looked at Nct677X.cs, here NCT6106D maps to NCT610XD (which covers NCT6102D, NCT6104D, NCT6106D).

When reading the voltage values, it reads out 9 values, from 0x300 to 0x309. But crucially it skips 0x306.

Image

Nct677X.cs line 451

I looked into Nuvoton’s documentation for the chip and register 06h is reserved there:

Image

So, it skips 0x306. However, in SuperIOHardware.cs, for NCT610XD it assumes that the reserved value was read(even if it ends up not displaying it, line 385):

Image

SuperIOHardware.cs line 387

I hope I’ve understood how this code functions, but it seems to me that when presenting the battery voltage value, it is presenting the VTT register as if it was the VBAT one.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the voltage-reading logic around line 451 of LibreHardwareMonitorLib/Hardware/Motherboard/Lpc/Nct677X.cs and the NCT610XD mapping around line 387 of SuperIOHardware.cs. Compare the skipped 0x306 register with the expected VBAT position using the attached hardware report and Nuvoton register documentation. Done means the MITX-CLS0 presents the CMOS battery voltage from the correct register rather than VTT.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.