<?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 Questions about the LPC51U68 USB in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Questions-about-the-LPC51U68-USB/m-p/2062725#M57914</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;I want to use a software a approach to simulate the condition where USB VBus detects a connection, and modify it using the framework of the exmaple code 'dev_cdc_vcom_lite_bm'.&lt;BR /&gt;&lt;BR /&gt;The environment I'm working with is the LPC51U68 EVK.&lt;BR /&gt;&lt;BR /&gt;In the LPC51U68 Product data sheet, on page 85, there's a section that says:&amp;nbsp;&lt;BR /&gt;'Remark: When a self-powered circuit is used without connecting VBUS, configure the USB_VBUS pin for GPIO (PIO1_6 or PIO1_11) and provide software that can detect the host presence through some other mechanism before enabling USB_CONNECT and the SoftConnect feature. Enabling the SoftConnect without host presence leads to USB compliance failure. '&lt;BR /&gt;&lt;BR /&gt;Does this mean that other methods can be used to replace VBus detection of the host? For example, using a software flag to directly drive USB enumeration?&lt;BR /&gt;&lt;BR /&gt;I noticed in UM11071 that when both DCON (bit 16) and&amp;nbsp;VBUSDEBOUNCED (bit 28) in&amp;nbsp;DEVCMDSTAT are 1, the devices status changes to 'connected'. So, the code should include a condition that checks these two bits to ensure USB Initial or Run succeeds, leading to normal enumeration, right? Can you tell me the key word to focus on?&lt;/P&gt;</description>
    <pubDate>Mon, 17 Mar 2025 05:22:06 GMT</pubDate>
    <dc:creator>hermus</dc:creator>
    <dc:date>2025-03-17T05:22:06Z</dc:date>
    <item>
      <title>Questions about the LPC51U68 USB</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Questions-about-the-LPC51U68-USB/m-p/2062725#M57914</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;I want to use a software a approach to simulate the condition where USB VBus detects a connection, and modify it using the framework of the exmaple code 'dev_cdc_vcom_lite_bm'.&lt;BR /&gt;&lt;BR /&gt;The environment I'm working with is the LPC51U68 EVK.&lt;BR /&gt;&lt;BR /&gt;In the LPC51U68 Product data sheet, on page 85, there's a section that says:&amp;nbsp;&lt;BR /&gt;'Remark: When a self-powered circuit is used without connecting VBUS, configure the USB_VBUS pin for GPIO (PIO1_6 or PIO1_11) and provide software that can detect the host presence through some other mechanism before enabling USB_CONNECT and the SoftConnect feature. Enabling the SoftConnect without host presence leads to USB compliance failure. '&lt;BR /&gt;&lt;BR /&gt;Does this mean that other methods can be used to replace VBus detection of the host? For example, using a software flag to directly drive USB enumeration?&lt;BR /&gt;&lt;BR /&gt;I noticed in UM11071 that when both DCON (bit 16) and&amp;nbsp;VBUSDEBOUNCED (bit 28) in&amp;nbsp;DEVCMDSTAT are 1, the devices status changes to 'connected'. So, the code should include a condition that checks these two bits to ensure USB Initial or Run succeeds, leading to normal enumeration, right? Can you tell me the key word to focus on?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 05:22:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Questions-about-the-LPC51U68-USB/m-p/2062725#M57914</guid>
      <dc:creator>hermus</dc:creator>
      <dc:date>2025-03-17T05:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about the LPC51U68 USB</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Questions-about-the-LPC51U68-USB/m-p/2063699#M57925</link>
      <description>&lt;P&gt;Hardware: OM40005 (LPC51U68 EVK)&lt;BR /&gt;Software:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; SDK Version: 2.15.00&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Maifest Version: 3.14.0&lt;BR /&gt;&lt;BR /&gt;In the example code under usb_examples &amp;gt; rom_dev_cdc_bm, I noticed the line USBD_API-&amp;gt;hw-&amp;gt;Connect(g_hUsb, 1) which seems to align with the SoftConnect functionality.&lt;/P&gt;&lt;P&gt;To verify whether the Connect function works, I performed open-circuit and short-circuit tests on JP10 of the LPC51U68 EVK. When JP10 is shorted, enumeration works normally, but when it’s open, enumeration fails.&lt;/P&gt;&lt;P&gt;Regardless of whether I configure P1_6 as USB0_VBUS or GPIO, after opening JP10 and monitoring D+ with a Logic Analyzer, I found that during operation, there’s no period where D+ goes high, meaning enumeration fails.&lt;/P&gt;&lt;P&gt;What confuses me is that in UM11071, Chapter 22.4.3 SoftConnect, it states:&lt;/P&gt;&lt;P&gt;'The softConnect signal is implemented internally. An external pull-up resistor between USB_DP and VDD is not necessary. Software can control the pull-up by setting the DCON bit in the DEVCMDSTAT register. If the DCON bit is set to 1, the USB_DP line is pulled up to VDD through an internal 1.5 KOhm pull-up resistor.'&lt;/P&gt;&lt;P&gt;So why does the pull-up only work when JP10 is shorted and P1_6 is set to USB0_VBUS?&lt;/P&gt;&lt;P&gt;Additionally, the description in Section 22.4.3 seems inconsistent with the description of the DCON bit in Table 348 of the DEVCMDSTAT register. The DCON bit is described as:&lt;/P&gt;&lt;P&gt;'The connect bit must be set by SW to indicate that the device must signal a connect. The pull-up resistor on USB0_DP will be enabled when this bit is set and the VBUSDEBOUNCED bit is one.'&lt;/P&gt;&lt;P&gt;It appears that the VBUSDEBOUNCED bit must also be set to 1, and since VBUSDEBOUNCED is tied to the VBus detection pin. Does this mean VBus detection is required for D+ to be pulled up?&lt;/P&gt;&lt;P&gt;I’d like to ask: If I don’t connect JP10, what methods can I use in the LPC51U68 example code to ensure normal USB operation? Or is it absolutely necessary to short JP10 for VBus detection to enable USB to perform subsequent actions properly?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 10:21:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Questions-about-the-LPC51U68-USB/m-p/2063699#M57925</guid>
      <dc:creator>hermus</dc:creator>
      <dc:date>2025-03-18T10:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about the LPC51U68 USB</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Questions-about-the-LPC51U68-USB/m-p/2065210#M57938</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/240845"&gt;@hermus&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the LPC51U68 EVK, JP10 connects the USB VBUS signal to P1_6, which is the dedicated USB0_VBUS pin. When JP10 is shorted, the MCU can detect VBUS, set the VBUSDEBOUNCED bit, and proceed with USB enumeration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If JP10 is open, the MCU cannot detect VBUS, meaning the VBUSDEBOUNCED bit never gets set. Consequently, the internal pull-up on D+ will never be activated, causing enumeration failure.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Harry_Zhang_0-1742443350210.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/328983i66110EEBEB836F71/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Harry_Zhang_0-1742443350210.png" alt="Harry_Zhang_0-1742443350210.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you want to bypass the VBUS detection mechanism by simulating it in software. Since you’ve already tried configuring P1_6 as GPIO, you could manually set the VBUSDEBOUNCED bit using the DEVCMDSTAT register.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Harry_Zhang_1-1742443459038.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/328984i7F25328998926802/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Harry_Zhang_1-1742443459038.png" alt="Harry_Zhang_1-1742443459038.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, the VBUSDEBOUNCED bit is read-only, meaning it’s not directly writable by software.&lt;/P&gt;
&lt;P&gt;you can try:&lt;BR /&gt;&lt;BR /&gt;Powering the Device Externally: Provide a constant VBUS signal through hardware to keep P1_6 high.&lt;BR /&gt;&lt;BR /&gt;Jumping Directly to Enumeration: Skip the VBUS check and directly set the DCON bit after USB initialization. For example, after calling USBD_API-&amp;gt;hw-&amp;gt;Init() and configuring endpoints, immediately call:&lt;BR /&gt;&lt;BR /&gt;USBD_API-&amp;gt;hw-&amp;gt;Connect(g_hUsb, 1);&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 04:05:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Questions-about-the-LPC51U68-USB/m-p/2065210#M57938</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2025-03-20T04:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about the LPC51U68 USB</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Questions-about-the-LPC51U68-USB/m-p/2067193#M57961</link>
      <description>Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229957"&gt;@Harry_Zhang&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thank you for your response. Your method is feasible. However, I later noticed a pull-down resistor R75 near P1_6. Therefore, I performed an inverted operation on P1_6 and left JP10 open circuit, allowing the LPC51U68 to interpret 0 as 1.</description>
      <pubDate>Mon, 24 Mar 2025 10:24:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Questions-about-the-LPC51U68-USB/m-p/2067193#M57961</guid>
      <dc:creator>hermus</dc:creator>
      <dc:date>2025-03-24T10:24:39Z</dc:date>
    </item>
  </channel>
</rss>

