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.

CCS/TM4C1294NCPDT: Trying to create a new HID device for data transfer from both the ends

Part Number: TM4C1294NCPDT

Tool/software: Code Composer Studio

Hello,

The major issue over this point is to create a HID device over my tiva board that can be recognised by any OS without any driver and then after that initiate a transfer between the both. i have taken reference from the keypad_dev code and stabilise my communication in a very similar pattern by modifying it but got lost at some points if anyone can help me out into this.

thank you

  • Hi,
    Can you be more specific about your problem? Where are you lost? Have you tried the usb_dev_keyboard and usb_dev_gamepad and usb_dev_chid examples? All of them use HID class?
  • yes i'm working over the keyboard code and trying o make the changes and apply it but i have gone through some terms such as report and descriptors which i'm not able to understand and edit.... accordingly!!
    i want to create a data pipe kind of structure over my board which should take data from my board provide it to the pc. Then also take input from pc through some gui and provide my board with it.
  • Hello Rohan,

    USB protocol is a deep and complicated topic. We try and simplify all we can with TivaWare via API's, commented code, and the USB Library User Guide (found in docs/ folder of TivaWare as SW-TM4C-USBL-UG-2.1.4.178.pdf) but at the end of the day you also need to understand the fundamentals of how USB works. For example, the structure of descriptors is directly based on those fundamentals.

    There are many sources you can lean on for learning, but one in particular I find commonly useful is: www.beyondlogic.org/.../usb1.shtml
  • Vendor's Ralph makes a good case for the necessity to, 'Recognize the extra user effort' - which the venture into USB demands.     Users most always require some 'background competence' - to (really) succeed - with the more complex aspects of these devices.     (from this (or other) MCU Vendors.)

    Ralph's book identification - after a quick review - proves (generally) well chosen.   However - often such 'complex learning' is aided by reviewing 'different treatments' - of (even) highly similar material.    There exists another 'USB-based book' - which has received excellent reviews - and may 'blend in well' w/Ralph's book selection.      And - this 2nd book is available as a (reduced cost) e-book and (much) of it may be read 'on-line.' (i.e. in pdf format)

    'USB Complete - The Developer's Guide,'   Fifth Edition - author Jan Axelson  ...  has long been noted as an effective 'training aid' - for the (always) complex - USB...     (User Struggle - Beware!)   credit cb1

  • Hello cb1,

    Thank you for adding in that recommendation, I fully agree with that choice too, it slipped my mind to mention. USB Complete is another resource I have leveraged in the past.
  • hello Ralph,
    I went through all the document and they were very helpful while creating the report descriptor for my device which i have formed, now when ever i try to configure my device accordingly there are many struct that are also required to be configured and changed, i have tried many combination and values but every time my cursor gets stuck at the USBHIDInit function. I request for some help in this section.

    Thank You,
    Rohan
  • Hello Rohan,

    I am not familiar with a USBHIDInit function, can you double check that name? If it's one you created, we'd need to see the code to even have an idea...
  • Hello Ralph,
    It was a mere mistake that i clicked on the "It resolved my issue button" please ignore because my issue still remains unresolved and i require help.
    well the USBDHIDInit is a predefined function in the usbhid.h file. you can also find this in the USB user library pdf.

    thank you,
    Rohan
  • Hello Rohan,

    You wrote USBHIDInit rather than USBDHIDInit which is why I couldn't find the function.

    I would suspect that something with the descriptors was not written correctly, can you share the descriptor(s) that you are passing into the API?
  • hello Ralph,
    Finally i was able to modify my keyboard example and convert it into a hid 2 endpoint and 2 data pipe device with help from this thread e2e.ti.com/.../359326
    Now USB has been initialised now the problem the new issue is how to modify it for a bulk transfer....

    And i'm sorry for the spelling error.!!


    Thank you.
    Rohan

  • May it be asked - two USB Educating books were (earlier) presented - would not their 'Acquisition & Read' ... 'speed, ease & enhance'  YOUR  understanding & competence - with USB?

    Minus that 'read & understanding' - can your, (highly expected) 'Peeling back of the (many) Complex Layers of USB' - prove (at all): 'Time, User & 'Vendor Ralph Efficient?'

    As your 'Use Case' appears 'outside the TM4C norm' - is it not  (your) responsibility to build the requisite USB understanding w/out placing such 'great & ongoing demand' - upon the (limited) vendor staff?      (who are charged w/servicing MANY - most w/clearly, 'more tightly defined MCU based' - rather than 'Highly USB-specific' - such issues.)    

    Again - those (two) USB books (earlier presented) greatly enhance your 'Success w/USB' - yet (little) mention of their 'acceptance & engagement' - has arrived.

  • Hello Rohan,

    Bulk transfers require a Bulk-In endpoint and a Bulk-Out endpoint for data to and from the PC respectively. So you should begin by getting those setup if you want to do a bulk transfer.
  • Hello Ralph,

    Thank you so much for this help as soon as the out endpoint got configured the device it self changed into a bulk device and the transfer is taking place very well..... a little more of such changes.

    Regards
    Rohan