When I run minicom (--device /dev/ttyACM0 --baud 115200) it prints few random characters [1]. I've confirmed with oscilloscope that baud is correct (width of bit slightly less than 10µs), tried every USB port on the laptop and different cable, but nothing changed. Then I tried two other machines and it just worked [2]. Then I've tried screen (/dev/ttyACM0 115200) and it worked without an issue, and even minicom started to work, until I unplugged it and it stopped working again. So, there is something that causes Nucleo's serial port on minicom to not work on that one particular machine unless I run screen before. I tried to run setserial (-a /dev/ttyACM0) to check if there is any difference between before and after screen, but I don't see any [3]. Dmesg looks same on every machine [4]. How to fix this?
[1]
Code: Select all
Welcome to minicom 2.10
OPTIONS: I18n
Compiled on Feb 15 2026, 11:53:04.
Port /dev/ttyACM0, 16:42:38 [F]
Press CTRL-A Z for help on special keys
�j��|3�Code: Select all
Welcome to minicom 2.10
OPTIONS: I18n
Compiled on Apr 3 2025, 22:04:57.
Port /dev/ttyACM1, 16:41:52 [F]
Press CTRL-A Z for help on special keys
*** Booting Zephyr OS build v4.3.0-7117-g6006d5c3a5ba ***
Hello World! nucleo_f401re/stm32f401xeCode: Select all
/dev/ttyACM0, Line 0, UART: unknown, Port: 0x0000, IRQ: 0
Baud_base: 0, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normalCode: Select all
[ 7124.007572] usb 1-2: new full-speed USB device number 15 using xhci_hcd
[ 7124.374853] usb 1-2: New USB device found, idVendor=0483, idProduct=374b, bcdDevice= 1.00
[ 7124.374856] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7124.374857] usb 1-2: Product: STM32 STLink
[ 7124.374858] usb 1-2: Manufacturer: STMicroelectronics
[ 7124.374859] usb 1-2: SerialNumber: 066BFF554869774867232444
[ 7124.528867] usb-storage 1-2:1.1: USB Mass Storage device detected
[ 7124.528913] scsi host11: usb-storage 1-2:1.1
[ 7124.534873] cdc_acm 1-2:1.2: ttyACM1: USB ACM device
[ 7125.550746] scsi 11:0:0:0: Direct-Access MBED microcontroller 1.0 PQ: 0 ANSI: 2
[ 7125.550810] sd 11:0:0:0: Attached scsi generic sg1 type 0
[ 7125.554065] sd 11:0:0:0: [sdb] 1096 512-byte logical blocks: (561 kB/548 KiB)
[ 7125.554255] sd 11:0:0:0: [sdb] Write Protect is off
[ 7125.554256] sd 11:0:0:0: [sdb] Mode Sense: 03 00 00 00
[ 7125.554444] sd 11:0:0:0: [sdb] No Caching mode page found
[ 7125.554445] sd 11:0:0:0: [sdb] Assuming drive cache: write through
[ 7125.606488] sd 11:0:0:0: [sdb] Attached SCSI removable disk



