Table of Contents | ||
---|---|---|
|
VCOM and USB Serial Ports
The Nordic kits are typically configured to expose 2 VCOM serial ports as CDC-UART USB devices on the main (interface MCU) USB connector.
The main nRF5340 SoC on the nRF5340 DK has its own USB interface and the corresponding USB connector (J3) that can also expose (USB) serial ports as CDC-UART USB devices. The Emcraft Zephyr application enables the appropriate USB device to support this feature.
1. Identifying Development Kits and VCOM Serial Ports
Use
nrfutil
to list all connected development kits, their serial numbers and associated serial ports:Code Block $ nrfutil device list 1050021575 product J-Link board version PCA10095 ports /dev/ttyACM2, vcom: 0 /dev/ttyACM3, vcom: 1 traits devkit, jlink, seggerUsb, serialPorts, usb 1050931892 product J-Link board version PCA10153 ports /dev/ttyACM0, vcom: 0 /dev/ttyACM1, vcom: 1 traits boardController, devkit, jlink, modem, seggerUsb, serialPorts, usb Found 2 supported device(s)
Use
nrfutil
to identify the specific devices:Code Block $ nrfutil device device-info --serial-number 1050931892 serial_number: 001050931892 boardVersion: PCA10153 deviceFamily: NRF91_FAMILY deviceVersion: NRF9161_xxAA_REV3 jlinkObFirmwareVersion: J-Link OB-nRF5340-NordicSemi compiled Apr 11 2024 17:44:26 protectionStatus: NRFDL_PROTECTION_STATUS_NONE $ nrfutil device device-info --serial-number 1050021575 serial_number: 001050021575 boardVersion: PCA10095 deviceFamily: NRF53_FAMILY deviceVersion: NRF5340_xxAA_ENGD jlinkObFirmwareVersion: J-Link OB-nRF5340-NordicSemi compiled Apr 11 2024 17:44:26 protectionStatus: NRFDL_PROTECTION_STATUS_NONE
2. nRF9161-DK Serial Ports
...
dmesg
can also be used to identify the VCOM serial ports:Code Block $ sudo dmesg ... [1198894.160703] usb 1-2.2: new full-speed USB device number 9 using uhci_hcd [1198894.576542] usb 1-2.2: New USB device found, idVendor=1366, idProduct=1059, bcdDevice= 1.00 [1198894.576550] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [1198894.576553] usb 1-2.2: Product: J-Link [1198894.576564] usb 1-2.2: Manufacturer: SEGGER [1198894.576567] usb 1-2.2: SerialNumber: 001050931892 [1198894.589375] cdc_acm 1-2.2:1.0: ttyACM0: USB ACM device [1198894.596846] cdc_acm 1-2.2:1.2: ttyACM1: USB ACM device ...
...
Connect to the nRF9161 serial console using a terminal program on your Linux PC:
...
...
3. nRF5340-DK Serial Ports
Two USB ACM devices are detected by the Linux host when the nRF5340 DK is connected. They can be identified using nrfutil
(see above) or dmesg
:
...
[1199003.499651] usb 1-2.3: new full-speed USB device number 10 using uhci_hcd [1199003.721099] usb 1-2.3: New USB device found, idVendor=1366, idProduct=1051, bcdDevice= 1.00 [1199003.721125] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [1199003.721137] usb 1-2.3: Product: J-Link [1199003.721146] usb 1-2.3: Manufacturer: SEGGER [1199003.721154] usb 1-2.3: SerialNumber: 001050021575 [1199003.744604] cdc_acm 1-2.3:1.0: ttyACM2: USB ACM device [1199003.752999] cdc_acm 1-2.3:1.2: ttyACM3: USB ACM device ...
...
Connect to the serial console of the nRF5340 application core using a terminal program on your Linux PC:
Code Block |
---|
picocom -b 115200 /dev/ttyACM3 |
...
Identifying USB Serial Ports of nRF5340
Use dmesg
to identify the USB Serial Ports exposed on the J3 USB connector by the main nRF5340 SoC of the nRF5340 DK:
Code Block |
---|
$ sudo dmesg
...
[83484.658759] usb 1-2.4: new full-speed USB device number 46 using uhci_hcd
[83484.979567] usb 1-2.4: New USB device found, idVendor=2fe3, idProduct=0001, bcdDevice= 3.04
[83484.979584] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[83484.979590] usb 1-2.4: Product: Zephyr USBD ACM console
[83484.979601] usb 1-2.4: Manufacturer: ZEPHYR
[83484.979606] usb 1-2.4: SerialNumber: 172430EEEFC6BEFD
[83484.988087] cdc_acm 1-2.4:1.0: ttyACM4: USB ACM device
... |
Note that the CDC-ACM USB device is disconnected and connected again on every reset of the nRF5340 SoC.
4. Serial Console of the nRF9161
The nRF9161 serial console is available on the VCOM0 serial port of the nRF9161 DK. Connect to it using a terminal program on your Linux PC:
Code Block |
---|
picocom -b 115200 /dev/ttyACM2 |
4. Serial Console of the nRF9161
ttyACM0 |
After the Thingy-9151-Lite application image is programmed to the target board, reset the board and observe the Zephyr banner and shell on the serial console:
...
5. Serial Console of the nRF5340 Application Core
The nRF5340 (application core) serial console is available on the USB serial port of the nRF5340. Connect to it using a terminal program on your Linux PC:
Code Block |
---|
picocom -b 115200 /dev/ttyACM4 |
This serial console can be re-directed to the standard VCOM1 serial port by changing the board overlay file (thingy9151lite_nrf5340_cpuapp_app/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay
):
Code Block |
---|
/ {
chosen {
// zephyr,console = &cdc_acm_uart0;
// zephyr,shell-uart = &cdc_acm_uart0;
};
}; |
Connect to it using a terminal program on your Linux PC:
Code Block |
---|
picocom -b 115200 /dev/ttyACM3 |
After the Thingy-9151-Lite application image is programmed to the target board, reset the board and observe the Zephyr banner and shell on the serial console:
...
6. Serial Console of the nRF5340 Network Core
The nRF5340 (network core) serial console is available on the VCOM0 serial port of the nRF5340 DK. Connect to it using a terminal program on your Linux PC:
Code Block |
---|
picocom -b 115200 /dev/ttyACM2 |
After the Thingy-9151-Lite application image is programmed to the target board, reset the board and observe the Zephyr banner on the serial console:
...