Sigmastar Uart_debugsop Manual

REVISION HISTORY

Revision No.
Description
Date
1.0
  • Initial release
  • 04/15/2024

    Issue 1. Uart does not receive data or the received data does not meet expectations

    Figure 1-1 RX reception abnormal issue troubleshooting mind map

    Process Method Exit Conditions Next Step Information to Provide to SWRD Related FAQs
    A Check data reception status, can use serial port tools for debugging Exit Condition 1:
    1. No data received at all
    Exit Condition 2:
    1. Data received, but content is incorrect
    Exit Condition 3:
    1. Data received normally
    Exit Condition 1:
    >B
    Exit Condition 2:
    >C
    Exit Condition 3:
    ==>Process ends
    B Confirm the GPIO index corresponding to the used pin, control GPIO high and low through the GPIO node under sys Exit Condition 1:
    1. RX pin cannot be controlled high or low
    Exit Condition 2:
    1. RX pin can be controlled high and low
    Exit Condition 1:
    >Check if the measurement point to the corresponding pin on the chip is conductive or if there is circuit clamping
    Exit Condition 2:
    >D
    C Capture the waveform at the receiving end for analysis Exit Condition 1:
    1. Signal abnormal
    Exit Condition 2:
    1. Signal normal
    Exit Condition 1:
    >Check if there are other devices interfering or capacitors on the path
    Exit Condition 2:
    >E
    D Check padmux / digmux settings Exit Condition 1:
    1. Settings abnormal
    Exit Condition 2:
    1. Settings normal
    Exit Condition 1:
    >Correct and return to A
    Exit Condition 2:
    >F
    E Check if UART configuration matches the device, test using stty & cat Exit Condition 1:
    1. Baud rate setting incorrect, or stop bit/parity bit setting incorrect
    Exit Condition 2:
    Test with stty & cat, results still incorrect
    Exit Condition 1:
    >Correct and return to A
    Exit Condition 2:
    >Process ends
    Exit Condition 2:
    1. Assist SWRD in setting up the environment
    F Check the change in UART interrupt counts before and after data transmission Exit Condition 1:
    1. No change
    Exit Condition 2:
    1. Interrupt count increases
    Exit Condition 1:
    >G
    Exit Condition 2:
    >E
    G Capture the waveform at the receiving end Exit Condition 1:
    1. Signal abnormal or no signal
    Exit Condition 2:
    1. Signal normal
    Exit Condition 1:
    >Check RX path
    Exit Condition 2:
    >H
    H Use riu_r or tv-tool to capture registers, capture banks: 0x1009 0x101e 0x1038 0x103c, capture while the background program is running because when the program closes, the UART driver will clear hardware-related settings Exit Condition 1:
    1. Capture register status
    Exit Condition 1:
    ==>Process ends
    Exit Condition 1:
    1. Provide register status


    Issue 2. Uart cannot send data

    Figure 1-2 TX sending abnormal issue troubleshooting mind map

    Process Method Exit Conditions Next Step Information to Provide to SWRD **Related FAQs **
    A Check data sending status, can use serial port tools for debugging Exit Condition 1:
    1. Serial port tool receives no data at all
    Exit Condition 2:
    1. Serial port tool can receive data, but content is incorrect
    Exit Condition 3:
    1. Data received normally
    Exit Condition 1:
    >B
    Exit Condition 2:
    >C
    Exit Condition 3:
    ==>Process ends
    B Confirm the GPIO index corresponding to the used pin, control GPIO high and low through the GPIO node under sys Exit Condition 1:
    1. TX pin cannot be controlled high or low
    Exit Condition 2:
    1. TX pin can be controlled high and low
    Exit Condition 1:
    >Check if the measurement point to the corresponding pin on the chip is conductive or if there is circuit clamping
    Exit Condition 2:
    >D
    C Capture waveform analysis Exit Condition 1:
    1. Signal abnormal
    Exit Condition 2:
    1. Signal normal
    Exit Condition 1:
    >Check if there are other devices interfering or capacitors on the path
    Exit Condition 2:
    >E
    D Check padmux / digmux settings Exit Condition 1:
    1. Settings abnormal
    Exit Condition 2:
    1. Settings normal
    Exit Condition 1:
    >Correct and return to A
    Exit Condition 2:
    >F
    E Check if UART configuration matches the device, test using stty & echo Exit Condition 1:
    1. Baud rate setting incorrect, or stop bit/parity bit setting incorrect
    Exit Condition 2:
    Test with stty & echo, results still incorrect
    Exit Condition 1:
    >Correct and return to A
    Exit Condition 2:
    >Process ends
    Exit Condition 2:
    1. Assist SWRD in setting up the environment
    F Capture waveform analysis Exit Condition 1:
    1. No signal
    Exit Condition 2:
    1. Signal abnormal
    Exit Condition 3:
    1. Signal normal
    Exit Condition 1:
    >G
    Exit Condition 2:
    >Check if there are other devices interfering or capacitors on the path
    Exit Condition 3:
    ==>E
    G Use riu_r or tv-tool to capture registers, capture banks: 0x101e 0x1038 0x103c, capture while the background program is running because when the program closes, the UART driver will clear hardware-related settings Exit Condition 1:
    1. Capture register status
    Exit Condition 1:
    ==>Process ends
    Exit Condition 1:
    1. Provide register status


    Issue 3. Debugging serial port hangs

    Figure 1-3 Debugging serial port hang issue troubleshooting mind map

    Process Method Exit Conditions Next Step Information to Provide to SWRD **Related FAQs **
    A Type commands on the serial port tool and observe the phenomenon Exit Condition 1:
    1. Observed echo, but command line does not come out
    Exit Condition 2:
    1. No echo observed
    Exit Condition 1:
    >B
    Exit Condition 2:
    >C
    B Confirm if the issue is caused by local modifications or a certain step, since echo can be observed, RX and TX are normal, it may be deadlocked, or the program execution is stuck in a loop Exit Condition 1:
    1. Confirmed issue introduced by code modification
    Exit Condition 2:
    1: Confirmed issue introduced by executing a certain step (including toggling certain features, issues detected in daily builds, problems caused by version updates)
    Exit Condition 1:
    >Self-confirm
    Exit Condition 2:
    >Please have the relevant owner investigate
    C If telnet is available, try to connect via telnet Exit Condition 1:
    1. No telnet or cannot connect
    Exit Condition 2:
    1. Can connect normally
    Exit Condition 1:
    >D
    Exit Condition 2:
    >E
    D Test if tv-tool can capture registers, read bank 0x1004, the first half of the value should be fixed, the second half will change every time it is read Exit Condition 1:
    1. Cannot capture registers normally
    Exit Condition 2:
    1. Can capture registers normally
    Exit Condition 1:
    >F
    Exit Condition 2:
    >G
    E Observe the interrupt count of uart0 through telnet, cat /proc/interrupts, input in the debugging serial port tool, then observe the interrupt count of uart0 again through telnet, read registers using riu_r tool, banks to read: 0x3F 0x1009 0x101e 0x1038 0x103c 0x1107 Exit Condition 1:
    1. Change in interrupt count
    2. Obtained register status
    Exit Condition 1:
    ==>Process ends
    Exit Condition 1:
    1. Preserve the on-site environment
    2. Feedback on whether there are changes in interrupts
    3. Provide register status
    F Troubleshoot hardware, measure power, generally the reason for not being able to read registers is that the power supply to the corresponding block has stopped, other reasons cannot be ruled out Exit Condition 1:
    1. Detected due to power abnormality
    Exit Condition 2:
    1. Not due to power issues
    Exit Condition 1:
    >Process ends
    Exit Condition 2:
    >Process ends
    Exit Condition 2:
    1. Preserve the on-site environment
    G Read registers according to the following steps:
    1. bank: 0x101e offset:0x57 write 0xF
    2. read bank:0x3F 0x1009 0x101e 0x1038 0x103c 0x1107
    Exit Condition 1:
    1. Obtained register status
    Exit Condition 1:
    ==>Process ends
    Exit Condition 1:
    1. Preserve the on-site environment
    2. Provide register status