
Pitfall Log: Fixing Modbus Multithread Deadlocks
A field note on shutdown deadlocks and timeout misjudgment in a Qt multithreaded Modbus workflow, with practical fixes.

A field note on shutdown deadlocks and timeout misjudgment in a Qt multithreaded Modbus workflow, with practical fixes.
An industrial PC (TI AM64x heterogeneous SoC, A53 Linux + R5F RTOS, 24V supply) garbles continuously on a 3-wire RS-232 port at correct 115200 8N1 settings. Via SSH, the tx/rx/fe counters in /proc/tty/driver/serial verified both directions of the channel, ruling out software and unit defects; garbling persisted with only GND connected and vanished the moment the laptop’s power adapter was unplugged — a ground loop between the 24V industrial supply and mains. Dual-isolation converter verified in practice: no interference with the laptop plugged in.

A practical guide to a lightweight Modbus tool for embedded development and field commissioning: fast frame building, log viewing, Frame Analyzer with scaling/register annotations/JSON-CSV persistence, Link to Analyzer live linkage, and Force Parse.