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.

TM4C1233H6PZ: Issues with HID report sizes

Part Number: TM4C1233H6PZ

Hi,

I'm in the process of creating a custom HID device and I'm running into an issue with the report descriptor.  I've defined 3 reports: 1 input report and 2 output reports.  The 2 output reports seem to create an issue with each other due to their different Report Counts.  The C# gui that I'm using to communicate with always shows an error with Report 2 but Report 3 works correctly.  

Now the catch is, if I increase the Report Count of Report 2 to match the Report Count of Report 3 the reports works correctly.  

I believe for some reason the USB library is only taking into account 1 specific Report Count (the highest one).  Is this the case?

Attached is my report descriptor

  • Hi Daryl,

      Can you show your report descriptor? You didn't upload the descriptor successfully last time. 

      How is report 2 different from report 3?

      Does your report 2 have less than a byte of report size? Is it possible that the report 3 has the report count that is multiple of bytes and that is why it works.

      How large is your report descriptor packet? Is your host written to account for the correct descriptor size?

      I'm not a USB expert. Our USB expert is on vacation. So if I can't help you resolve your problem, we need to wait until our expert come back. 

  • Hi Charles,

    Here is the report descriptor.

    Report 2 and report 3 only differ by the report ID and report count.  We're looking into our C# USB code as well to see if there are any issues there, but are assuming our issues are coming from the MCU side since the coding is more involved. 

    So looking at the output report descriptors, only the output report descriptor with the highest report count (in this case report id 3) works.  If I adjust the report count on report id 2 to be larger then report 2 is the only output report that works.  And when the share the same report count, they both work.

    Thanks,

    Daryl 

  • Hi Daryl,

      I'm certainly not an expert in the HID report descriptor structure. There is one thing I'm curious in your descriptor. Why don't your specify the report size for each report? You only have the report count (e.g. 64, 5, 6 ) but not report size. 

      I find this below article with information that may help you. Please take a look. 

      http://who-t.blogspot.com/2018/12/understanding-hid-report-descriptors.html

  • Hi Charles,

    I've included the report size outside of the three nested collections.  I believe that placing the report size there creates a global report size for each of the reports.  I'm taking a look at the article you linked now.

    Thanks,

    Daryl

  • Hi Daryl,

      While I don't know the cause to your problem, I find this post that may also help. Although it is for a different MCU, I believe the report descriptor structure is independent of the MCU platform. 

      Here is another post that may also help where the poster was having problem with a custom HID descriptor report. The problem was due to the insertion of report ID that increases the packet size that the host didn't realize. 

    https://e2e.ti.com/support/microcontrollers/other/f/908/t/923660?tisearch=e2e-sitesearch&keymatch=descriptor%20report

  • Hi Charles, 

    The E2E link you posted was actually one an Intern of mine posted when first tackling this HID project.  We feel confident that we've solved the issue with the report ID.  This issue seems to be linked directly to the report count.

    Thanks,

    Daryl

  • Hi Charles,

    Still not having much luck with this issue and it's tough looking through the libraries trying to decode any usb issues.  Any chance the USB expert from vacation?

    Thanks,

    Daryl 

  • Hello Daryl,

    I'm not really any more familiar with HID report count than Charles is but looking at what you posted and what your problem description is, can you share the account data for those two reports which are ReportCount(5) and ReportCount(6)? I'm curious how those are structured and what the difference is.

    And you said if you changed both to be ReportCount(6), it works, is that correct?