AT90USB162 (Minimus AVR) 上的 CDC 演示 COM 端口代码

发布于 2024-12-13 04:49:14 字数 3007 浏览 4 评论 0原文

我打算使用我的 AT90USB162(集成为 Minumus AVR USB 板)作为具有 COMPORT 的通信设备类。在 Minimus AVR 主站点中,它提供了为我的芯片构建 COMPORT 十六进制的代码,在 AVR-USB-162-CDC.zip(该项目使用WinAVR 4,但您也可以使用 WinAVR 5 构建它,请参阅 在 AVR Studio 5 中构建 AVR Studio 4 项目)。当我构建代码时,我将十六进制文件加载到芯片中并进行重置。问题是我的 Windows 7-64 无法识别新 COMPORT 的添加,因此我无法从设备管理器访问它(因此也无法从超级终端访问它),实际上当我将内置芯片插入 USB 端口时,它什么也没有发生。

因此,我需要让我的 Windows 将我的芯片识别为 AT90USB162 的 USB COMPORT。我该怎么做呢?我什么没做?

我还尝试了 AVR-CDC 站点 中的 .hex 文件和驱动程序,但是实际上我的芯片的驱动程序不可用(我仍然尝试使用那里提供的其他驱动程序)。但没有回应。

更新

我在 AVR-CDC Windows 驱动程序部分< /a> 说:

(*) Vista/7 x64 不接受未经授权的内核模式驱动程序。您必须在系统启动期间关闭“驱动程序 > 签名强制”。有一个工具可以对驱动程序进行签名。 驱动程序签名强制覆盖 请参阅/vista64/Readme64.txt 中的说明。

因此,当我下载驱动程序签名强制覆盖程序时,我按照 /vista64/Readme64.txt 上的说明进行操作。简而言之,它应该使 Windows 能够接收 AVR-CDC 驱动程序附带的 CDC 驱动程序 lowcdc.sys 和 lowcdc.inf。

但仍然没有得到回应。

更新

我测试了在 Windows XP SP3 计算机上加载微芯片。因此,这不是 Windows 7/64 中的驱动程序签名强制问题。

更新

我发现了这个:Engbedded AVR Fuse Calculator但不'不知道如何使用这个。

更新

我从 avrfreaks 论坛上从用户clawson那里得到了以下答案:

“尝试下载 usbdeview.exe 以查看枚举期间会发生什么。可能是所提供的 VID/PID 需要 .inf 文件来选择 您可以做的

一件事是下载 LUFA 并在其中构建一个 CDC 示例 - 它几乎一定可以工作。”

但还是没有成功。我下载了 usbdeview 并尝试观看芯片。但是当我将其插入USB端口时,如果.hex烧录文件是CDC,则仍然没有任何反应。

我还下载了 LUFA 并尝试构建 CDC 示例。也没有成功。在makefile中,我设置MCU = at90usb162,F_CPU = 16000000,FLASH_SIZE_KB = 16,BOOT_SECTION_SIZE_KB = 4,其他参数保持不变。我还更改了 AVR Studio 项目定义以设置为 at90usb162。生成的十六进制文件没有错误。但是当我尝试烧录芯片时,Flip 应用程序向我返回错误消息“地址我们超出范围。”。最后我意识到新的 .hex 文件与前一个文件相同(没有更改 makefile 和 AVR Studio 项目文件)。

那么,也许更多人有想法?

更新

也许是驱动程序问题? (而不是 .hex 的问题?)有什么解决方案吗?

更新

我在该芯片的 Atmel 应用说明网站 应用说明 AVR296:AVRUSBRF01 USB RF Dongle 用户指南,其中描述了使用此功能的方法芯片作为 CDC,并提供用于烧录芯片的 .a90 文件和用作 Windows 驱动程序的 .inf 文件。我已使用提供的 AVRUSBRF01-AT90USB162-usbdevice_cdc_rf-2_0_1.a90 文件烧录了我的芯片,并在 Windows 上安装了 at90usbxxx_cdc.inf 驱动程序。并且Windows成功识别了COMPORT,因此问题不在于芯片,可能在于CDC演示代码本身。

那么,有人可以确定代码中的错误/错误在哪里吗?

I intend to use my AT90USB162 (integrated as Minumus AVR USB board) as a Communication Device Class with COMPORT. In Minimus AVR home site, it gives an code for building a COMPORT hex to my chip, in AVR-USB-162-CDC.zip (this project uses WinAVR 4, but you can build it using WinAVR 5 too, see Build AVR Studio 4 project in AVR Studio 5). As I build the code, I load the hex file into the chip and make an reset. The problem is that my Windows 7-64 does not recognize the addition of the new COMPORT so I cannot access it from Device Manager (and thus neither from Hyperterminal), actually when I plug the built chip on the USB port, it happens nothing.

So, I need to make my Windows recognize my chip as an USB COMPORT for my AT90USB162. How can I do it? What didn't I do?

I also tried the .hex files and drivers from AVR-CDC site, but actually a driver for my chip is not available (still I tried using other ones available from there). But no response.

Update

I found a note in AVR-CDC Windows Driver Section saying:

(*) Vista/7 x64 does not accept unauthorized kernel-mode drivers. You have to turn "Driver > Signature Enforcement" off during system boot- up. There is a tool to sign the driver. Driver Signature Enforcement Overrider
See the instruction in /vista64/Readme64.txt.

So as I downloaded the Driver Signature Enforcement Overrider, I followed the instructions on /vista64/Readme64.txt. In brief, it should enable Windows to receive the CDC drivers lowcdc.sys and lowcdc.inf, which comes with AVR-CDC drivers.

But still got no response.

Update

I tested loading the microchip on a Windows XP SP3 machine. So it's not a Driver Signature Enforcement problem from Windows 7/64.

Update

I've found this: Engbedded AVR Fuse Calculator but don't have any idea on how using this.

Update

I got the following answer from avrfreaks forum from user clawson:

"Try downloading usbdeview.exe to see what happens during enumeration. It could be that the VID/PID presented requires a .inf file to select the correct driver.

One thing you could do is download LUFA and build a CDC example in that - it's almost bound to work."

But still did not work. I downloaded usbdeview and tried to watch the chip. But when I plug it in USB port, it still happens nothing if the .hex burned file is the CDC.

I also downloaded LUFA and tried to build the CDC example. Got no success too. In makefile I set MCU = at90usb162, F_CPU = 16000000, FLASH_SIZE_KB = 16, BOOT_SECTION_SIZE_KB = 4 and the other parameters I let unchanged. I also changed AVR Studio project definitions to set at90usb162. The hex file is generately without errors. But when I try to burn the chip, Flip app returns me error message "Address us out of range.". And finally I realized that the new .hex file is equal to the previous one (without changing makefile and AVR Studio project file).

So, maybe does someone more have an idea?

Update

Maybe it's a driver problem? (and not a problem from the .hex?) Any solution?

Update

I found in Atmel Application Notes site for this chip the App Note AVR296: AVRUSBRF01 USB RF Dongle user's guide, which described a way to use this chip as CDC and supplies the .a90 file to burn the chip and the .inf file to use as a Windows driver. I have burned my chip with the AVRUSBRF01-AT90USB162-usbdevice_cdc_rf-2_0_1.a90 file provided and installed the at90usbxxx_cdc.inf driver on my Windows. And Windows recognized the COMPORT successfully, so the problem is not with the chip, probably is on the CDC demo code itself.

So, could someone identify where is the error/mistake in the code?

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

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

发布评论

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

评论(2

萌逼全场 2024-12-20 04:49:14

尝试使用 LUFA 无疑是一个非常好的主意,对于初学者来说,您可能需要忽略无线子系统 - 只需看看您是否可以让一些基本 USB 设备示例正常工作。

如果可行,请了解如何集成无线电驱动程序。您可能还希望查看 TinyOS 和/或 Contiki。您可能无法使用6loWPAN,如果我没记错的话,Nordic 没有IEEE 802.15.4 芯片。但您仍然可以在 Contiki 中使用 Rudolph 或在 TinyOS 中使用 ActiveMessage

如果您想让 Atmel 代码正常工作,最好通过 Atmel 提供的支持设施联系他们。更有可能的是 AVR Freaks 上的某个人可能使用过这个特定的板,我怀疑您可能会找到一个在这里回答,这将特定于您正在查看的参考设计。

It is certainly a very good idea to try using LUFA, may be for starters you need to ignore the wireless sub-system - just see if you can get some of the basic USB device examples working.

If that works, see how to integrate the driver for the radio. You may also wish to have a look at TinyOS and/or Contiki. You probably will not be able to use 6loWPAN, if I remeber correct, Nordic had no IEEE 802.15.4 chips. But you can still use Rudolph in Contiki or ActiveMessage in TinyOS.

If you would like to get the Atmel code to work, it's probably best to contact Atmel via support facilities they provide. It is more quite likely that someone on AVR Freaks could have used this particular board, I doubt that you may find an answer here, which would be specific to the reference design which you are looking at.

聚集的泪 2024-12-20 04:49:14

当我将内置芯片插入 USB 端口时,没有任何反应。

仅当您忘记其中一根 USB 数据线上的 1.5 kOhm 上拉电阻时,才会发生这种情况。没有它就没有 USB 通信。在某些情况下,该电阻器位于片内,而另一些情况下则需要一个外部电阻器。

when I plug the built chip on the USB port, it happens nothing.

This only happens when you forgot the 1.5 kOhm pullup resistor on one of the USB data lines. There is no USB communication without it. In some cases this resistor is on-chip, others need an external one.

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