Connect serial console

ROCK960 exports a dedicated serial console, which can access the low level debug message.

Requirement

Connect

Connect the USB to TTL serial cable as below:

RX     <---->    GREEN
TX     <---->    WHITE
GND    <---->    BLACK

rock960 serial connection

Serial setting on host PC

The default serial setting for ROCK960 u-boot and kernel console is:

baudrate: 1500000
data bit: 8
stop bit: 1
parity  : none
flow control: none

Linux

Minicom is a the serial tool that supports wide range baud rate.

Install minicom:

sudo apt install minicom

Plug in the USB to TTL cable, kernel dmesg | tail should show the following device:

[  244.443685] usbserial: USB Serial support registered for FTDI USB Serial Device
[  244.443729] ftdi_sio 3-2:1.0: FTDI USB Serial Device converter detected
[  244.443782] usb 3-2: Detected FT232BM
[  244.445317] usb 3-2: FTDI USB Serial Device converter now attached to ttyUSB0

/dev/ttyUSB0 is our device here.

Run

sudo minicom -D /dev/ttyUSB0

Welcome to minicom 2.7

OPTIONS: I18n 
Compiled on Feb  7 2016, 13:37:27.
Port /dev/ttyUSB0, 08:13:38

Press CTRL-A Z for help on special keys

            +-----[configuration]------+
            | Filenames and paths      |
            | File transfer protocols  |
            | Serial port setup        |
            | Modem and dialing        |
            | Screen and keyboard      |
            | Save setup as dfl        |
            | Save setup as..          |
            | Exit                     |
            +--------------------------+



CTRL-A Z for help | 1500000 8N1 | NOR | Minicom 2.7 | VT102 | Offline | ttyUSB0

Press Ctrl+A and then O(press Ctrl key and A key at the same time and release, then press O key) to open the configuration menu. Choose Serial port setup, and change the setting as following:


Welcome to minicom 2.7

OPTI+-----------------------------------------------------------------------+
Comp| A -    Serial Device      : /dev/ttyUSB0                              |
Port| B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
Pres| D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 1500000 8N1                               |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+
            | Screen and keyboard      |
            | Save setup as dfl        |
            | Save setup as..          |
            | Exit                     |
            +--------------------------+




CTRL-A Z for help | 1500000 8N1 | NOR | Minicom 2.7 | VT102 | Offline | ttyUSB0

Please note the E - Bps/Par/Bits setting, you should use A and B key to find the right baud rate 1500000.


Welcome to minicom 2.7

OPTI+-----------------+---------[Comm Parameters]----------+----------------+
Comp| A -    Serial De|                                    |                |
Port| B - Lockfile Loc|     Current: 1500000 8N1           |                |
    | C -   Callin Pro| Speed            Parity      Data  |                |
Pres| D -  Callout Pro| A:         L: None     S: 5  |                |
    | E -    Bps/Par/B| B:         M: Even     T: 6  |                |
    | F - Hardware Flo| C:   9600        N: Odd      U: 7  |                |
    | G - Software Flo| D:  38400        O: Mark     V: 8  |                |
    |                 | E: 115200        P: Space          |                |
    |    Change which |                                    |                |
    +-----------------| Stopbits                           |----------------+
            | Screen a| W: 1             Q: 8-N-1          |
            | Save set| X: 2             R: 7-E-1          |
            | Save set|                                    |
            | Exit    |                                    |
            +---------| Choice, or  to exit?        |
                      +------------------------------------+



CTRL-A Z for help | 1500000 8N1 | NOR | Minicom 2.7 | VT102 | Offline | ttyUSB0

Recapitulation

macOS

Windows