简体   繁体   English

设备重置时USB串行端口垃圾

[英]USB serial port garbage when the device resets

When I reset a USB device that is connected via USB serial it starts printing garbage. 当我重置通过USB串行连接的USB设备时,它将开始打印垃圾。

If I close out the serial monitor (using Arduino's serial console but should not matter) and reopen, clean text starts printing. 如果我关闭了串行监视器(使用Arduino的串行控制台,但没有关系)并重新打开,则开始打印干净的文本。 Judging by the rate of transmission, the garbage is clearly caused by my device doing normal serial printing -- that is, it is not random garbage. 从传输速率来看,垃圾显然是由我的设备执行正常的串行打印导致的,也就是说,它不是随机垃圾。

This is a homebrew USB serial device so the problem could very well be in there. 这是一个自制的USB串行设备,因此问题很可能就在那里。 In fact, I can very easily change the code in USB serial device, but cannot do the same for the serial terminal program :-), so would prefer if the solution was there. 实际上,我可以很容易地更改USB串行设备中的代码,但是不能对串行终端程序:-)进行相同的操作,因此,如果有解决方案,则我更愿意这样做。

No, this is not an incorrect baud or parity setting so please don't suggest it! 不,这不是错误的波特率或奇偶校验设置,因此请不要提出! :-) :-)

Thanks for any help/ideas! 感谢您的帮助/想法!

Is it printing garbage even when nothing is being (intentionally) transmitted? 即使什么也没有(有意地)传输,它也打印垃圾吗? If so, there is a hardware problem. 如果是这样,则存在硬件问题。 Either it resets into a "break" state, or it is jabbering. 它要么重置为“中断”状态,要么正在刺戳。

If it happens only when data is written through it, then, when the device resets, what serial settings does it default to? 如果仅在写入数据时发生这种情况,那么当设备复位时,它默认为什么串行设置? Almost certainly this is caused by a speed/data bits/stop bits problem. 几乎可以肯定,这由速度/数据位/停止位问题引起的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM