Skip to content

Commit d36895d

Browse files
authored
Update SpdReaderWriter.ino
1 parent c851b2e commit d36895d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

firmware/SpdReaderWriter.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,12 @@ bool getRswp(uint8_t block) {
706706
// Clears reversible software write protection
707707
bool clearRswp() {
708708

709-
if (setHighVoltage(ON)) {
710-
setConfigPin(SA1_EN, ON); // Required for pre-DDR4
709+
if (!ddr4Detect()) {
710+
// Required for pre-DDR4
711+
setConfigPin(SA1_EN, ON);
712+
}
713+
714+
if (setHighVoltage(ON)) {
711715
bool result = probeDeviceTypeId(CWP);
712716
resetPins();
713717

0 commit comments

Comments
 (0)