The example transfers bidirectional data between two serial ports, acting as a virtual link.
- Example
mbed_app.json
file (K64F
):
{
"config": {
"UART1_TX": "D1",
"UART1_RX": "D0",
"UART2_TX": "USBTX",
"UART2_RX": "USBRX"
}
}
- Flash the board, and ensure the target's USB is plugged into the PC (UART2).
- Connect second serial port to PC via USB to serial adapter (UART1).
- Open two serial consoles (select associated COM ports, transmission speed: 9600 bps).
- Reset the target.
- Data sent from one console should appear in the other one and vice versa.
Note: You can check the associated serial port using mbedls
command (UART2).
Note: Note: On Windows you can check the associated COM port in the Device Manager (UART1).
Note: Please adapt your pins for target different than K64F
.
MIRRORED FROM MASTER EXAMPLE SNIPPETS REPOSITORY: mbed-os-examples-docs_only. ANY CHANGES MADE DIRECTLY TO THIS REPOSITORY WILL BE AUTOMATICALLY OVERWRITTEN.