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