-
Notifications
You must be signed in to change notification settings - Fork 8
Logging to Serial Port
It is possible to enable logging to a serial port (Referred to as a "COM" port on Windows)
XLAT will output the measurements in a CSV-format, with 4 columns in the form of count;latency_us;avg_us;stdev_us
.
To enable this functionality, the internal Virtual COM Port feature of the embedded J-Link debugger has to be enable.
-
Make sure the STLink is converted to a J-Link, by re-flashing its firmware. (See Converting ST-LINK On-Board Into a J-Link)
-
Start the J-Link Configuration tool, find your "J-Link STLink" debugger, right click it and select "Configure":
-
Under "Virtual COM port", select "Enable" and confirm with "OK". You might have to unplug and re-plug the USB connected after this change.
-
After this, a new "COM" port should appear in the Windows Device Manager (or a ttyACM device under Linux). Remember the port number.
[53144.471802] usb 3-2.1: new full-speed USB device number 28 using xhci_hcd [53144.601437] usb 3-2.1: New USB device found, idVendor=1366, idProduct=0105, bcdDevice= 1.00 [53144.601446] usb 3-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [53144.601451] usb 3-2.1: Product: J-Link [53144.601453] usb 3-2.1: Manufacturer: SEGGER [53144.648557] cdc_acm 3-2.1:1.0: ttyACM0: USB ACM device
-
Use any terminal software capable of connecting to a serial port. E.g.:
-
Configure the terminal application with following settings:
1000000 8N1
- Baudrate: 1000000 (1M)
- Databits: 8
- Stop bits: 1
- Parity: None
- Flow control: None
-
You should see XLAT output appearing on the terminal: