<?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のトピックnxpUSBlib inside another project</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/nxpUSBlib-inside-another-project/m-p/522563#M5199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lsimons on Thu Aug 23 06:25:00 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;I've gotten the nxpUSBlib VirtualSerialDevice example running on an LPCXpresso 1769 dev. board using the multiple projects per workspace approach defined by &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp-lpc.com%2Fimages%2FnxpUSBlib_v1_1.pdf" rel="nofollow" target="_blank"&gt;http://www.nxp-lpc.com/images/nxpUSBlib_v1_1.pdf&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For our application, it would be much easier to control the code for certification by keeping all of the source in a single project.&amp;nbsp; I have been trying to move the relevant parts of the nxpUSBlib, BSP, and CDL projects into my application project, paying heed to the compiler flags.&amp;nbsp; Everything compiles, and I can see that the USB interrupt is triggered when the USB port is plugged in.&amp;nbsp; However, unlike with the multi-project approach, the device shows up as "Unknown device."&amp;nbsp; The USB_DeviceState doesn't make it past state 2, DEVICE_STATE_Default.&amp;nbsp; A successful enumeration would be state 4, DEVICE_STATE_Configured.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not too familiar with the CDL, so was wondering if that could be tripping things up.&amp;nbsp; My understanding of nxpUSBlib is that so long as the USB interrupt is hooked up properly, it should cooperate.&amp;nbsp; I've been stepping through both the single project version and the multi-project version, but am having a hard time tracking down the differences because breakpoints in the USB configuration cause Windows to fail to recognize the device even with good code.&amp;nbsp; I'd be very grateful to any tips on how to debug this or tips from someone who's gone through this.&amp;nbsp; Also, feel free to tell me if I'm barking up the wrong tree.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Louis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:56:07 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:56:07Z</dc:date>
    <item>
      <title>nxpUSBlib inside another project</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/nxpUSBlib-inside-another-project/m-p/522563#M5199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lsimons on Thu Aug 23 06:25:00 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;I've gotten the nxpUSBlib VirtualSerialDevice example running on an LPCXpresso 1769 dev. board using the multiple projects per workspace approach defined by &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp-lpc.com%2Fimages%2FnxpUSBlib_v1_1.pdf" rel="nofollow" target="_blank"&gt;http://www.nxp-lpc.com/images/nxpUSBlib_v1_1.pdf&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For our application, it would be much easier to control the code for certification by keeping all of the source in a single project.&amp;nbsp; I have been trying to move the relevant parts of the nxpUSBlib, BSP, and CDL projects into my application project, paying heed to the compiler flags.&amp;nbsp; Everything compiles, and I can see that the USB interrupt is triggered when the USB port is plugged in.&amp;nbsp; However, unlike with the multi-project approach, the device shows up as "Unknown device."&amp;nbsp; The USB_DeviceState doesn't make it past state 2, DEVICE_STATE_Default.&amp;nbsp; A successful enumeration would be state 4, DEVICE_STATE_Configured.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not too familiar with the CDL, so was wondering if that could be tripping things up.&amp;nbsp; My understanding of nxpUSBlib is that so long as the USB interrupt is hooked up properly, it should cooperate.&amp;nbsp; I've been stepping through both the single project version and the multi-project version, but am having a hard time tracking down the differences because breakpoints in the USB configuration cause Windows to fail to recognize the device even with good code.&amp;nbsp; I'd be very grateful to any tips on how to debug this or tips from someone who's gone through this.&amp;nbsp; Also, feel free to tell me if I'm barking up the wrong tree.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Louis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:56:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/nxpUSBlib-inside-another-project/m-p/522563#M5199</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: nxpUSBlib inside another project</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/nxpUSBlib-inside-another-project/m-p/522564#M5200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rocketdawg on Tue Aug 28 16:30:55 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I found that I have had issues with the frequency that I call the USB_Task&amp;nbsp; functions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When enumerating, one needs to call these at a minimum of 1ms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After enumeration, one may reduce that to the polling rate defined by your enumeration configuration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For instance, if your HID device only needs 10ms polling then call the functions every 10ms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That is the limit of my experience, but I have a sneaking suspicion that the stated 30ms rate defined in the nxpUSBLib doc is hogwash.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I do not see anywhere in the stack where any transfers are queued up.&amp;nbsp; You would have to pass these queue buffers to the stack somehow, and I don't see that in the API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All the examples are a for(;;) loop calling these functions at MAX rate.&amp;nbsp; Try placing a delay of 30ms in that loop and see if the sample still works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:56:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/nxpUSBlib-inside-another-project/m-p/522564#M5200</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: nxpUSBlib inside another project</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/nxpUSBlib-inside-another-project/m-p/522565#M5201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lsimons on Wed Aug 29 05:24:21 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I've actually since given up on merging everything into one project.&amp;nbsp; It seems cleaner to keep CMSIS outside of the application domain code, and I will do certification based on which functions from it are used according to the linker map (or so the current plan is).&amp;nbsp; Since I'm already keep one set of libraries as a dependent library, having nxpUSBlib as a separate project doesn't seem unreasonable.&amp;nbsp; The USB virtual terminal is working ok, though I have also found that it seems sensitive to being delayed during enumeration as you suggested.&amp;nbsp; Other than that it works pretty well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have found that there seems to be a race condition when multiple send_string commands are issued without delays between.&amp;nbsp; I'm suspecting there's some sort of "wait_until_sent" or "queue_outgoing_to_send_in_the_proper_order" command to avoid this, but I haven't found it yet.&amp;nbsp; Probably the domain of a new thread though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Louis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:56:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/nxpUSBlib-inside-another-project/m-p/522565#M5201</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:56:08Z</dc:date>
    </item>
  </channel>
</rss>

