USB Serial port on Nitrogen

Thanks to help from the people on the Zephyr teams (Andy) I have Zephyr up and running on my Nitrogen board. I have setup Eclipse to compile, download, and debug with PyOCD. I can single step through code and everything is working well except…

The USB Serial port is not available. When I plug in a FreeScale Freedom board, or a ST-Micro STM32F4xx board I get two USB devices, the CMSIS-DAP device and a USB Serial device (COMxx on a Windows host, or /dev/ttyXXX on Apple or Linux hosts). The serial port is really useful, I can put printf statements (like “Hello World”) in my code and get a feel that things are working.

But the Nitrogen board when connected to USB only has one device (The CMSIS-DAP port). Is there a trick to getting access to the nrf52 serial port? Do I need to use an Audio Mezzanine, UART Serial, or a USB Serial cable to get access to the serial port?

-Lawrence-

P.S. @sdrobertw There are many wiki pages on how to setup Zephyr on the project-zephyr web, they give many conflicting, or outdated setup steps, and often interchange linux, windows and Apple instructions, sometimes even in the same page. I have a rough document on how I got Nitrogen development running on Oracle VM/Ubuntu 18.04 under Windows, which it should be turned into a Wiki.

Weird, I have a nitrogen v1.1 and USB serial is correctly enumerated:

[256770.983412] usb 1-2: new full-speed USB device number 20 using xhci_hcd
[256771.134826] usb 1-2: New USB device found, idVendor=0d28, idProduct=0204, bcdDevice= 1.00
[256771.134832] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[256771.134837] usb 1-2: Product: MBED CMSIS-DAP
[256771.134841] usb 1-2: Manufacturer: MBED
[256771.134844] usb 1-2: SerialNumber: 9009022103BB4AD7FE652526
[256771.145213] usb-storage 1-2:1.0: USB Mass Storage device detected
[256771.145724] scsi host0: usb-storage 1-2:1.0
[256771.146408] cdc_acm 1-2:1.1: ttyACM0: USB ACM device
[256771.149983] hid-generic 0003:0D28:0204.0005: hiddev0,hidraw3: USB HID v1.00 Device [MBED MBED CMSIS-DAP] on usb-0000:00:14.0-2/input3
[256772.168178] scsi 0:0:0:0: Direct-Access     MBED     microcontroller  1.0  PQ: 0 ANSI: 2
[256772.169009] sd 0:0:0:0: Attached scsi generic sg0 type 0
[256772.183176] sd 0:0:0:0: [sda] Attached SCSI removable disk

What is the output of lsusb -v -d 0d28: ?

Maybe something wrong with your CMSIS-DAP firmware, maybe you can try to update it [1] [2].

Note: I personnaly tried to update my CMSIS-DAP firmware but my board is now stuck in maintenance mode (CRP DISABLD), not sure why.

[1] DAPLink bootloader update | Mbed
[2] https://github.com/ARMmbed/DAPLink/releases

Thanks @Loic,

I didn’t mention this, but I am running Ubuntu on a Virtual Machine (Oracle VirtualBox) under Windows. Because the CMSIS-DAP device showed up under both Windows and Ubuntu was looking for the serial device under Windows, but the VM grabs the serial device and it doesn’t show up under Windows. As soon as I looked in Ubuntu there it was: /dev/ttyACM0. I’m all good to go now.

1 Like