<?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: FRDM-MCXN947: Detection of Disconnection of USB1_HS in MCX Microcontrollers</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/FRDM-MCXN947-Detection-of-Disconnection-of-USB1-HS/m-p/2026018#M2334</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/243923"&gt;@John_Adams&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Please refer to the following community post on how to enable the detach detection:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/What-is-the-best-way-to-detect-attaching-and-detaching-of-an-usb/m-p/1086414" target="_blank"&gt;What is the best way to detect attaching and detaching of an usb cable between RT1020 (device) and a host computer? - NXP Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;It is referring an RT1020, but it is the same process for the MCXN947.&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Edwin.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jan 2025 18:53:18 GMT</pubDate>
    <dc:creator>EdwinHz</dc:creator>
    <dc:date>2025-01-10T18:53:18Z</dc:date>
    <item>
      <title>FRDM-MCXN947: Detection of Disconnection of USB1_HS</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/FRDM-MCXN947-Detection-of-Disconnection-of-USB1-HS/m-p/2024939#M2326</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I would like to ask, on the FRDM-MCXN947 board I am using USB1_HS with OTG USB, I am trying to detect the connection and disconnection of this USB. Connection detection works fine, so I use this function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;usb_device_notification_t USB_State(usb_device_struct_t *pDeviceHandle)
{
	usb_device_ehci_state_struct_t *ehciState;
	ehciState = (usb_device_ehci_state_struct_t *)(pDeviceHandle-&amp;gt;controllerHandle);

	if (0U != (ehciState-&amp;gt;registerBase-&amp;gt;OTGSC &amp;amp; USBHS_OTGSC_BSV_MASK))
    {
		return kUSB_DeviceNotifyAttach;
    }
	return kUSB_DeviceNotifyDetach;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, for some reason this USB OTG register does not detect the disconnection correctly. Is it possible to use some other register to detect the disconnection?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any advise!&lt;/P&gt;&lt;P&gt;John Adams&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 15:42:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/FRDM-MCXN947-Detection-of-Disconnection-of-USB1-HS/m-p/2024939#M2326</guid>
      <dc:creator>John_Adams</dc:creator>
      <dc:date>2025-01-09T15:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-MCXN947: Detection of Disconnection of USB1_HS</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/FRDM-MCXN947-Detection-of-Disconnection-of-USB1-HS/m-p/2026018#M2334</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/243923"&gt;@John_Adams&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Please refer to the following community post on how to enable the detach detection:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/What-is-the-best-way-to-detect-attaching-and-detaching-of-an-usb/m-p/1086414" target="_blank"&gt;What is the best way to detect attaching and detaching of an usb cable between RT1020 (device) and a host computer? - NXP Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;It is referring an RT1020, but it is the same process for the MCXN947.&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Edwin.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 18:53:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/FRDM-MCXN947-Detection-of-Disconnection-of-USB1-HS/m-p/2026018#M2334</guid>
      <dc:creator>EdwinHz</dc:creator>
      <dc:date>2025-01-10T18:53:18Z</dc:date>
    </item>
  </channel>
</rss>

