Arm7 USB编程

发布于 2024-08-14 08:25:40 字数 265 浏览 5 评论 0原文

我们正在开发一个发送器设备,带有arm7(当前:LPC2368)。

该设备采样一个mv信号,A/D,并需要将该信号数据发送到PC。(连续)

同时,PC需要向arm7发送命令(如获取温度,控制状态等。)

rs232是太慢了,所以我们选择USB。(20K/s - 200K/s)

但问题是,我们不知道如何进行USB编程(PC和ARM..)

有什么方向吗?任何门户网站?有教程吗?

目前我们仅将设备模拟为 HID......

we are developing a sendor device, with a arm7(current: LPC2368) .

this device samples a mv signal,A/D, and need to send this signal data to the PC.(continusly)

at the same time, PC need send command to arm7 (like get temperature, control status, etc..)

rs232 is too slow, so we choose USB.(20K/s - 200K/s)

but the question is, we donnot known how to do usb programming(both pc and arm..)

any direction? any portal? any tutorial?

currently we only sim the device as a HID....

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

稍尽春風 2024-08-21 08:25:40

对于 ARM 端,您需要一个 USB 堆栈。对于 PC 端,您需要实现 USB 驱动程序和连接该驱动程序的应用程序。因此,更容易坚持使用一种常见的配置文件(HID、大容量存储、虚拟 COM)。对于所有这些,您将能够找到 USB 堆栈,而不必实现自己的。此外,您也不需要为 PC 实现 USB 驱动程序。

我认为最简单的方法是使用虚拟 COM 方法。从 PC 端来看,您可能正在访问串行端口。但速度可能高于标准 RS232 端口。我发现这个 USB 堆栈 针对早期处理器。您可以根据您的需要对其进行调整或将其用作参考。通常,PC 的虚拟 COM 驱动程序将与 ARM USB 堆栈一起提供。

另一种方法是使用 libusb。这将允许您与 USB 交互,而无需编写内核驱动程序。

有关应用说明和商业 USB 堆栈,请查看此处。如果您决心编写自己的堆栈和驱动程序,Jungo 是行业领导者嵌入式 USB 堆栈和驱动程序。

For the ARM side you need a USB Stack. For the PC side you need to implement an USB driver and an application interfacing the driver. It is therefore easier to stick to one of the common profiles (HID, Mass Storage, Virtual COM). For all these you will be able to find USB stacks and not to have to implenent your own. Also you won't need to implement a USB driver for the PC.

I think that the easiest thing to do is to use a Virtual COM approach. From the PC side it would like you are accessing a Serial Port. The speed however can be higher than standard RS232 ports. I have found this USB Stack targetting an earlier processor. You could adapt it for your needs or use it as reference. Generally a Virtual COM driver for the PC will be provided along with the ARM USB stack.

Another approach is to use libusb. This will allow you to interact with USB without writing a kernel driver.

For application notes and commercial USB stacks look here. If you are determined to write your own stack and driver, Jungo is the industry leader for embedded USB stacks and drivers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文