Files
rk3588-ddr-analysis/capture_uart.sh
T
2026-04-03 13:41:50 +02:00

21 lines
567 B
Bash
Executable File

#!/bin/bash
# RK3588 DDR Training UART Capture
# Connect USB-UART to Rock 5 ITX+ debug header (1.5Mbaud, 3.3V)
# Run this BEFORE booting/rebooting the board
UART=${1:-/dev/ttyUSB0}
BAUD=1500000
LOGDIR=~/src/rk3588-ddr-decompiled/uart_logs
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
LOGFILE="$LOGDIR/ddr_training_${TIMESTAMP}.log"
mkdir -p "$LOGDIR"
echo "Capturing DDR training output from $UART at ${BAUD}baud"
echo "Log: $LOGFILE"
echo "Press Ctrl+C to stop after boot completes"
echo ""
stty -F "$UART" "$BAUD" cs8 -cstopb -parenb raw -echo
cat "$UART" | tee "$LOGFILE"