I am having an issue with listening for the logs from the debug UART for SIMtrace2.
I run “make log” and I get:
Oct 04 15:37:54 �B�(@(@(@((�@(@((((����(B(B(B(B�@�(��P(@�((B(B(B(B��(@�E��@���@�@�(((B(B(B(BB(@(@(@(@
Oct 04 15:37:55 �@(�@�����R�������(@(@(@(@(@(@@��(@��(H@@(BB(���(B((B(B�B((B(B(B(B(B)B�BB(B(B(((@(�B(@(@(@(@(@(@(@(@@�@B(
Oct 04 15:37:55 P��(@@��@@�@��B(B(B(B(B(B((@(@(@(@(B(B(BB
Oct 04 15:37:55 (�@�UB(((��@�(B(B(BB(�@(��@(��@��@@(@(@(@(@@�B(B(BB(B(B(B(B(BB(BB�@@@(@(@(@(@(@�
Oct 04 15:37:55 �@(@�(@(B((B@�B(BB((B@P
Oct 04 15:37:55 (@@(��(B������T�(BBH����B(B�(���@(� ��B((���(B(B(B(B(B(B(B(BB@@(�B
I tried different stty configurations, I tried minicom and picocom, and either I would get nothing at all or more garbage.
I also tried official-build trace, and build from source trace and cardem with no difference.
stty -F /dev/ttyUSB0 -a output:
speed 921600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
Debian GNU/Linux 13.7 (trixie)
Linux 6.12.107+deb13-amd64
SIMtrace2 v1.4pi
sysmocom USB serial cable CP2102-25
The firmware side is fixed: the simtrace board image runs its debug UART at exactly 921600 8N1, from a 58.9824 MHz master clock with divisor 4. Steady garbage therefore points at the cable, the jack or the wrong board image. Check them in this order:
- Loopback the cable alone. Unplug it from the SIMtrace2, short tip to ring on the 2.5 mm plug, run picocom -b 921600 /dev/ttyUSB0 and type. A clean echo means the cable and driver are fine at 921600. Garbage means the cable is at fault.
- Read in raw mode with echo off. make log only sets the speed, so the tty stays in cooked mode with echo on and feeds everything it receives back into the board’s console. Run stty -F /dev/ttyUSB0 921600 raw -echo, then cat /dev/ttyUSB0, and press reset. You should see the “SIMtrace2 firmware …, BOARD=simtrace, APP=trace” banner.
- Push the plug fully home. A half-seated 2.5 mm plug leaves RX or ground floating and produces exactly this kind of noise. To rule out the jack, use the DEBUG header with any 3.3 V UART adapter instead: pin 1 GND, pin 4 TX, pin 5 RX.
- Check the image. The firmware Makefile defaults to BOARD=qmod, which assumes a 12 MHz crystal, so on SIMtrace2 hardware its UART comes up at the wrong baud. Build with make BOARD=simtrace APP=trace, and make sure any official image you flash starts with simtrace-.
If all four pass and you still get garbage:
- Rule out the clock. If lsusb shows 1d50:60e3 and simtrace2-sniff runs, the clock is fine. USB’s 48 MHz and the UART clock come from the same crystal, and USB would not enumerate on a bad one.
- That leaves a link that is marginal at 921600. Drop the console to 115200, which divides exactly from the same clock (divisor 32), and rebuild:
sed -i ‘s/^#define CONSOLE_BAUDRATE.*/#define CONSOLE_BAUDRATE 115200/’ libboard/common/include/board_common.h
make BOARD=simtrace APP=trace
dfu-util -d 1d50:60e3 -c 1 -a 1 -R -D bin/simtrace-trace-dfu.bin
stty -F /dev/ttyUSB0 115200 raw -echo; cat /dev/ttyUSB0
make log hardcodes 921600, so don’t use it after this change.
1 Like
That narrows it down. The cable is fine, and in raw mode nothing from the board reaches it. The garbage under make log was most likely the tty echoing its own bytes in a loop through a tip-to-ring short. A plug that isn’t fully seated does exactly that, because its tip rests on the ring contact.
- Confirm it: unplug USB so the SIMtrace2 is off, leave the plug where it is now, run picocom -b 921600 /dev/ttyUSB0 and type. If what you type comes back, tip and ring are shorted inside the jack.
- Don’t force the plug. Fully seated, no metal shaft shows and the collar sits flat against the jack, but in your photo a band of metal is still outside.
- Bypass the jack using the P2 DEBUG header with any 3.3 V USB-UART adapter:
- pin 1 GND
- pin 4 (board TX) to the adapter’s RX
- pin 5 (board RX) to the adapter’s TX
- Solder a header strip, or for a quick test press jumper wires into the holes at an angle. Then run stty -F /dev/ttyUSB0 921600 raw -echo; cat /dev/ttyUSB0 and press reset.
If the banner shows on the header, J2 is the fault. Keep using the header, or replace the jack.
1 Like
The picture clearly shows a connector that is far from being pushed in completely. If you cannot insert it without a lot of [dangerously high] mechanical force, then you likely have a plug that’s somehow broken / too thick / out-of-spec or a jack that is broken. Try pushing the plug in while slowly rotating it, and while putting pressure on the jack towards the circuit board (pushing the jack down on the board).
1 Like
Thank you! Rotating the plug did the trick, with much less force!