主题中讨论的其他器件:C2000WARE
您好!
我将配置 USB 模块、 以连续记录数据并将其发送到 PC 和 PC。 为此、我想直接访问 USB 寄存器来配置模块。 但无法在 TI 提供的现有 USB 示例中查看寄存器文件。 此外、我无法看到不同 API 中使用的函数主体。 请提供一些解决 方案、说明如何通过直接写入寄存器来配置 USB 模块。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
我将配置 USB 模块、 以连续记录数据并将其发送到 PC 和 PC。 为此、我想直接访问 USB 寄存器来配置模块。 但无法在 TI 提供的现有 USB 示例中查看寄存器文件。 此外、我无法看到不同 API 中使用的函数主体。 请提供一些解决 方案、说明如何通过直接写入寄存器来配置 USB 模块。
您好!
现有示例使用 USB 库 、该库 提供了一组数据类型和函数、用于创建 USB 器件、主机或双模应用。 USB Lib 源代码位于 C2000Ware 中的 \\libraries\communications\USB\f2837xd。
C2000Ware 中的 driverLB 文件夹\driverlib\f2837xd\driverlib 文件夹下的文件 usb.c 和 usb.h 中提供了 USB DriverLib API
如果要访问 USB 寄存器、则必须使用编写自己的代码来访问 hw_usb.h 文件中定义的寄存器、该文件位于 device_support\f2837xd\common\弃 用\inc
此致
Siddharth
Debashish、
USB 基址位于 0x00040000U,您可以在 hw_memmap.h 文件 "#define USBA_base 中找到它 0x00040000U"
位于\f2837xd\driverlib\inc\hw_usb.h 的文件"HW_USB.h"定义 了 USB 寄存器偏移量。
您可以参考 C2000Ware 中提供的"USB_ex1_dev_serial"示例、此示例使用 USB 库并使用 CDC 类。
此致
Siddharth