LPC PORT80 Debug Analyzer

A comprehensive toolkit for analyzing LPC (Low Pin Count) bus PORT80 debug output from ASUS motherboards with NCT5104D Super I/O chips. This project provides specialized tools for interpreting POST codes, startup sequences, memory refresh cycles, and CMOS reset patterns.

Project Overview

This toolkit is designed for analyzing debug data from ASUS COM_DEBUG ports connected to the NCT5104D Super I/O chip's SOUTC_P80 pin (pin 38). The LPC bus outputs real-time system status, POST codes, and debug information that can be used for:

  • System diagnostics and troubleshooting
  • Startup sequence analysis
  • Memory operation monitoring
  • CMOS configuration debugging
  • Hardware failure detection

Features

  • Real-time analysis of serial debug data
  • Pattern detection for common LPC PORT80 sequences
  • Startup sequence tracking with phase identification
  • CMOS reset detection and configuration error analysis
  • Memory refresh cycle monitoring
  • Statistical analysis of debug patterns
  • Logging capabilities for long-term monitoring
  • Existing data analysis for saved debug logs

Requirements

  • Python 3.6+
  • pyserial library
  • Access to serial port (may require sudo on Linux)

Installation

  1. Install the required dependency:
pip install -r requirements.txt

Or install pyserial directly:

pip install pyserial
  1. Ensure you have access to the serial port:
# Add user to dialout group (Linux)
sudo usermod -a -G dialout $USER
# Then log out and log back in

Analysis Tools

1. Advanced LPC Analyzer (lpc_advanced_analyzer.py)

Most comprehensive analyzer with statistical analysis and pattern detection.

python lpc_advanced_analyzer.py --port /dev/ttyUSB0 --baudrate 115200 --save-log debug.log

Features:

  • Real-time pattern analysis
  • Memory refresh cycle detection
  • Statistical analysis every N bytes
  • Comprehensive logging
  • Gap detection and timing analysis

Options:

  • --port: Serial port (default: /dev/ttyUSB0)
  • --baudrate: Baudrate (default: 115200)
  • --stats-interval: Print statistics every N bytes (default: 50)
  • --save-log: Save output to log file

2. Startup Sequence Analyzer (startup_analyzer.py)

Specialized for startup analysis and CMOS reset detection.

python startup_analyzer.py --port /dev/ttyUSB0 --baudrate 115200 --save-log startup.log

Features:

  • Startup phase detection
  • CMOS reset pattern recognition
  • Startup progress tracking
  • Error detection and classification
  • Real-time startup summary

Options:

  • --port: Serial port (default: /dev/ttyUSB0)
  • --baudrate: Baudrate (default: 115200)
  • --summary-interval: Print summary every N bytes (default: 25)
  • --save-log: Save output to log file

3. Existing Data Analyzer (analyze_existing_data.py)

For analyzing saved or pasted debug data without real-time connection.

# Analyze data from command line
python analyze_existing_data.py --data "00 00 00 00 00 15 10 4F 43 40 40 40"

# Analyze data from file
python analyze_existing_data.py --file debug_data.txt

# Interactive mode (paste data when prompted)
python analyze_existing_data.py

Features:

  • Pattern recognition in saved data
  • Statistical analysis
  • Sequence detection
  • Memory refresh analysis
  • Most common byte identification

Options:

  • --data: Analyze data provided as argument
  • --file: Load data from file

Usage Examples

Real-time System Monitoring

# Monitor system startup with comprehensive analysis
python lpc_advanced_analyzer.py --save-log system_debug.log

# Focus on startup sequence and CMOS patterns
python startup_analyzer.py --save-log startup.log

Analyzing Existing Data

# Analyze a specific data pattern
python analyze_existing_data.py --data "00 00 00 00 00 15 10 4F 43 40 40 40 00 48 48 48"

# Analyze data from a saved log file
python analyze_existing_data.py --file debug.log

Troubleshooting

# Monitor for CMOS reset patterns
python startup_analyzer.py --summary-interval 10

# Check for memory refresh issues
python lpc_advanced_analyzer.py --stats-interval 25

Detected Patterns

The analyzers can detect various patterns in LPC PORT80 data:

CMOS Reset Patterns

  • CMOS Configuration Error: 22 22 22 22 22 22 22 22
  • CMOS Check Sequence: 50 30 3E
  • CMOS Error Detection: 21 21 21

Memory Refresh Patterns

  • Memory Refresh Cycle: 00 00 00 00 00 15
  • Memory Test Sequence: 06 4A 0A

System Test Patterns

  • System Test Sequence: 07 11 01
  • Debug Output Pattern: F0 F2 F0 F0 F0 F2 F0 F0 F0 F2 F0 F0 F0 F2 F3 F3

Documentation

  • LPC_PORT80_ANALYSIS.md: Complete technical guide with pattern explanations
  • ANALYSIS_SUMMARY.md: Executive summary and quick reference
  • STARTUP_ANALYSIS.md: Startup sequence analysis guide
  • ERROR_INTERPRETATION_SOURCE.md: Details about error interpretation reliability

Hardware Setup

ASUS COM_DEBUG Connection

  • Header: Standard 3-pin COM_DEBUG header on ASUS motherboards
  • Pins: TX (data), RX (not used), GND (ground)
  • Chip: NCT5104D Super I/O (SOUTC_P80 pin 38)

Serial Connection

  • Port: Usually /dev/ttyUSB0 (USB-to-serial adapter)
  • Baudrate: 115200 (default)
  • Data format: 8-bit, no parity, 1 stop bit

Troubleshooting

Permission Denied

sudo usermod -a -G dialout $USER
# Log out and log back in, or run with sudo

Port Not Found

# Check available ports
ls /dev/tty*

# Test connection
python startup_analyzer.py --port /dev/ttyACM0

Wrong Baudrate

Ensure the baudrate matches your device's configuration. Most ASUS COM_DEBUG outputs use 115200 baud.

Stopping the Scripts

Press Ctrl+C to stop any running script. All scripts will gracefully close the serial connection and save any pending data.

Error Handling

The scripts handle common errors:

  • Serial port not found or in use
  • Permission denied
  • Invalid baudrate
  • Connection timeouts
  • Data parsing errors

Contributing

When adding new patterns or interpretations:

  1. Document the pattern detection criteria
  2. Update the relevant analysis scripts
  3. Add examples to the documentation
  4. Test with known good data

License

This project is provided as-is for educational and diagnostic purposes.