- Baud, parity, and stop bits must match the meter exactly. One mismatch looks like random CRC fail.
- RS-485 needs a transceiver and correct DE/RE timing. Half-duplex collisions corrupt frames.
- Bias and termination on long buses matter. A lab short cable can hide a field wiring problem.
- Confirm slave ID and register map against the vendor sheet, not a generic example.
Short answer
ESP32 Modbus RTU gets CRC errors. What is usually wrong?
中文
短答
ESP32 Modbus RTU 总报 CRC 错,多半是什么?
- 波特率、校验、停止位要和表计完全一致。差一项就像随机 CRC。
- RS-485 要有收发器,DE/RE 时序要对。半双工撞车会毁掉帧。
- 长线要考虑偏置与终端。台上短线会掩盖现场布线问题。
- 从站地址和寄存器表按厂家手册核,不要套通用例程。