<?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: OTG and host clock not available</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/OTG-and-host-clock-not-available/m-p/1484860#M49471</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for your response. I actually had "LPC_SC-&amp;gt;PCONP |= 0x80000000;" before using "LPC_USB-&amp;gt;OTGClkCtrl = 0x00000019;" in my code (PCONP[31] is 0x1 which confirms the USB gate is turned on).&lt;/P&gt;&lt;P&gt;The problem is that when I do "LPC_USB-&amp;gt;OTGClkCtrl = 0x00000019",&amp;nbsp;LPC_USB-&amp;gt;OTGClkSt is not equal to&amp;nbsp;0x00000019, which I cannot understand why!&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jul 2022 19:46:43 GMT</pubDate>
    <dc:creator>bamdadslr</dc:creator>
    <dc:date>2022-07-05T19:46:43Z</dc:date>
    <item>
      <title>OTG and host clock not available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/OTG-and-host-clock-not-available/m-p/1484128#M49449</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using the MCUXpresso IDE to program a LPC4088 controller. In part of my code I want to initialize the USB host and trying to enable the USB host, OTG clock and AHB master clock. So, I use this instruction&lt;/P&gt;&lt;P&gt;LPC_USB-&amp;gt;OTGClkCtrl = 0x00000019.&lt;/P&gt;&lt;P&gt;After that, when I check&amp;nbsp;LPC_USB-&amp;gt;OTGClkSt, its binary value is 10000, which shows the device host clock and OTG clock are not available! Can you please help me to find what is wrong?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 14:46:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/OTG-and-host-clock-not-available/m-p/1484128#M49449</guid>
      <dc:creator>bamdadslr</dc:creator>
      <dc:date>2022-07-04T14:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: OTG and host clock not available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/OTG-and-host-clock-not-available/m-p/1484357#M49457</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I think that you have to enable the USB gated clock before you write the LPC_USB-&amp;gt;OTGClkCtrl = 0x00000019.&lt;/P&gt;
&lt;P&gt;You can enable the USB gated clock with the line:&lt;/P&gt;
&lt;P&gt;SYSCON-&amp;gt;PCONP|=1&amp;lt;&amp;lt;31;&lt;/P&gt;
&lt;P&gt;Pls refer to section 3.3.2.2 Power Control for Peripherals registers in UM10562.pdf&lt;/P&gt;
&lt;P&gt;If you still can not, i suppose you have to enable the 48MHz USB clock&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1656998883339.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/185531iBEFFA65B10188333/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1656998883339.png" alt="xiangjun_rong_0-1656998883339.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 05:28:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/OTG-and-host-clock-not-available/m-p/1484357#M49457</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-07-05T05:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: OTG and host clock not available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/OTG-and-host-clock-not-available/m-p/1484860#M49471</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for your response. I actually had "LPC_SC-&amp;gt;PCONP |= 0x80000000;" before using "LPC_USB-&amp;gt;OTGClkCtrl = 0x00000019;" in my code (PCONP[31] is 0x1 which confirms the USB gate is turned on).&lt;/P&gt;&lt;P&gt;The problem is that when I do "LPC_USB-&amp;gt;OTGClkCtrl = 0x00000019",&amp;nbsp;LPC_USB-&amp;gt;OTGClkSt is not equal to&amp;nbsp;0x00000019, which I cannot understand why!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 19:46:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/OTG-and-host-clock-not-available/m-p/1484860#M49471</guid>
      <dc:creator>bamdadslr</dc:creator>
      <dc:date>2022-07-05T19:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: OTG and host clock not available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/OTG-and-host-clock-not-available/m-p/1484995#M49475</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Pls try to set the USBDIV with a non-zero value, you'd better get 48MHz USB clock by configuring the register including the USBDIV bits and USBSEL bits.&lt;/P&gt;
&lt;P&gt;This is the procedure:&lt;/P&gt;
&lt;P&gt;1)LPC_SC-&amp;gt;PCONP |= 0x80000000&lt;/P&gt;
&lt;P&gt;2)LPC_SC-&amp;gt;USBCLKSEL=0x01|xx;&lt;/P&gt;
&lt;P&gt;3)LPC_USB-&amp;gt;OTGClkCtrl = 0x00000019;&lt;/P&gt;
&lt;P&gt;4)checking the LPC_USB-&amp;gt;OTGClkSt register&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1657075233785.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/185674i8C7D0826E1C95AF8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1657075233785.png" alt="xiangjun_rong_0-1657075233785.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 02:46:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/OTG-and-host-clock-not-available/m-p/1484995#M49475</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-07-06T02:46:32Z</dc:date>
    </item>
  </channel>
</rss>

