Products > Test Equipment

HP 1670D Corrupted LAN Board error fix 167XD

(1/1)

TK:
I purchased an HP 1670D Deep Memory Logic Analyzer and when I received it and turned it on, I was greeted with the "Corrupted LAN Board!" Error message.  The rest of the unit was functional.  Just the LAN was not functional. 

I hate sending these nice old equipment to scrap, so I decided to repair it.

After googling for this error, I found some information pointing to the NVRAM (Dallas Semiconductor DS1387) internal battery dying after the expected life and that it needed to be repaired at the Service Center.  HP stored the MAC Address on the DS1387 RAM.  DS1387 is an RTC module with internal battery, crystal and 4K RAM in a 24-pin DIP module.  It can be reworked following online blogs like the following: http://www.mcamafia.de/mcapage0/dsrework.htm.  The module will be operational, but all previous content will be lost.  I desoldered, reworked, installed an IC socket and reinstalled the module.

The MAC Address is stored in the first 6 bytes of the RAM inside the DS1387.  I connected the reworked DS1387 to my Arduino UNO and wrote a couple of sketches (programs) to read and write the content.  The example uses MAC Address 01 02 03 04 05 06, but you can use the correct one (it is printed in a label on the 1670D CPU board as LLA: XXXXXXXXXXXX).

Used PORT manipulation because digitalWrite() and digitalRead() is just too slow for the timing requirements of the DS1387

Connection information between Arduino UNO and DS1387 (To write the content back to the DS1387)

DS1387 Pin 1 (~OER) <--> +5V
DS1387 Pin 4 (AD0) <--> Arduino UNO Pin 0 (PD0)
DS1387 Pin 5 (AD1) <--> Arduino UNO Pin 1 (PD1)
DS1387 Pin 6 (AD2) <--> Arduino UNO Pin 2 (PD2)
DS1387 Pin 7 (AD3) <--> Arduino UNO Pin 3 (PD3)
DS1387 Pin 8 (AD4) <--> Arduino UNO Pin 4 (PD4)
DS1387 Pin 9 (AD5) <--> Arduino UNO Pin 5 (PD5)
DS1387 Pin 10 (AD6) <--> Arduino UNO Pin 6 (PD6)
DS1387 Pin 11 (AD7) <--> Arduino UNO Pin 7 (PD7)
DS1387 Pin 12 (GND) <--> Arduino UNO Ground
DS1387 Pin 13 (~CS) <--> +5V
DS1387 Pin 15 (~WR) <--> +5V
DS1387 Pin 17 (~RD) <--> +5V
DS1387 Pin 18 (~WER) <--> Arduino UNO Pin 11 (PB3)
DS1387 Pin 19 (~IRQ) <--> +5V
DS1387 Pin 21 (~AS1) <--> Arduino UNO Pin 10 (PB2)
DS1387 Pin 22 (~AS0) <--> Arduino UNO Pin 9 (PB1)
DS1387 Pin 24 (VCC) <--> +5V

Code:


--- Code: ---// Write empty DS1387 NVRAM to fix corrupted LAN data due to DS1387 missing battery

// NVRAM 4K RAM content
// First 6 bytes = MAC Address. In this example MAC is 010203040506
// 01 02 03 04 05 06 C0 00 02 E6 00 00 00 00 00 00
// 00 00 01 00 41 6E 61 6C 79 7A 65 72 20 31 00 00
// 00 00 00 00 00 00 00 00 00 00 00 00 00 2D 01 00
// 00 00 00 00 00 00 00 00 00 00
// MAC Address is printed in a label indicated as LLA

#define OER 8
#define AS0 9
#define AS1 10
#define WER 11

// Number of bytes to write
#define BYTES 58
byte nvram[BYTES] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0xC0, 0x00, 0x02, 0xE6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                      0x00, 0x00, 0x01, 0x00, 0x41, 0x6E, 0x61, 0x6C, 0x79, 0x7A, 0x65, 0x72, 0x20, 0x31, 0x00, 0x00,
                      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x01, 0x00,
                      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

#define NOP __asm__ __volatile__ ("nop\n\t")

void setup() {
  // Define control pins as output
  pinMode(OER, OUTPUT);
  pinMode(AS0, OUTPUT);
  pinMode(AS1, OUTPUT);
  pinMode(WER, OUTPUT);

  // To start, define AD0-AD7 pins as OUTPUT
  // AD0-7 = PORTD [0-7]
  DDRD = B11111111;

  //set control bits as HIGH
  digitalWrite(OER, HIGH);
  digitalWrite(AS0, HIGH);
  digitalWrite(AS1, HIGH);
  digitalWrite(WER, HIGH);
}

void loop() {
  // Write first 58 bytes
  int addr;
  byte data;
  byte addrlow;
  byte addrhigh;

  for (addr=0; addr<BYTES; addr++) {
    addrhigh = addr>>8;
    addrlow = (addr&0x00FF);

    // send ADDR LOW to DS1387
    PORTD = addrlow;
    PORTB &= ~(_BV(1));
    PORTB |= _BV(1);
    //digitalWrite(AS0, LOW);
    //digitalWrite(AS0, HIGH);

    // send ADDR HIGH to DS1387
    PORTD = addrhigh;
    PORTB &= ~(_BV(2));
    PORTB |= _BV(2);
    //digitalWrite(AS1, LOW);
    //digitalWrite(AS1, HIGH);

    // Write byte
    PORTD = nvram[addr];
    // pulse WER (Write Enable 4K RAM)
    PORTB &= ~(_BV(3));
    NOP;
    NOP;
    NOP;
    NOP;
    NOP;
    NOP;
    NOP;
    NOP;
    PORTB |= _BV(3);
  }
  // Done
  while (1) {};
}
--- End code ---

Connection information between Arduino UNO and DS1387 (To read the 4K RAM content from DS1387).  Use SoftwareSerial to print the RAM content because Pin 0 (RX) and Pin 1 (TX) are used for ADDR and DATA with DS1387 to be able to use PORT manipulation for fast pin toggling.

DS1387 Pin 1 (~OER) <--> Arduino UNO Pin 8 (PB0)
DS1387 Pin 4 (AD0) <--> Arduino UNO Pin 0 (PD0)
DS1387 Pin 5 (AD1) <--> Arduino UNO Pin 1 (PD1)
DS1387 Pin 6 (AD2) <--> Arduino UNO Pin 2 (PD2)
DS1387 Pin 7 (AD3) <--> Arduino UNO Pin 3 (PD3)
DS1387 Pin 8 (AD4) <--> Arduino UNO Pin 4 (PD4)
DS1387 Pin 9 (AD5) <--> Arduino UNO Pin 5 (PD5)
DS1387 Pin 10 (AD6) <--> Arduino UNO Pin 6 (PD6)
DS1387 Pin 11 (AD7) <--> Arduino UNO Pin 7 (PD7)
DS1387 Pin 12 (GND) <--> Arduino UNO Ground
DS1387 Pin 13 (~CS) <--> +5V
DS1387 Pin 15 (~WR) <--> +5V
DS1387 Pin 17 (~RD) <--> +5V
DS1387 Pin 18 (~WER) <--> +5V
DS1387 Pin 19 (~IRQ) <--> +5V
DS1387 Pin 21 (~AS1) <--> Arduino UNO Pin 10 (PB2)
DS1387 Pin 22 (~AS0) <--> Arduino UNO Pin 9 (PB1)
DS1387 Pin 24 (VCC) <--> +5V

Arduino UNO Pin 11 is RX for SoftwareSerial
Arduino UNO Pin 12 is TX for SoftwareSerial (not used)

Code:

--- Code: ---// Read 4Kbytes from Dallas Semiconductor DS1387

// Use Software serial because pin 0 RX and pin 1 TX are used for PORTD IO
// NVRAM 4K RAM content
// First 6 bytes = MAC Address. In this example MAC is 010203040506
// 01 02 03 04 05 06 C0 00 02 E6 00 00 00 00 00 00
// 00 00 01 00 41 6E 61 6C 79 7A 65 72 20 31 00 00
// 00 00 00 00 00 00 00 00 00 00 00 00 00 2D 01 00
// 00 00 00 00 00 00 00 00 00 00
#include <SoftwareSerial.h>

SoftwareSerial mySerial(11, 12);

#define OER 8
#define AS0 9
#define AS1 10
#define WER 11

#define NOP __asm__ __volatile__ ("nop\n\t")

void setup() {
  // Start SoftwareSerial port
  mySerial.begin(9600);

  // Define control pins as output
  pinMode(OER, OUTPUT);
  pinMode(AS0, OUTPUT);
  pinMode(AS1, OUTPUT);
  pinMode(WER, OUTPUT);

  // To start, define AD0-AD7 pins as OUTPUT
  // AD0-7 = PORTD [0-7]
  DDRD = B11111111;

  //set control bits as HIGH
  digitalWrite(OER, HIGH);
  digitalWrite(AS0, HIGH);
  digitalWrite(AS1, HIGH);
  digitalWrite(WER, HIGH);
}

void loop() {
  // read all 4K bytes
  int addr;
  byte data;
  byte addrlow;
  byte addrhigh;

  for (addr=0; addr<4096; addr++) {
    addrhigh = addr>>8;
    addrlow = (addr&0x00FF);

    // send ADDR LOW to DS1387
    PORTD = addrlow;
    PORTB &= ~(_BV(1));
    PORTB |= _BV(1);
    //digitalWrite(AS0, LOW);
    //digitalWrite(AS0, HIGH);

    // send ADDR HIGH to DS1387
    PORTD = addrhigh;
    PORTB &= ~(_BV(2));
    PORTB |= _BV(2);
    //digitalWrite(AS1, LOW);
    //digitalWrite(AS1, HIGH);

    // Read byte
    // Set PORTD as input
    DDRD = B00000000;
    // pulse OER (Output Enable 4K RAM)
    PORTB &= ~(_BV(0));
    //digitalWrite(OER, LOW);
    //read data
    NOP;
    NOP;
    NOP;
    NOP;
    data = PIND;
    PORTB |= _BV(0);
    //digitalWrite(OER, HIGH);
    // Set PORTD as output
    DDRD = B11111111;

    if ((addr%16)==0) {
      mySerial.print("\n\r ");
      if (addr < 0x0010)
        mySerial.print("00");
      else if (addr < 0x0100);
        mySerial.print("0");
      mySerial.print(addr, HEX);
      mySerial.print(' ');
    }
    if (data < 0x10)
      mySerial.print("0");
    mySerial.print(data, HEX);
    mySerial.print(' ');
  }
}
--- End code ---

Some pictures:





sleary78:
I tried this fix on a HP1661CS but unfortunately it didnt work.

When i read the DS1387 data back it had been overwritten by 0s

UD2:
Digging up this thread to say that I followed this procedure and successfully revived my 1660CS's LAN functionality!
A few pieces of advice for others attempting this:
1. Be gentle when desoldering the DS1387. Work slowly and carefully, it's a bit of a pain to get out, but it will come out eventually.
2. After writing data to the chip, connect the VCC input to GND before disconnecting the MCU used to perform the programming. Doing so will ensure the write protection kicks in and a spurious write won't occur during disconnect. I found that the first byte of NVRAM would sometimes get corrupted if I didn't do this, which leads to the analyzer clearing the rest of it on boot (probably what the previous poster experienced).
3. Unlike what the original post claims, the NVRAM isn't particularly timing sensitive as long as you wait the minimum times required by the datasheet and make sure your AD bus is stable before pulsing the OER/WER/AS pins. I successfully used as Teensy 3.5 (the only 5V tolerant MCU I had on hand) to do the programming and it worked great. I had it verify the contents of the NVRAM after writing and report the status to UART after completion. I'd highly recommend doing this just to make sure everything works.

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod