<?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>topic Re: Chip_Clock_IsUSBPLLLocked hangs when IRC is turned off in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-Clock-IsUSBPLLLocked-hangs-when-IRC-is-turned-off/m-p/1260206#M44602</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;xiangjun_rong&lt;/P&gt;&lt;P&gt;Thanks, it appears I missed the line in manual:&amp;nbsp;When switching clock sources, both clocks must be running.&lt;/P&gt;&lt;P&gt;When IRC is turned off after USB PLL setup, everything runs ok.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Apr 2021 05:03:07 GMT</pubDate>
    <dc:creator>A_L</dc:creator>
    <dc:date>2021-04-12T05:03:07Z</dc:date>
    <item>
      <title>Chip_Clock_IsUSBPLLLocked hangs when IRC is turned off</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-Clock-IsUSBPLLLocked-hangs-when-IRC-is-turned-off/m-p/1259786#M44590</link>
      <description>&lt;P&gt;We use external 16MHz crystal oscillator for LPC11U68JBD48E clock:&lt;/P&gt;&lt;P&gt;unsigned int j;&lt;BR /&gt;SystemCoreClockUpdate();&lt;BR /&gt;Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_IOCON);&lt;/P&gt;&lt;P&gt;// start SYSOSC&lt;BR /&gt;Chip_IOCON_PinMuxSet(LPC_IOCON, 2, 0, (IOCON_FUNC1 | IOCON_MODE_INACT)); // PIO2_0 = XTALIN&lt;BR /&gt;Chip_IOCON_PinMuxSet(LPC_IOCON, 2, 1, (IOCON_FUNC1 | IOCON_MODE_INACT)); // PIO2_1 = XTALOUT&lt;BR /&gt;Chip_SYSCTL_PowerUp(SYSCTL_POWERDOWN_SYSOSC_PD);&lt;BR /&gt;Chip_Clock_SetPLLBypass(false, false);&lt;BR /&gt;for (j = 0; j &amp;lt; 0x400; ++j); // 500us delay is needed after SYSOSC is powered up&lt;/P&gt;&lt;P&gt;// MAINCLK = 64MHz, from PLL&lt;BR /&gt;Chip_Clock_SetMainClockSource(SYSCTL_MAINCLKSRC_IRC);&lt;BR /&gt;Chip_SYSCTL_PowerDown(SYSCTL_POWERDOWN_SYSPLL_PD);&lt;BR /&gt;Chip_Clock_SetSystemPLLSource(SYSCTL_PLLCLKSRC_MAINOSC);&lt;BR /&gt;Chip_Clock_SetupSystemPLL(3, 1); // FCLKIN = 16, FCLKOUT = 64, FCCO = 256MHz&lt;BR /&gt;Chip_SYSCTL_PowerUp(SYSCTL_POWERDOWN_SYSPLL_PD);&lt;BR /&gt;while (!Chip_Clock_IsSystemPLLLocked());&lt;BR /&gt;Chip_Clock_SetSysClockDiv(2); // system clock at 32Mhz&lt;BR /&gt;Chip_Clock_SetMainClockSource(SYSCTL_MAINCLKSRC_PLLOUT);&lt;BR /&gt;SystemCoreClockUpdate();&lt;/P&gt;&lt;P&gt;// so far so good, turning off IRC:&lt;BR /&gt;Chip_SYSCTL_PowerDown(SYSCTL_POWERDOWN_IRC_PD);&lt;BR /&gt;Chip_SYSCTL_PowerDown(SYSCTL_POWERDOWN_IRCOUT_PD);&lt;/P&gt;&lt;P&gt;// now lets try set up USB clock:&lt;BR /&gt;Chip_SYSCTL_PowerDown(SYSCTL_POWERDOWN_USBPLL_PD);&lt;BR /&gt;Chip_Clock_SetUSBPLLSource(SYSCTL_USBPLLCLKSRC_MAINOSC);&lt;BR /&gt;Chip_Clock_SetupUSBPLL(2, 1); // FCLKIN = 16, FCLKOUT = 48, FCCO = 192MHz&lt;BR /&gt;Chip_SYSCTL_PowerUp(SYSCTL_POWERDOWN_USBPLL_PD);&lt;BR /&gt;while (!Chip_Clock_IsUSBPLLLocked()); // hangs here indefinitely&lt;/P&gt;&lt;P&gt;// and this code is not reached ...&lt;BR /&gt;Chip_Clock_SetUSBClockSource(SYSCTL_USBCLKSRC_PLLOUT, 1);&lt;BR /&gt;Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_USB);&lt;BR /&gt;Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_USBRAM);&lt;BR /&gt;Chip_SYSCTL_PowerUp(SYSCTL_POWERDOWN_USBPAD_PD);&lt;/P&gt;&lt;P&gt;So, could USB PLL be used when IRC is turned off?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 15:51:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-Clock-IsUSBPLLLocked-hangs-when-IRC-is-turned-off/m-p/1259786#M44590</guid>
      <dc:creator>A_L</dc:creator>
      <dc:date>2021-04-09T15:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Chip_Clock_IsUSBPLLLocked hangs when IRC is turned off</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-Clock-IsUSBPLLLocked-hangs-when-IRC-is-turned-off/m-p/1260104#M44596</link>
      <description>&lt;P&gt;Hi, Alexei,&lt;/P&gt;
&lt;P&gt;It appears that you do not set up the USB PLL Clock source register, pls check.&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;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1618191586471.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/141970i2FC03BEA031201DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1618191586471.png" alt="xiangjun_rong_0-1618191586471.png" /&gt;&lt;/span&gt;&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_1-1618191722703.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/141971iEAA6891ED4842A76/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_1-1618191722703.png" alt="xiangjun_rong_1-1618191722703.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 01:42:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-Clock-IsUSBPLLLocked-hangs-when-IRC-is-turned-off/m-p/1260104#M44596</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-04-12T01:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Chip_Clock_IsUSBPLLLocked hangs when IRC is turned off</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-Clock-IsUSBPLLLocked-hangs-when-IRC-is-turned-off/m-p/1260206#M44602</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;xiangjun_rong&lt;/P&gt;&lt;P&gt;Thanks, it appears I missed the line in manual:&amp;nbsp;When switching clock sources, both clocks must be running.&lt;/P&gt;&lt;P&gt;When IRC is turned off after USB PLL setup, everything runs ok.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 05:03:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-Clock-IsUSBPLLLocked-hangs-when-IRC-is-turned-off/m-p/1260206#M44602</guid>
      <dc:creator>A_L</dc:creator>
      <dc:date>2021-04-12T05:03:07Z</dc:date>
    </item>
  </channel>
</rss>

