<?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中的主题 USB Host questions for 1788</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-Host-questions-for-1788/m-p/522428#M5064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tjoAG on Tue Sep 18 01:25:03 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi All&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to get USB Host to work on my LPC1788. I'm using port 2 as host.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the USBHost lite sample from NXP&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I have changed:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The port pin setup to use the USB port 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The base address to match the lpc1788 mem map. (0x2000 0000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Added Port 2 stuff to the IRQ handler (LPC_USB-&amp;gt;RhPortStatus2 control etc.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I insert an USB stick, the IRQ get called and handle interrupt for port 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The HOST_RhscIntr get set and the Host_EnumDev function continue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The RhPortStatus2 get reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Host_ProcessTD gets called.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The OHCI port status registers seems to contain the right flags when the USB device is inserted. Speed, device type etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What does not work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to get the the host descriptor( Host_ProcessTD) I do get an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The transfer do happen and I get a new interrupt where the HOST_TDControlStatus ( TDHead-&amp;gt;Control )is set. Bit 28-31 has the value of 5. But in the USBLite code it should be 0. The Host_ProcessTD returns ERR_TD_FAIL because of this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do any one know where I can see the description for the HostController Transfer Descriptor structure used in the code? What does the flags mean?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, when processing a transfer descriptor, how does the LPC1788 know which USB port to use? I only have port 2, but I can't see anywhere in the USBLite sample, where that is specified when doing USB transfers?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;USB clock is 48 MHz&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thomas&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:54:20 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:54:20Z</dc:date>
    <item>
      <title>USB Host questions for 1788</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-Host-questions-for-1788/m-p/522428#M5064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tjoAG on Tue Sep 18 01:25:03 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi All&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to get USB Host to work on my LPC1788. I'm using port 2 as host.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the USBHost lite sample from NXP&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I have changed:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The port pin setup to use the USB port 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The base address to match the lpc1788 mem map. (0x2000 0000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Added Port 2 stuff to the IRQ handler (LPC_USB-&amp;gt;RhPortStatus2 control etc.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I insert an USB stick, the IRQ get called and handle interrupt for port 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The HOST_RhscIntr get set and the Host_EnumDev function continue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The RhPortStatus2 get reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Host_ProcessTD gets called.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The OHCI port status registers seems to contain the right flags when the USB device is inserted. Speed, device type etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What does not work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to get the the host descriptor( Host_ProcessTD) I do get an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The transfer do happen and I get a new interrupt where the HOST_TDControlStatus ( TDHead-&amp;gt;Control )is set. Bit 28-31 has the value of 5. But in the USBLite code it should be 0. The Host_ProcessTD returns ERR_TD_FAIL because of this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do any one know where I can see the description for the HostController Transfer Descriptor structure used in the code? What does the flags mean?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, when processing a transfer descriptor, how does the LPC1788 know which USB port to use? I only have port 2, but I can't see anywhere in the USBLite sample, where that is specified when doing USB transfers?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;USB clock is 48 MHz&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thomas&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:54:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-Host-questions-for-1788/m-p/522428#M5064</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: USB Host questions for 1788</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-Host-questions-for-1788/m-p/522429#M5065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Daniel Widyanto on Thu Sep 27 03:24:31 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope I can help you a bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;The OHCI for LPC1788's USB host is as described in &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=ftp%3A%2F%2Fftp.compaq.com%2Fpub%2Fsupportinformation%2Fpapers%2Fhcir1_0a.pdf" rel="nofollow" target="_blank"&gt;ftp://ftp.compaq.com/pub/supportinformation/papers/hcir1_0a.pdf&lt;/A&gt;&lt;SPAN&gt; In that document, you will find the TD's decription and all of the OHCI registers and usage. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For USB port selection, there's 2 parts. The first one is selecting USB2 as host. This is done in OTGStCtrl. The second one is when reading the root hub status, you need to read from HcRhPortStatus[1] instead of HcRhPortStatus[0] &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did some demo code with USB host lite to move the USB host to USB2 in LPC2478 last time, but I don't think I can remember all of the things that I modified.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just reply this thread if you need more info. Maybe I can help&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-daniel&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:54:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-Host-questions-for-1788/m-p/522429#M5065</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:54:22Z</dc:date>
    </item>
  </channel>
</rss>

