<?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のトピックRe: LPC546xx USB1_ID</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995449#M39164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;another question, how to read the value from the USB1_ID pin? seems that is not a standard GPIO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 May 2020 19:00:02 GMT</pubDate>
    <dc:creator>terence_kong</dc:creator>
    <dc:date>2020-05-20T19:00:02Z</dc:date>
    <item>
      <title>LPC546xx USB1_ID</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995443#M39158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NXP support,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We realize the LPC546xx doesn't support USB OTG, can we use an GPIO to detect the USBID and switch between host and device mode?&lt;/P&gt;&lt;P&gt;The SDK only support either host or device, need support regarding on how to switch between host and device.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 17:46:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995443#M39158</guid>
      <dc:creator>terence_kong</dc:creator>
      <dc:date>2020-03-05T17:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx USB1_ID</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995444#M39159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Terence.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I´m currently working on your question. As soon I get a useful answer I´ll let you know.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Diego&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2020 22:36:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995444#M39159</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2020-03-09T22:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx USB1_ID</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995445#M39160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Sorry for my late reply.&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;You can&amp;nbsp; use a GPIO pin with a pull-up resistor&amp;nbsp; in order to detect If the cable that you&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;are using sets the LPC54xx&amp;nbsp; as a host or a&amp;nbsp; B device.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;In terms of software, you can&amp;nbsp;take as a starting point our examples for HOST or DEVICE.&amp;nbsp; &amp;nbsp;You will need to do your own implementation to switch the role from HOST to DEVICE.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Additionally,&amp;nbsp; take into account that your design must change to provide&amp;nbsp; VBUS as a host and receive VBUS power as a device.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Best regards, Diego&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2020 23:35:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995445#M39160</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2020-03-13T23:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx USB1_ID</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995446#M39161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok will try that out, thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2020 23:38:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995446#M39161</guid>
      <dc:creator>terence_kong</dc:creator>
      <dc:date>2020-03-13T23:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx USB1_ID</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995447#M39162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please let me know if I can help you further.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards, Diego.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2020 21:08:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995447#M39162</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2020-03-17T21:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx USB1_ID</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995448#M39163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently no, thanks for your information&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2020 21:10:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995448#M39163</guid>
      <dc:creator>terence_kong</dc:creator>
      <dc:date>2020-03-17T21:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx USB1_ID</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995449#M39164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;another question, how to read the value from the USB1_ID pin? seems that is not a standard GPIO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2020 19:00:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995449#M39164</guid>
      <dc:creator>terence_kong</dc:creator>
      <dc:date>2020-05-20T19:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx USB1_ID</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995450#M39165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;Hi Terence!&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will take a look at this. Please provide time to investigate.&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2020 04:42:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995450#M39165</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2020-05-22T04:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx USB1_ID</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995451#M39166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any idea&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;how to read the value from the USB1_ID pin?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2020 17:32:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995451#M39166</guid>
      <dc:creator>terence_kong</dc:creator>
      <dc:date>2020-06-04T17:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx USB1_ID</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995452#M39167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;Hi Terence!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I apologize for the delay! I missed the track of your inquirie due my workload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You can check the value of the&amp;nbsp; USB1_ID pin!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Altougth this pin&amp;nbsp; does not have a GPIO alternative like USB0_ID.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do this please,&amp;nbsp; refer to the&amp;nbsp; register PortMode of the LPC546 UM&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/112258iF69112A9303CEA00/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the small code&amp;nbsp; that I made to &amp;nbsp; test the&amp;nbsp; USB1_ID pin :&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;#include "fsl_power.h"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;int main( void )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Init FSL debug console. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;BOARD_InitDebugConsole();&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;POWER_DisablePD(kPDRUNCFG_PD_USB1_PHY); /*&amp;lt; Turn on USB Phy */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CLOCK_EnableClock(kCLOCK_Usbh1 );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CLOCK_EnableUsbfs0HostClock(kCLOCK_UsbSrcUsbPll, 48000000U);&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;while (1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;USBHSH-&amp;gt;PORTMODE |= 1&amp;lt;&amp;lt;8;//&amp;nbsp; enabling pull up resistor on USB1_ID pin&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(USBHSH-&amp;gt;PORTMODE &amp;amp; (0x01))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//The pin is pulled up&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;PRINTF(" A device connected /n");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{ // the pin is pulled down&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;PRINTF("B device connected /n");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;}&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Additional comments:&lt;/P&gt;&lt;P&gt;This was tested using the LPCxpress54628 EVK. I can guarantee that this example code will work as intended on all situations!&lt;/P&gt;&lt;P&gt;To pull down the USB1_ID line I used to connect a OTG adapter to the high speed USB connector, since has the ID pin grounded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background: white; border: 0px;"&gt;&lt;SPAN style="color: #51626f; border: 0px; font-weight: inherit;"&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background: white; border: 0px;"&gt;&lt;SPAN style="color: #51626f; border: 0px; font-weight: inherit;"&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2020 01:35:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-USB1-ID/m-p/995452#M39167</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2020-06-09T01:35:51Z</dc:date>
    </item>
  </channel>
</rss>

