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

nRF52840 DK virtual UART corrupting data with "USBSP"

I'm seeing strange corruption in the nrf52840 virtual COM/UART (the one that goes through USB and the JLink interface MCU).

The nrf52840 is running the UART serialization connectivity firmware. The PC is running custom software I'm developing to use the nrf through serialization.

UART settings: 1M baud rate, HWFC enabled, parity disabled.

The issue is: when sending rather large messages from PC to nRF, they get corrupted. 

For example, I'm sending this:
00 72 01 FF 01 B8 E4 59 56 16 00 01 03 19 00 00 02 01 06 0E 09 4E 6F 72 64 69 63 5F 42 6C 69 6E 6B 79 D8 E4 59 56 12 00 01 11 07 23 D1 BC EA 5F 78 23 15 DE EF 12 12 23 15 00 00 01 01 00 00 40 00 00 00 00 00 00 01 00 00 00 00 00 00 01 00 00 
and the nRF is receiving this:
55 53 42 53 50 00 00 00 00 00 00 00 00 00 00 00 02 01 06 0E 09 4E 6F 72 64 69 63 5F 42 6C 69 6E 6B 79 D8 E4 59 56 12 00 01 11 07 23 D1 BC EA 5F 78 23 15 DE EF 12 12 23 15 00 00 01 01 00 00 40 55 53 42 53 50 00 00 00 00 00 00 00 00 00 00 00

Very interestingly, chunks of the message are replaced with `55 53 42 53 50 00 00 00 00...`. which is "USBSP" in ASCII...

Message is not corrupted in USB traffic, I've checked with wireshark.

Message is corrupted in the UART between interface MCU <-> nRF MCU. I've checked with a logic analyzer in pins P0.05 .. P0.08.

This narrows down the issue to the interface MCU. Any ideas what this could be? 

I found this stackoverflow question of someone having the same symptom: stackoverflow.com/.../ttyusb-uart-sends-usb-during-transfer

Parents Reply
  • The COM port is recognized by Linux as a standard USB CDC ACM device, the jlink software shouldn't be involved in the communication process on the PC side. (I'm using Arch Linux, kernel Linux saturn 4.18.5-arch1-1-ARCH #1 SMP PREEMPT Fri Aug 24 12:48:58 UTC 2018 x86_64 GNU/Linux)

    On the firmware side: JLinkExe reports the atmel fw to be "Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41". It's what the DK came with. I don't know if it's the latest version since the version numbers here look different. I tried downloading and flashing a few different versions (dragging them to the MSD) but the firmware version JLinkExe reports is not changing... Not sure what I'm doing wrong.

Children
  • Hi,

     

    The firmware will be updated on the J-Link debugger when the software is updated, and it looks like you have a fairly new build.

    If you hold down the "IF BOOT/RESET" button, then power cycle your board, it should enumerate with a drive named "BOOTLOADER". From there, you can add the .bin file you download from our website. Could you test with this older version found on our website and see if there's a difference in the corruption?

    Note: If you run JLinkExe, it will try to update your interface MCU firmware without any prompt, so I recommend that you use nrfjprog to program the nRF again when testing this.

    Kind regards,

    Håkon

Related