我在 iMx6 上运行 Debian 8,一切正常,直到我快速关闭并打开电源。(快速电源循环)我在 dmesg 上收到此信息:
usb 1-1.6: device no response, device descriptor read/64, error -32
如果我使用 ssh 登录并执行重启命令,我会得到与上次启动相同的错误。但如果我将其关闭并等待至少 5 秒钟,USB 就可以毫无问题地启动。
有人知道错误 -32 是什么意思吗?
这里是 dmesg 输出:
root@vasoport:~# dmesg | grep usb
[ 0.234446] usbcore: registered new interface driver usbfs
[ 0.234522] usbcore: registered new interface driver hub
[ 0.234614] usbcore: registered new device driver usb
[ 0.234783] 2000000.aips-bus:usbphy_nop1 supply vcc not found, using dummy regulator
[ 0.234907] 2000000.aips-bus:usbphy_nop2 supply vcc not found, using dummy regulator
[ 1.319001] usbcore: registered new interface driver rtl8192cu
[ 1.323787] usbcore: registered new interface driver cdc_ether
[ 1.328389] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[ 1.345027] usbcore: registered new interface driver cdc_acm
[ 1.356196] usbcore: registered new interface driver usb-storage
[ 1.361036] usbcore: registered new interface driver usbserial
[ 1.365648] usbcore: registered new interface driver usbserial_generic
[ 1.370922] usbserial: USB Serial support registered for generic
[ 1.375698] usbcore: registered new interface driver cp210x
[ 1.380013] usbserial: USB Serial support registered for cp210x
[ 1.384702] usbcore: registered new interface driver ftdi_sio
[ 1.389202] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 1.395287] usbcore: registered new interface driver option
[ 1.399600] usbserial: USB Serial support registered for GSM modem (1-port)
[ 1.406359] 2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
[ 1.460961] usb0: HOST MAC 42:3f:32:d8:7c:c0
[ 1.464020] usb0: MAC ea:65:54:9f:3e:fe
[ 1.592253] usbcore: registered new interface driver uvcvideo
[ 1.621151] usbcore: registered new interface driver bcm203x
[ 1.625616] usbcore: registered new interface driver btusb
[ 1.629884] usbcore: registered new interface driver ath3k
[ 1.773230] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[ 2.213248] usb 1-1.1: new low-speed USB device number 3 using ci_hdrc
[ 2.313217] usb 1-1.1: device no response, device descriptor read/64, error -32
[ 2.503239] usb 1-1.1: device no response, device descriptor read/64, error -32
[ 2.703225] usb 1-1.1: new low-speed USB device number 4 using ci_hdrc
[ 2.793222] usb 1-1.1: device no response, device descriptor read/64, error -32
[ 2.993222] usb 1-1.1: device no response, device descriptor read/64, error -32
[ 3.183224] usb 1-1.1: new low-speed USB device number 5 using ci_hdrc
[ 3.190138] usbcore: registered new interface driver usbhid
[ 3.194438] usbhid: USB HID core driver
[ 3.197772] usbcore: registered new interface driver snd-usb-audio
[ 3.371438] usb_otg_vbus: disabling
[ 3.603314] usb 1-1.1: device not accepting address 5, error -32
[ 3.703272] usb 1-1.1: new low-speed USB device number 6 using ci_hdrc
[ 4.123304] usb 1-1.1: device not accepting address 6, error -32
[ 4.136116] usb 1-1-port1: unable to enumerate USB device
[ 4.373263] usb 1-1.6: new low-speed USB device number 7 using ci_hdrc
[ 4.453252] usb 1-1.6: device no response, device descriptor read/64, error -32
[ 4.643963] usb 1-1.6: device no response, device descriptor read/64, error -32
[ 4.833317] usb 1-1.6: new low-speed USB device number 8 using ci_hdrc
[ 4.943258] usb 1-1.6: device no response, device descriptor read/64, error -32
[ 5.133246] usb 1-1.6: device no response, device descriptor read/64, error -32
[ 5.323272] usb 1-1.6: new low-speed USB device number 9 using ci_hdrc
[ 5.743293] usb 1-1.6: device not accepting address 9, error -32
[ 5.843271] usb 1-1.6: new low-speed USB device number 10 using ci_hdrc
[ 6.263291] usb 1-1.6: device not accepting address 10, error -32
我认为这看起来像是与电压有关的问题,但是有没有办法在软件方面解决这个问题?
编辑:这里是电压 5V 和 3V3 以及 iMx6 复位输出引脚,它们或多或少表明 3V3 电压正常。
正常启动
快速启动
答案1
您可以在以下位置找到错误代码错误代码, 包括errno 库按照惯例,返回的错误代码为负数,因此 -32 表示“管道损坏”,这很可能只是 USB 读取或写入失败的结果。
2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
看起来很可疑,特别是当你等待再次打开它之前它没有出现时。
第一个猜测是,过快地循环电源不会完全放电某些 USB 相关芯片的内部容量,因此如果再次打开它,它会处于不良状态,并且设备初始化代码要么不处理该状态,要么无法处理它,因为该状态从来就不应该发生。
它可能可以通过仔细检查数据表并谨慎地将所有内容初始化为正确状态(必要时设置超时)来修复软件问题。但这不会很有趣,需要很长时间,而且您需要编写驱动程序代码的技能。然后糟糕的状态可能会非常疯狂,以至于无法正常工作。
因此,最简单的解决方法是“不要太快地进行电源循环”。
答案2
因此,一个解决方案是有源电容放电电路在 5V 和 3V3 电源中使用 mosfet。就像这个电路:https://electronics.stackexchange.com/questions/201343/discharge-power-rail-with-mosfet
Mosfet电路放电电容: