Electronic – How to get 1-10MB/s of debugging data to and from a dev board

serialusb

Here's the fundamental problem I have: I'm looking at a dev board for, say, a TI/AD/Microchip microprocessor or DSP. This is long before a full product design; we're talking proof-of-concept work here. I want to send data from a PC to be processed by my firmware, or have my firmware send data to my PC. And I want the rate to be of the order of 1-10MB/s.

15+ years ago, 1-10MB/s would have been quite niche. kB/s would have been more usual, and the dev board would have had a DB9 connector on it. I could have just plugged a serial cable between the dev board and my PC, perhaps with a USB-to-serial converter, and read and write to COMX or /dev/ttySX.

However, this scheme has a number of limitations that are now starting to show up:

  • I want MB/s, not kB/s.
  • The absolute max UART rate a 100MHz device could manage is still only 0.7 MB/s. SPI on the other hand allows up to 3-4 MB/s.
  • It's incredibly rare for PCs to come with serial ports now, so specialised adaptors are needed to interface with a PC eg. USB to serial cable.

But I'm stumped for what I could use to replace the old serial scheme. The main context for this question is sending serialised debugging data between vendor dev boards and a PC before design is finalised, so anything requiring secondary devices eg. Bluetooth isn't super useful. The µPs I typically work with are in the realm of TI's MSP430, Microchip's PIC32M*, and low power DSPs like the TI C55x or C674. Their dev boards might typically come with headers connected to SPI/I2C/UART peripherals.

Ethernet would require full implementation of a networking stack, which isn't really practical on the constrained DSPs or µPs I often work with. Furthermore most PCs only have one ethernet port, if at all, so you wouldn't be able to use it for wired networking.

Ground-up USB requires getting a vendor ID from a 3rd party, and reinventing all sorts of wheels at the driver and software level just to get data from one device to another.

Ideally I'd like to just be able to dump bytes in a peripheral register on my µP and drain it using Python on the PC or vice versa, using a cable most IT departments would have lying around, and get 1-10 MB/s. A bonus would be not having to poll every available port of whatever kind to find the device on a PC. Is this possible?

Best Answer

Modern successor for a RS232 communication port is supposed to be USB. However, people need to realize that if it is used for debug purposes, it must have some serious architecture support at system level, the port must have some internal bridges to uP registers and memories.

Starting in 2002, Intel has made an attempt to implement mandatory debug functions into open-standard EHCI controller. There was even some support for it, from Linux and Microsoft side, although, as I understand, all the effort had limited success.

With an advent of USB 3, the effort was resurrected, see USB 3.1 Debug Class Specifications.

Most recent Type-C connector also defines "Debug Accessory Mode", see pp 59-60. I believe there are several auxillary verions in the works on how to use the pins in alternate way, including JTAG functionality.

However, the old RS232 is not going away and refuses to die. The reason is that most uP and mini-OS are relying on venerable COM ports for many functions, and all Linux/Android flavors have a built-in debug support in kernel. And the UART circuitry/port is fairly simple to implement in silicon with very few resources. However, instead of placing bulky DB-9 connectors (which sometimes are bigger than the device itself) people are embedding a UART-USB converter on-board (typically of FTDI type), and use the miniature u-A/B USB connectors to attach to debug host, emulating COM port and using standard terminal software to access it.