在Windows上的软件中关闭USB设备电源 [英] Power off an USB device in software on Windows

查看:754
本文介绍了在Windows上的软件中关闭USB设备电源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过Windows上的软件对USB设备进行加电。

I would like to power cycle an USB device through software on Windows.

我正在一个小型USB电源微控制器上进行开发。该芯片将在电源循环中恢复为本机行为,并允许代码下载。由于我的代码会在设备发生故障时崩溃,因此忽略所有的USB命令 - 我必须从系统中拔掉设备。

I am doing development on a small USB power microcontroller. This chip will revert to native behavior on a power cycle and allow a code download. Since my code will crash the device when things go wrong -- making it ignore all USB commands -- I have to physically unplug the device from the system.

我想远程进行开发,而不必在实际中存在。

I want to do development remotely, and not have to be physically present.

到目前为止,我已经尝试使用devcon来禁用USB堆栈的部分。虽然这需要集线器进入D3(应关闭电源!),但仍然有电源供应给设备。

So far I have tried using "devcon" to disable portions of the USB stack. While this takes the hubs into D3 (should be powered off!), there is still power being supplied to the device.

是否有任何预先存在的解决方案或SetupAPI技巧可能有帮助?

Are there any preexisting solutions or SetupAPI tricks that might help?

推荐答案

p>由于它是开发/测试而不是生产,我建议您有一个 solid-state_relay 作为第二个设备的一部分,并使用它来循环USB连接的电源。

Since it's for development/test instead of production, I'd recommend having a solid-state_relay as part of a second device and using that to cycle the power on the USB connection.

这篇关于在Windows上的软件中关闭USB设备电源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆