Skip to content

Commit 229ad42

Browse files
committed
Fix VPP reading
1 parent 0295fb7 commit 229ad42

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

ddr5spd.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,11 +676,17 @@ void DDR5SPD::settCCD_M_WTR_tick(const unsigned short tick) {
676676
}
677677

678678
const unsigned short DDR5SPD::getVPP() {
679-
return utilities::ConvertByteToVoltageDDR5(spdStruct.voltageVPP);
679+
if (spdStruct.voltageVPP == 0x00) {
680+
return 180;
681+
}
682+
683+
return 0;
680684
}
681685

682686
void DDR5SPD::setVPP(const unsigned short vpp) {
683-
spdStruct.voltageVPP = utilities::ConvertVoltageToByteDDR5(vpp);
687+
if (vpp == 180) {
688+
spdStruct.voltageVPP = 0x00;
689+
}
684690
}
685691

686692
const unsigned short DDR5SPD::getVDD() {

ddr5spd_structs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ struct SPD_Struct {
300300
// Byte 16-18 (Voltages, 1.1v)
301301
unsigned char voltageVDD; // 0x00 -> 1.1v
302302
unsigned char voltageVDDQ; // 0x00 -> 1.1v
303-
unsigned char voltageVPP; // 0x00 -> 1.1v
303+
unsigned char voltageVPP; // 0x00 -> 1.8v Bits 7-4 Nominal, 3-2 Operable, 1-0 Endurant
304304
// Byte 19
305305
unsigned char sdramTimming; // Should be 0x00 for JEDEC standard timmings
306306
// Byte 20-21

mainwindow.ui

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,6 +1916,9 @@
19161916
</item>
19171917
<item row="0" column="5">
19181918
<widget class="QSpinBox" name="sbVPP_JEDEC">
1919+
<property name="enabled">
1920+
<bool>false</bool>
1921+
</property>
19191922
<property name="minimum">
19201923
<number>110</number>
19211924
</property>

0 commit comments

Comments
 (0)