<?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>topic USB HID Demo on FRDM-K66F in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652278#M7052</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am testing USB HID Generic demo(BM&amp;nbsp;version)&amp;nbsp;and works fine..&lt;/P&gt;&lt;P&gt;Then, I am using Wizard 2.x in KDS 3.2.0 to generate my own project by choosing "include all driver", no RTOS option.&lt;/P&gt;&lt;P&gt;After that, I copied required USB stack and files from demo project, compile it, link it to generate *.elf fine. All work fine.&lt;/P&gt;&lt;P&gt;But, when I download it to my FRDM-K66F and run it, I got the error code==0x02(USB Busy)&amp;nbsp;when I call &lt;SPAN style="font-size: small;"&gt;USB_DeviceClassInit(CONTROLLER_ID, &amp;amp;g_UsbDeviceHidConfigList, &amp;amp;g_UsbDeviceHidGeneric.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;deviceHandle&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;)). I check CONTROLLER_ID is 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Looks like it can't allocate memory for my USB handle...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Can anyone tell me where the problem can be, related to environment setting, like OS?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Christie&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Nov 2016 21:22:52 GMT</pubDate>
    <dc:creator>a8Chcx</dc:creator>
    <dc:date>2016-11-10T21:22:52Z</dc:date>
    <item>
      <title>USB HID Demo on FRDM-K66F</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652278#M7052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am testing USB HID Generic demo(BM&amp;nbsp;version)&amp;nbsp;and works fine..&lt;/P&gt;&lt;P&gt;Then, I am using Wizard 2.x in KDS 3.2.0 to generate my own project by choosing "include all driver", no RTOS option.&lt;/P&gt;&lt;P&gt;After that, I copied required USB stack and files from demo project, compile it, link it to generate *.elf fine. All work fine.&lt;/P&gt;&lt;P&gt;But, when I download it to my FRDM-K66F and run it, I got the error code==0x02(USB Busy)&amp;nbsp;when I call &lt;SPAN style="font-size: small;"&gt;USB_DeviceClassInit(CONTROLLER_ID, &amp;amp;g_UsbDeviceHidConfigList, &amp;amp;g_UsbDeviceHidGeneric.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;deviceHandle&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;)). I check CONTROLLER_ID is 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Looks like it can't allocate memory for my USB handle...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Can anyone tell me where the problem can be, related to environment setting, like OS?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Christie&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 21:22:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652278#M7052</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2016-11-10T21:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: USB HID Demo on FRDM-K66F</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652279#M7053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry error code==0x01 when call the &lt;SPAN style="font-size: small;"&gt;USB_DeviceClassInit function...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 21:31:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652279#M7053</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2016-11-10T21:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: USB HID Demo on FRDM-K66F</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652280#M7054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christie Su&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is the status of you issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So If I understand correctly you get kStatus_USB_Error in USB_DeviceClassInit? &lt;SPAN style="font-size: small;"&gt;CONTROLLER_ID&lt;/SPAN&gt; as 2 is normal if you are using High speed drivers in your device configuration, so I don't believe that this generate you an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the same process that you do (generate my own project by choosing "include all driver"), I compile it and run it and I don't get any error code in the USB_DeviceClassInit function, could you share your project to see if I could find the error that you get?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Jorge Alcala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 01:43:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652280#M7054</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2016-11-16T01:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: USB HID Demo on FRDM-K66F</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652281#M7055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played with some settings in KDS 3.2.0 and can't find where the problem is? Please see my attached project...&lt;/P&gt;&lt;P&gt;Here are what I did:&lt;/P&gt;&lt;P&gt;1) If I use the demo project, it works fine.&lt;/P&gt;&lt;P&gt;2) If I generate my own project with KSDK 2.0 with USB 1.0.0 in it. Then I copied USB 1.0.0 stack and required files in demo project. It works fine...&lt;/P&gt;&lt;P&gt;Please try my attached project to see if I made something wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know the result...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 13:08:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652281#M7055</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2016-11-16T13:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: USB HID Demo on FRDM-K66F</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652282#M7056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the latest KSDK 2.0 with Wizard 2.x to generate my own project(NO OS, all drives). Then I copied lwip_2.0.0 and required files from httpsrv demo. It works fine. Then I copied USB 1.0.0 and required files for USB HID. All these required files for USB HID are working. Then, I loaded to FRDM-K66F and USB not working again. But my http server still working...&lt;/P&gt;&lt;P&gt;Then, I tried earlier KSDK 2.0 with Wizard 2.X to build USB HID and works fine. Then I copied lwip_2.0.0 and required files from httpsrv demo. UBB HID and httpsrv server both are working.&lt;/P&gt;&lt;P&gt;To me, it looks like that the latest KSDK built from your web is different from what I built before, or there is different KDS setting?&lt;/P&gt;&lt;P&gt;Please let me know if you have any solution because I am thinking what the combination to use to build my final project?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 16:07:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652282#M7056</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2016-11-16T16:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: USB HID Demo on FRDM-K66F</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652283#M7057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any update on the issue? Can you duplicate the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 13:51:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652283#M7057</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2016-11-17T13:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: USB HID Demo on FRDM-K66F</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652284#M7058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christie Su&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, the problem is in the linker file. There is a part in the linker file that assigned ram size for usb to initialized this in the .bss section:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;USB_RAM_GAP = DEFINED(__usb_ram_size__) ? __usb_ram_size__ : 0x00;‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So if you have defined symbol __usb_ram_size__ it will use it in USB_RAM_GAP, but if not, it will assigned 0x00. If you check linker settings in the example code, you can see that they defined the symbol with the flag "defsym"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;IMG alt="pastedImage_2.png" src="https://community.nxp.com/t5/image/serverpage/image-id/9627i00731A23FFCF6BFC/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you don't have this linker flag in your settings, so linker file assigned 0x00 to USB_RAM_GAP, and when USB_DeviceClassInit try to allocate memory for usb, it doesn't have size in the .bss section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have two options, you could add this flag in your linker flags settings "-Xlinker -defsym=__usb_ram_size__=0x800", or you could change the linker file:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;USB_RAM_GAP = DEFINED(__usb_ram_size__) ? __usb_ram_size__ : 0x800;‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;(Note: this is how it is defined in the earlier KSDK 2.0 release)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made this change in your project and it works now, so give it a try and tell me if it works.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jorge Alcala&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>Mon, 02 Nov 2020 13:55:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652284#M7058</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2020-11-02T13:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: USB HID Demo on FRDM-K66F</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652285#M7059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works after I change it in link file...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your help!&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;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 22:21:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652285#M7059</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2016-11-17T22:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: USB HID Demo on FRDM-K66F</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652286#M7060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also burnt quite some time on this problem... &amp;nbsp;Shame to have the USB library require project specific settings...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 01:54:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/USB-HID-Demo-on-FRDM-K66F/m-p/652286#M7060</guid>
      <dc:creator>ashesman</dc:creator>
      <dc:date>2017-02-09T01:54:31Z</dc:date>
    </item>
  </channel>
</rss>

