From 3a39cef8997d9b469ceefa7fd381b04cc0b5b79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6ller?= Date: Sun, 21 Feb 2010 21:38:58 +0000 Subject: [PATCH] Added both VCore detection modes for Winbond W82637THF (should fix issue 3). --- Hardware/LPC/W836XX.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Hardware/LPC/W836XX.cs b/Hardware/LPC/W836XX.cs index fb1abd7..15cd142 100644 --- a/Hardware/LPC/W836XX.cs +++ b/Hardware/LPC/W836XX.cs @@ -183,8 +183,18 @@ namespace OpenHardwareMonitor.Hardware.LPC { foreach (Sensor sensor in voltages) { if (sensor.Index < 7) { - int value = ReadByte(0, (byte)(VOLTAGE_BASE_REG + sensor.Index)); - sensor.Value = 0.008f * voltageGains[sensor.Index] * value; + // two special VCore measurement modes for W83627THF + if (chip == Chip.W83627THF && sensor.Index == 0) { + byte vrmConfiguration = ReadByte(0, 0x18); + int value = ReadByte(0, VOLTAGE_BASE_REG); + if ((vrmConfiguration & 0x01) == 0) + sensor.Value = 0.016f * value; // VRM8 formula + else + sensor.Value = 0.00488f * value + 0.69f; // VRM9 formula + } else { + int value = ReadByte(0, (byte)(VOLTAGE_BASE_REG + sensor.Index)); + sensor.Value = 0.008f * voltageGains[sensor.Index] * value; + } if (sensor.Value > 0) ActivateSensor(sensor); else