<?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: [MCXN236] Example source code for OTG in MCX Microcontrollers</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN236-Example-source-code-for-OTG/m-p/2204082#M4357</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/107445"&gt;@bryan_hong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your question.&lt;/P&gt;
&lt;P&gt;The OTG protocol is quite complex and has largely been phased out. Using a pin to detect and switch between host and device&amp;nbsp; is a simpler approach.&lt;/P&gt;
&lt;P&gt;Please refer to the &lt;CODE&gt;pin_detect_hid_mouse&lt;/CODE&gt; demo under SDK&amp;nbsp; for reference.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1763005755267.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/365410iC2B3E1FFF1C6FEBC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1763005755267.png" alt="Alice_Yang_0-1763005755267.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When running the demo,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Host:&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Plug in a mouse to the test board. The board acts as an USB host. The stack switches to&lt;STRONG&gt; host mode&lt;/STRONG&gt; and some device attached information is printed out.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Device:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Unplug the mouse with the cable. The board now acts as a USB device mouse. The mouse is detached and the USB switches to the&lt;STRONG&gt; device mode&lt;/STRONG&gt; information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
    <pubDate>Thu, 13 Nov 2025 03:49:34 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2025-11-13T03:49:34Z</dc:date>
    <item>
      <title>[MCXN236] Example source code for OTG</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN236-Example-source-code-for-OTG/m-p/2203966#M4355</link>
      <description>&lt;P&gt;dear nxp&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you provide the example&amp;nbsp; source code for OTG on mcxn236 ?&lt;/P&gt;&lt;P&gt;I can't find the example `application code hub` and MCUXpresso.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Bryan&lt;/P&gt;</description>
      <pubDate>Wed, 12 Nov 2025 23:52:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN236-Example-source-code-for-OTG/m-p/2203966#M4355</guid>
      <dc:creator>bryan_hong</dc:creator>
      <dc:date>2025-11-12T23:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: [MCXN236] Example source code for OTG</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN236-Example-source-code-for-OTG/m-p/2204082#M4357</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/107445"&gt;@bryan_hong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your question.&lt;/P&gt;
&lt;P&gt;The OTG protocol is quite complex and has largely been phased out. Using a pin to detect and switch between host and device&amp;nbsp; is a simpler approach.&lt;/P&gt;
&lt;P&gt;Please refer to the &lt;CODE&gt;pin_detect_hid_mouse&lt;/CODE&gt; demo under SDK&amp;nbsp; for reference.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1763005755267.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/365410iC2B3E1FFF1C6FEBC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1763005755267.png" alt="Alice_Yang_0-1763005755267.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When running the demo,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Host:&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Plug in a mouse to the test board. The board acts as an USB host. The stack switches to&lt;STRONG&gt; host mode&lt;/STRONG&gt; and some device attached information is printed out.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Device:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Unplug the mouse with the cable. The board now acts as a USB device mouse. The mouse is detached and the USB switches to the&lt;STRONG&gt; device mode&lt;/STRONG&gt; information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 03:49:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN236-Example-source-code-for-OTG/m-p/2204082#M4357</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2025-11-13T03:49:34Z</dc:date>
    </item>
  </channel>
</rss>

