<?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>Kinetis Software Development KitのトピックRe: Problem adding OUT Endpoint to PE USB HID</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Problem-adding-OUT-Endpoint-to-PE-USB-HID/m-p/492213#M4476</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this post, there was also some advices about handling these requests: &lt;A href="https://community.nxp.com/thread/359883"&gt;How can I configure an USB HID Keyboard Output Endpoint with KDS processor expert ?&lt;/A&gt;&amp;nbsp; Indeed, in KSDK 1.3, the previous bug was fixed and it worked well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please validate if this can solve your issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Isaac Avila&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Feb 2016 01:38:51 GMT</pubDate>
    <dc:creator>isaacavila</dc:creator>
    <dc:date>2016-02-10T01:38:51Z</dc:date>
    <item>
      <title>Problem adding OUT Endpoint to PE USB HID</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Problem-adding-OUT-Endpoint-to-PE-USB-HID/m-p/492212#M4475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NXP&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying now for several days to configure a USB OUT Endpoint as an addition to an existing PE Demo HID.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far I have failed to send any data via the Endpoint or via the Control Channel (EP0) to the processor.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using KDS 3.0.0 with SDK 1.3.0 on Windows 10 platform building for MK20DX256VLK10 processor.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is my project file in a zip archive.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my workflow.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Firstly I generate the basic PE configuration for the processor with the USB HID Demo (Thermometer).&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works fine and with the USB Analyser I can see the USB device is detected and sends the periodic 2 byte temperature reports.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the PC I am using the&amp;nbsp;&amp;nbsp; &lt;A _jive_internal="true" class="" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.signal11.us%2Foss%2Fhidapi%2F"&gt;hidapi&lt;/A&gt;&amp;nbsp; library to access the HID device (using QT Creator &amp;amp; C++).&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can open the HID device&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hidHandle = hid_open( 0x04D8, 0xFC40, NULL );&amp;nbsp;&amp;nbsp; and it is OK.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I do a read of the device I get the 2 byte temperature report OK.&amp;nbsp; &lt;SPAN style="color: #c0c0c0;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;hid_read&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;hidHandle, TestReport,3&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;If I do a write to the device I always get -1 (error)&amp;nbsp; hid_write ( hidHandle, TestReport, 3 ) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;Also if I try to send or read from the Control port this also always gives me an error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hid_get_feature_report ( hidHandle, TestReport, 3 );&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hid_send_feature_report ( hidHandle, TestReport, 3 ) ;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expect when I do the get and send feature report to see the following requestIDs activated in the callback function ;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; case USB_HID_GET_REPORT_REQUEST:&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp; case USB_HID_SET_REPORT_REQUEST:&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I never see the callback called for these request IDs when I try to do a get/send from the PC.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the processor side I have added an additional endpoint using PE to give an EP1 OUT&amp;nbsp; using INTERRUPT.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am now struggling to understand how I can get the processor to receive and reply to SET/GET_REPORT_REQUESTs.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice you can give me to make progress on this would be very much appreciated.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sean&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s. one modification I tried with the stack code is in usb_framework.c&amp;nbsp; as described in this discussion&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" data-containerid="11234" data-containertype="14" data-objectid="356549" data-objecttype="1" href="https://community.nxp.com/thread/356549"&gt;usb generic hid multiple endpoints sdk 1.20 KL 26&lt;/A&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added the line to set the data parameter.&amp;nbsp; (The thread said this is fixed in SDK 1.3.0 but in my file the data assignment was still not there, or maybe the problem is fixed in a different way). &lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE style="border: 0px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD colspan="1" style="border: 0px;border: 0px;font-family: inherit;font-style: inherit;border: 0px;padding: 2px 4px;"&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Line&lt;/P&gt;&lt;/TD&gt;&lt;TD colspan="1" style="border: 0px;border: 0px;font-family: inherit;font-style: inherit;border: 0px;padding: 2px 4px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 0px;border: 0px;font-family: inherit;font-style: inherit;border: 0px;padding: 2px 4px;"&gt;&amp;nbsp;&amp;nbsp; 448&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border: 0px;border: 0px;font-family: inherit;font-style: inherit;border: 0px;padding: 2px 4px;"&gt;/* class or vendor request */&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 0px;border: 0px;font-family: inherit;font-style: inherit;border: 0px;padding: 2px 4px;"&gt;&amp;nbsp;&amp;nbsp; 449&lt;/TD&gt;&lt;TD style="border: 0px;border: 0px;font-family: inherit;font-style: inherit;border: 0px;padding: 2px 4px;"&gt;size = event-&amp;gt;len + USB_SETUP_PKT_SIZE;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 0px;border: 0px;font-family: inherit;font-style: inherit;border: 0px;padding: 2px 4px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border: 0px;border: 0px;font-family: inherit;font-style: inherit;border: 0px;padding: 2px 4px;"&gt;&lt;SPAN style="font-weight: bold; font-style: inherit; font-family: inherit;"&gt;data = event-&amp;gt;buffer_ptr;&amp;nbsp;&amp;nbsp; // DLK added this bug fix&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 0px;border: 0px;font-family: inherit;font-style: inherit;border: 0px;padding: 2px 4px;"&gt;&amp;nbsp;&amp;nbsp; 450&lt;/TD&gt;&lt;TD style="border: 0px;border: 0px;font-family: inherit;font-style: inherit;border: 0px;padding: 2px 4px;"&gt;error = usb_fw_ptr-&amp;gt;request_notify_callback(&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338583"&gt;USB_K20TEST.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Feb 2016 18:04:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Problem-adding-OUT-Endpoint-to-PE-USB-HID/m-p/492212#M4475</guid>
      <dc:creator>seanbolton</dc:creator>
      <dc:date>2016-02-05T18:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem adding OUT Endpoint to PE USB HID</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Problem-adding-OUT-Endpoint-to-PE-USB-HID/m-p/492213#M4476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this post, there was also some advices about handling these requests: &lt;A href="https://community.nxp.com/thread/359883"&gt;How can I configure an USB HID Keyboard Output Endpoint with KDS processor expert ?&lt;/A&gt;&amp;nbsp; Indeed, in KSDK 1.3, the previous bug was fixed and it worked well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please validate if this can solve your issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Isaac Avila&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 01:38:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Problem-adding-OUT-Endpoint-to-PE-USB-HID/m-p/492213#M4476</guid>
      <dc:creator>isaacavila</dc:creator>
      <dc:date>2016-02-10T01:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem adding OUT Endpoint to PE USB HID</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Problem-adding-OUT-Endpoint-to-PE-USB-HID/m-p/492214#M4477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Isaac&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies for my late response, I missed your reply to my original query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now have an Out Endpoint configured in my software.&amp;nbsp; The important thing was to add the&amp;nbsp;&amp;nbsp; (void)USB_Class_HID_Recv_Data( );&amp;nbsp; call to both the application_callback and class_callback functions as per the Send_Data() function.&amp;nbsp; Also configure the additional out endpoint correctly in the descriptor tables.&amp;nbsp; Also the size of the report descriptors is important and must line up on the host and device sides.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once everything is in place the USB out endpoint works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for getting back to me on this, I am now making progress with our project and USB is working OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 17:30:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Problem-adding-OUT-Endpoint-to-PE-USB-HID/m-p/492214#M4477</guid>
      <dc:creator>seanbolton</dc:creator>
      <dc:date>2016-02-29T17:30:42Z</dc:date>
    </item>
  </channel>
</rss>

