<?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 VBus Detection</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-VBus-Detection/m-p/529433#M9807</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CarlMle on Wed Feb 06 10:09:37 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am implementing a USB CDC using the USB CDC Rom example from Lpcware.com&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Flpcware.com%2Fcontent%2Fnxpfile%2Fsample-code-bundle-lpc11uxx-peripherals-using-lpcxpresso" rel="nofollow" target="_blank"&gt;http://lpcware.com/content/nxpfile/sample-code-bundle-lpc11uxx-peripherals-using-lpcxpresso&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question 1 :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First issue is reliable USB_VBUS detection. I want to know if USB is plugged in either a PC or charger, So I want to read the state of the USB_VBUS pin P03. (Its a battery powered device)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using LPC11U24/401 - LPCXpresso 5.0.14_1109&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;USB CDC is working and I can send + Recv Data over the CDC&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No USB cable connected : P0B3=0 P0W3=0xffffffff P0PORT=0x5506bb ( BIT3 is set )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USB Connected : P0B3=0 P0W3=0xffffffff P0PORT=0x5506bb ( BIT3 is set )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So first issue is a disagreement over the pin state, as far as I can see these should all agree? As P0B3 &amp;amp; P0W3 are convenience registers showing the state of BIT3 of Port0. Unless with USB enabled you cant use this as a GPIO?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried both modes on the pin :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PIO0_3 = 0x8 // Pulldown enabled, PIO_3 mode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PIO0_3 = 0x9 // Pulldown enabled, USB_VBUS mode&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The result is the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC11Ux User Manual states that the top 64 bits of an LPC11U24/401 Eeprom are reserved for NXP use. Which way is up? is it 0-63 or the last 64 bytes? I can't see a memory map that shows this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carl.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:28:37 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:28:37Z</dc:date>
    <item>
      <title>USB VBus Detection</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-VBus-Detection/m-p/529433#M9807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CarlMle on Wed Feb 06 10:09:37 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am implementing a USB CDC using the USB CDC Rom example from Lpcware.com&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Flpcware.com%2Fcontent%2Fnxpfile%2Fsample-code-bundle-lpc11uxx-peripherals-using-lpcxpresso" rel="nofollow" target="_blank"&gt;http://lpcware.com/content/nxpfile/sample-code-bundle-lpc11uxx-peripherals-using-lpcxpresso&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question 1 :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First issue is reliable USB_VBUS detection. I want to know if USB is plugged in either a PC or charger, So I want to read the state of the USB_VBUS pin P03. (Its a battery powered device)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using LPC11U24/401 - LPCXpresso 5.0.14_1109&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;USB CDC is working and I can send + Recv Data over the CDC&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No USB cable connected : P0B3=0 P0W3=0xffffffff P0PORT=0x5506bb ( BIT3 is set )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USB Connected : P0B3=0 P0W3=0xffffffff P0PORT=0x5506bb ( BIT3 is set )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So first issue is a disagreement over the pin state, as far as I can see these should all agree? As P0B3 &amp;amp; P0W3 are convenience registers showing the state of BIT3 of Port0. Unless with USB enabled you cant use this as a GPIO?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried both modes on the pin :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PIO0_3 = 0x8 // Pulldown enabled, PIO_3 mode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PIO0_3 = 0x9 // Pulldown enabled, USB_VBUS mode&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The result is the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC11Ux User Manual states that the top 64 bits of an LPC11U24/401 Eeprom are reserved for NXP use. Which way is up? is it 0-63 or the last 64 bytes? I can't see a memory map that shows this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carl.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:28:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-VBus-Detection/m-p/529433#M9807</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: USB VBus Detection</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-VBus-Detection/m-p/529434#M9808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CarlMle on Thu Feb 07 08:03:39 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Looks like I may have a back door circuit from my charger on to vbus, but that doesn't explain the various port registers disagreeing with each other.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:28:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-VBus-Detection/m-p/529434#M9808</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:28:37Z</dc:date>
    </item>
  </channel>
</rss>

