<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC MicrocontrollersのトピックMCUXpresso USB Generic HID Example - High Speed and 1kB Packet Size</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-USB-Generic-HID-Example-High-Speed-and-1kB-Packet/m-p/847552#M33729</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I attempted to ppst this as a blog, but I wasn't allowed to select a "place" which prevented the post, so starting a new discussion is the next best thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the details:&amp;nbsp; I was running the USB generic HID device example code from the MCUXpresso SDK for the LPCXpresso54608 board (OM13092).&amp;nbsp; This MCU/dev baord was chosen because it included a USB HS PHY.&amp;nbsp; Along with the example code, there is a C# program referenced in the readme which identifies when the correct VID and PID are registered on the PC and allows for data to be transferred to the dev board and receives/displays data that is echoed back.&amp;nbsp; Here is the link to download it, but per the example code readme, you will need to make some modifications.&amp;nbsp; I have attached the modified C# code to this post as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="" href="https://www.codeproject.com/Articles/18099/A-USB-HID-Component-for-C" style="color: #2989c5; text-decoration: none;" title="https://www.codeproject.com/Articles/18099/A-USB-HID-Component-for-C"&gt;A USB HID Component for C# - CodeProject&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Default settings for the LPC54608 example code have it running on the full-speed (FS) port (J3) with 8-byte reports.&amp;nbsp; The following changes allow the board to communicate with USB high-speed (HS) on J2 with 1024-byte reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, changing the following in "usb_device_config.h" switches the active PHY from FS / J3 to HS / J2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;/*! @brief LPC USB IP3511 FS instance count */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_DEVICE_CONFIG_LPCIP3511FS (1U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;/*! @brief LPC USB IP3511 HS instance count */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_DEVICE_CONFIG_LPCIP3511HS (0U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;/*! @brief LPC USB IP3511 FS instance count */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_DEVICE_CONFIG_LPCIP3511FS (0U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;/*! @brief LPC USB IP3511 HS instance count */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_DEVICE_CONFIG_LPCIP3511HS (1U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also changed the polling period to be as frequent as possible which I believe is supposed to be 125µs.&amp;nbsp; The change is as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In "usb_device_descriptor.h" I changed the generic buffer lengths, the HS packet sizes and the interrupt interval&amp;nbsp;&lt;SPAN&gt;to be as frequent as possible which I believe is supposed to be 125µs:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_IN_BUFFER_LENGTH (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_OUT_BUFFER_LENGTH (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_COUNT (2U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_INTERFACE_INDEX (0U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_IN (1U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_OUT (2U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_CLASS (0x03U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_SUBCLASS (0x00U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_PROTOCOL (0x00U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x04U) /* 2^(4-1) = 1ms */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x01U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x04U) /* 2^(4-1) = 1ms */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x01U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To:&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_IN_BUFFER_LENGTH (1024U) // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_OUT_BUFFER_LENGTH (1024U) // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_COUNT (2U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_INTERFACE_INDEX (0U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_IN (1U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_OUT (2U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_CLASS (0x03U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_SUBCLASS (0x00U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_PROTOCOL (0x00U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (1024U) // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x01U) /* 2^(4-1) = 1ms */ // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x01U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (1024U) // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x01U) /* 2^(4-1) = 1ms */ // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x01U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE - Though I changed the IN and OUT buffer length and packet size above, that was not sufficient to to actually change the packet size.&amp;nbsp; The report descriptor also had to be modified.&amp;nbsp; I was concerned that the parameter associated with the "Report Count" was only one byte, but with some Googling, I found a program that will generate the appropriate hex for the descriptor.&amp;nbsp; The following link explains this pretty well and provides the link to the HID descriptor tool:&amp;nbsp;&amp;nbsp;&lt;A class="" href="https://eleccelerator.com/tutorial-about-usb-hid-report-descriptors/" style="color: #2989c5; text-decoration: none;" title="https://eleccelerator.com/tutorial-about-usb-hid-report-descriptors/"&gt;Tutorial about USB HID Report Descriptors | Eleccelerator&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I included a few extra commented lines to show the descriptor changes for 255, 256, 512 and 768 byte packets with only the 1024 byte line uncommented.&amp;nbsp; The report descriptor is in the file "usb_device_descriptor.c":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;uint8_t g_UsbDeviceHidGenericReportDescriptor[] = {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x05U, 0x81U, /* Usage Page (Vendor defined)*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x82U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0xA1U, 0x01U, /* Collection (Application) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x83U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x84U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x15U, 0x80U, /* Logical Minimum (-128) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x25U, 0x7FU, /* Logical Maximum (127) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x75U, 0x08U, /* Report Size (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x95U, 0x08U, /* Report Count (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x81U, 0x02U, /* Input(Data, Variable, Absolute) */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x84U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x15U, 0x80U, /* Logical Minimum (-128) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x25U, 0x7FU, /* Logical Maximum (127) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x75U, 0x08U, /* Report Size (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x95U, 0x08U, /* Report Count (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x91U, 0x02U, /* Output(Data, Variable, Absolute) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0xC0U, /* End collection */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;uint8_t g_UsbDeviceHidGenericReportDescriptor[] = {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x05U, 0x81U, /* Usage Page (Vendor defined)*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x82U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0xA1U, 0x01U, /* Collection (Application) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x83U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x84U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x15U, 0x80U, /* Logical Minimum (-128) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x25U, 0x7FU, /* Logical Maximum (127) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x75U, 0x08U, /* Report Size (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x95U, 0xFFU, /* Report Count (255U) */ // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x01U, /* Report Count (256U) */ // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x02U, /* Report Count (512U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x03U, /* Report Count (768U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x96U, 0x00U, 0x04U, /* Report Count (1024U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x81U, 0x02U, /* Input(Data, Variable, Absolute) */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x84U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x15U, 0x80U, /* Logical Minimum (-128) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x25U, 0x7FU, /* Logical Maximum (127) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x75U, 0x08U, /* Report Size (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x95U, 0xFFU, /* Report Count (255U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x01U, /* Report Count (256U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x02U, /* Report Count (512U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x03U, /* Report Count (768U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x96U, 0x00U, 0x04U, /* Report Count (1024U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x91U, 0x02U, /* Output(Data, Variable, Absolute) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0xC0U, /* End collection */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to also change the contents of "&lt;SPAN&gt;usb_device_descriptor.h" to match the report descriptor.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have only done simple tests with these modifications so far, but by adding a timer in the PC program that starts at the beginning of the PC-USB transmission and stops after the PC receives the echoed data back from the dev board, I have been able to verify that the round trip time for 1024 bytes is ~600µs (slightly more than 2x microframes at 125µs each.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2018 21:00:43 GMT</pubDate>
    <dc:creator>nbgatgi</dc:creator>
    <dc:date>2018-09-19T21:00:43Z</dc:date>
    <item>
      <title>MCUXpresso USB Generic HID Example - High Speed and 1kB Packet Size</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-USB-Generic-HID-Example-High-Speed-and-1kB-Packet/m-p/847552#M33729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I attempted to ppst this as a blog, but I wasn't allowed to select a "place" which prevented the post, so starting a new discussion is the next best thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the details:&amp;nbsp; I was running the USB generic HID device example code from the MCUXpresso SDK for the LPCXpresso54608 board (OM13092).&amp;nbsp; This MCU/dev baord was chosen because it included a USB HS PHY.&amp;nbsp; Along with the example code, there is a C# program referenced in the readme which identifies when the correct VID and PID are registered on the PC and allows for data to be transferred to the dev board and receives/displays data that is echoed back.&amp;nbsp; Here is the link to download it, but per the example code readme, you will need to make some modifications.&amp;nbsp; I have attached the modified C# code to this post as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="" href="https://www.codeproject.com/Articles/18099/A-USB-HID-Component-for-C" style="color: #2989c5; text-decoration: none;" title="https://www.codeproject.com/Articles/18099/A-USB-HID-Component-for-C"&gt;A USB HID Component for C# - CodeProject&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Default settings for the LPC54608 example code have it running on the full-speed (FS) port (J3) with 8-byte reports.&amp;nbsp; The following changes allow the board to communicate with USB high-speed (HS) on J2 with 1024-byte reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, changing the following in "usb_device_config.h" switches the active PHY from FS / J3 to HS / J2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;/*! @brief LPC USB IP3511 FS instance count */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_DEVICE_CONFIG_LPCIP3511FS (1U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;/*! @brief LPC USB IP3511 HS instance count */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_DEVICE_CONFIG_LPCIP3511HS (0U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;/*! @brief LPC USB IP3511 FS instance count */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_DEVICE_CONFIG_LPCIP3511FS (0U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;/*! @brief LPC USB IP3511 HS instance count */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_DEVICE_CONFIG_LPCIP3511HS (1U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also changed the polling period to be as frequent as possible which I believe is supposed to be 125µs.&amp;nbsp; The change is as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In "usb_device_descriptor.h" I changed the generic buffer lengths, the HS packet sizes and the interrupt interval&amp;nbsp;&lt;SPAN&gt;to be as frequent as possible which I believe is supposed to be 125µs:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_IN_BUFFER_LENGTH (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_OUT_BUFFER_LENGTH (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_COUNT (2U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_INTERFACE_INDEX (0U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_IN (1U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_OUT (2U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_CLASS (0x03U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_SUBCLASS (0x00U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_PROTOCOL (0x00U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x04U) /* 2^(4-1) = 1ms */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x01U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x04U) /* 2^(4-1) = 1ms */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x01U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To:&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_IN_BUFFER_LENGTH (1024U) // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_OUT_BUFFER_LENGTH (1024U) // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_COUNT (2U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_INTERFACE_INDEX (0U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_IN (1U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_ENDPOINT_OUT (2U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_CLASS (0x03U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_SUBCLASS (0x00U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_HID_GENERIC_PROTOCOL (0x00U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (1024U) // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x01U) /* 2^(4-1) = 1ms */ // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x01U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (1024U) // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (8U)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x01U) /* 2^(4-1) = 1ms */ // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define FS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x01U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE - Though I changed the IN and OUT buffer length and packet size above, that was not sufficient to to actually change the packet size.&amp;nbsp; The report descriptor also had to be modified.&amp;nbsp; I was concerned that the parameter associated with the "Report Count" was only one byte, but with some Googling, I found a program that will generate the appropriate hex for the descriptor.&amp;nbsp; The following link explains this pretty well and provides the link to the HID descriptor tool:&amp;nbsp;&amp;nbsp;&lt;A class="" href="https://eleccelerator.com/tutorial-about-usb-hid-report-descriptors/" style="color: #2989c5; text-decoration: none;" title="https://eleccelerator.com/tutorial-about-usb-hid-report-descriptors/"&gt;Tutorial about USB HID Report Descriptors | Eleccelerator&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I included a few extra commented lines to show the descriptor changes for 255, 256, 512 and 768 byte packets with only the 1024 byte line uncommented.&amp;nbsp; The report descriptor is in the file "usb_device_descriptor.c":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;uint8_t g_UsbDeviceHidGenericReportDescriptor[] = {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x05U, 0x81U, /* Usage Page (Vendor defined)*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x82U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0xA1U, 0x01U, /* Collection (Application) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x83U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x84U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x15U, 0x80U, /* Logical Minimum (-128) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x25U, 0x7FU, /* Logical Maximum (127) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x75U, 0x08U, /* Report Size (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x95U, 0x08U, /* Report Count (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x81U, 0x02U, /* Input(Data, Variable, Absolute) */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x84U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x15U, 0x80U, /* Logical Minimum (-128) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x25U, 0x7FU, /* Logical Maximum (127) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x75U, 0x08U, /* Report Size (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x95U, 0x08U, /* Report Count (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x91U, 0x02U, /* Output(Data, Variable, Absolute) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0xC0U, /* End collection */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;uint8_t g_UsbDeviceHidGenericReportDescriptor[] = {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x05U, 0x81U, /* Usage Page (Vendor defined)*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x82U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0xA1U, 0x01U, /* Collection (Application) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x83U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x84U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x15U, 0x80U, /* Logical Minimum (-128) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x25U, 0x7FU, /* Logical Maximum (127) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x75U, 0x08U, /* Report Size (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x95U, 0xFFU, /* Report Count (255U) */ // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x01U, /* Report Count (256U) */ // &amp;lt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x02U, /* Report Count (512U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x03U, /* Report Count (768U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x96U, 0x00U, 0x04U, /* Report Count (1024U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x81U, 0x02U, /* Input(Data, Variable, Absolute) */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x09U, 0x84U, /* Usage (Vendor defined) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x15U, 0x80U, /* Logical Minimum (-128) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x25U, 0x7FU, /* Logical Maximum (127) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x75U, 0x08U, /* Report Size (8U) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x95U, 0xFFU, /* Report Count (255U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x01U, /* Report Count (256U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x02U, /* Report Count (512U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// 0x96U, 0x00U, 0x03U, /* Report Count (768U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x96U, 0x00U, 0x04U, /* Report Count (1024U) */ //&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x91U, 0x02U, /* Output(Data, Variable, Absolute) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0xC0U, /* End collection */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to also change the contents of "&lt;SPAN&gt;usb_device_descriptor.h" to match the report descriptor.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have only done simple tests with these modifications so far, but by adding a timer in the PC program that starts at the beginning of the PC-USB transmission and stops after the PC receives the echoed data back from the dev board, I have been able to verify that the round trip time for 1024 bytes is ~600µs (slightly more than 2x microframes at 125µs each.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2018 21:00:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-USB-Generic-HID-Example-High-Speed-and-1kB-Packet/m-p/847552#M33729</guid>
      <dc:creator>nbgatgi</dc:creator>
      <dc:date>2018-09-19T21:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso USB Generic HID Example - High Speed and 1kB Packet Size</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-USB-Generic-HID-Example-High-Speed-and-1kB-Packet/m-p/847553#M33730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="307979" data-username="nbgatgi" href="https://community.nxp.com/people/nbgatgi"&gt;Nick Guzzardo,&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks for your sharing, it's great.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2018 08:54:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-USB-Generic-HID-Example-High-Speed-and-1kB-Packet/m-p/847553#M33730</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-09-21T08:54:20Z</dc:date>
    </item>
  </channel>
</rss>

