This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52-DK embedded serial port issues on Ubuntu

Hi!

I have some troubles with making embedded serial port working on NRF52-DK. Basically I can receive data sent by nrf chip but I cant write. When I write something using any terminal nothing happens on the board.

HOWEVER this is not always true, sometimes it just works. I had connected multiple boards and sometimes they works. I cant find out when it works and when it doesn't.

I'm using following NRF52-DKs:

PCA10040
1.2.1
2017.44

JLink version:

$ JLinkExe
SEGGER J-Link Commander V6.22d (Compiled Dec 14 2017 18:34:26)
DLL version V6.22d, compiled Dec 14 2017 18:34:21

OS:

Linux thinkpad 4.14.11-041411-generic #201801022143 SMP Tue Jan 2 21:44:21 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Dmesg while disconnecting and connecting two boards:

[ 3280.560236] usb 1-4.1.4: USB disconnect, device number 18
[ 3280.611266] FAT-fs (sda): unable to read boot sector to mark fs as dirty
[ 3281.328193] usb 1-4.1.1: USB disconnect, device number 19
[ 3281.371319] FAT-fs (sdb): unable to read boot sector to mark fs as dirty
[ 3283.839446] usb 1-4.1.1: new high-speed USB device number 20 using xhci_hcd
[ 3283.939989] usb 1-4.1.1: config 1 interface 1 altsetting 0 bulk endpoint 0x83 has invalid maxpacket 64
[ 3283.939994] usb 1-4.1.1: config 1 interface 1 altsetting 0 bulk endpoint 0x4 has invalid maxpacket 64
[ 3283.940436] usb 1-4.1.1: New USB device found, idVendor=1366, idProduct=1015
[ 3283.940440] usb 1-4.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3283.940443] usb 1-4.1.1: Product: J-Link
[ 3283.940445] usb 1-4.1.1: Manufacturer: SEGGER
[ 3283.940448] usb 1-4.1.1: SerialNumber: 000682278658
[ 3289.143874] cdc_acm 1-4.1.1:1.0: ttyACM0: USB ACM device
[ 3289.144501] usb-storage 1-4.1.1:1.3: USB Mass Storage device detected
[ 3289.144588] scsi host0: usb-storage 1-4.1.1:1.3
[ 3289.367369] usb 1-4.1.4: new high-speed USB device number 21 using xhci_hcd
[ 3289.471937] usb 1-4.1.4: config 1 interface 1 altsetting 0 bulk endpoint 0x83 has invalid maxpacket 64
[ 3289.471942] usb 1-4.1.4: config 1 interface 1 altsetting 0 bulk endpoint 0x4 has invalid maxpacket 64
[ 3289.472431] usb 1-4.1.4: New USB device found, idVendor=1366, idProduct=1015
[ 3289.472435] usb 1-4.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3289.472437] usb 1-4.1.4: Product: J-Link
[ 3289.472440] usb 1-4.1.4: Manufacturer: SEGGER
[ 3289.472443] usb 1-4.1.4: SerialNumber: 000682577482
[ 3289.474096] cdc_acm 1-4.1.4:1.0: ttyACM1: USB ACM device
[ 3289.475022] usb-storage 1-4.1.4:1.3: USB Mass Storage device detected
[ 3289.477943] scsi host1: usb-storage 1-4.1.4:1.3
[ 3290.167746] scsi 0:0:0:0: Direct-Access     SEGGER   MSD Volume       1.00 PQ: 0 ANSI: 4
[ 3290.168195] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 3290.168569] sd 0:0:0:0: [sda] 21829 512-byte logical blocks: (11.2 MB/10.7 MiB)
[ 3290.168787] sd 0:0:0:0: [sda] Write Protect is off
[ 3290.168789] sd 0:0:0:0: [sda] Mode Sense: 0b 00 00 08
[ 3290.168999] sd 0:0:0:0: [sda] No Caching mode page found
[ 3290.169003] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 3290.172313]  sda:
[ 3290.173447] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 3290.487660] scsi 1:0:0:0: Direct-Access     SEGGER   MSD Volume       1.00 PQ: 0 ANSI: 4
[ 3290.487955] sd 1:0:0:0: Attached scsi generic sg1 type 0
[ 3290.488242] sd 1:0:0:0: [sdb] 21829 512-byte logical blocks: (11.2 MB/10.7 MiB)
[ 3290.488460] sd 1:0:0:0: [sdb] Write Protect is off
[ 3290.488461] sd 1:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[ 3290.488673] sd 1:0:0:0: [sdb] No Caching mode page found
[ 3290.488676] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 3290.491873]  sdb:
[ 3290.492697] sd 1:0:0:0: [sdb] Attached SCSI removable disk

When I was recording this log 682577482 was working. The other one didn's and both weren't working a moment before...

What can I do about it? Where to look for the reason of this strange behavior?

Thanks, Tomek

Related