<?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>Kinetis MicrocontrollersのトピックNXP Kinetis K22 USB Issues When Using USB Stack In C++</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/NXP-Kinetis-K22-USB-Issues-When-Using-USB-Stack-In-C/m-p/2340286#M68281</link>
    <description>&lt;P&gt;Does anyone have any experience when using the NXP/Freescale C USB Stack in C++?&lt;/P&gt;&lt;P&gt;I'm facing a issue whereby when the CDC device attempts to enumerate, the device descriptor requests are failing. I've debugged as far as I can and I can see that the USB OTG interrupt is being entered for SLEEP, RESET and SOF states but no others.&lt;/P&gt;&lt;P&gt;What I'm assuming is that I've missed something subtle however in the grand scheme of things, the only thing I've really changed is adding an `extern "C"` to the USB ISR function. Clocking is correct, interrupts have been configured and enabled.&lt;/P&gt;&lt;P&gt;I have an existing C project which works absolutely fine, using the same USB stack source code. This is what I'm moving over from.&lt;/P&gt;&lt;P&gt;My target hardware is a Kinetis MK22FN1M0AVLH12 device, running from a 16MHz crystal.&lt;/P&gt;&lt;P&gt;I've not posted any code as I don't really know what to post at the moment - I can post anything which would be relevant.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Mar 2026 11:32:06 GMT</pubDate>
    <dc:creator>prabhutravels</dc:creator>
    <dc:date>2026-03-26T11:32:06Z</dc:date>
    <item>
      <title>NXP Kinetis K22 USB Issues When Using USB Stack In C++</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/NXP-Kinetis-K22-USB-Issues-When-Using-USB-Stack-In-C/m-p/2340286#M68281</link>
      <description>&lt;P&gt;Does anyone have any experience when using the NXP/Freescale C USB Stack in C++?&lt;/P&gt;&lt;P&gt;I'm facing a issue whereby when the CDC device attempts to enumerate, the device descriptor requests are failing. I've debugged as far as I can and I can see that the USB OTG interrupt is being entered for SLEEP, RESET and SOF states but no others.&lt;/P&gt;&lt;P&gt;What I'm assuming is that I've missed something subtle however in the grand scheme of things, the only thing I've really changed is adding an `extern "C"` to the USB ISR function. Clocking is correct, interrupts have been configured and enabled.&lt;/P&gt;&lt;P&gt;I have an existing C project which works absolutely fine, using the same USB stack source code. This is what I'm moving over from.&lt;/P&gt;&lt;P&gt;My target hardware is a Kinetis MK22FN1M0AVLH12 device, running from a 16MHz crystal.&lt;/P&gt;&lt;P&gt;I've not posted any code as I don't really know what to post at the moment - I can post anything which would be relevant.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2026 11:32:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/NXP-Kinetis-K22-USB-Issues-When-Using-USB-Stack-In-C/m-p/2340286#M68281</guid>
      <dc:creator>prabhutravels</dc:creator>
      <dc:date>2026-03-26T11:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: NXP Kinetis K22 USB Issues When Using USB Stack In C++</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/NXP-Kinetis-K22-USB-Issues-When-Using-USB-Stack-In-C/m-p/2341994#M68287</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/261061"&gt;@prabhutravels&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT size="4" color="#000000"&gt;Please verify that &lt;CODE&gt;extern "C"&lt;/CODE&gt; is added to the correct ISR function. Also add a GPIO toggle inside the ISR to confirm whether the interrupt is actually entered.&lt;/FONT&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT size="4" color="#000000"&gt;Try moving your USB-related C++ source file back to a pure C file and test again. If the device enumerates successfully, it indicates that the issue is related to the C++ environment.&lt;/FONT&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4" color="#000000"&gt;BR&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4" color="#000000"&gt;Alice&lt;/FONT&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Mar 2026 06:27:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/NXP-Kinetis-K22-USB-Issues-When-Using-USB-Stack-In-C/m-p/2341994#M68287</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2026-03-30T06:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: NXP Kinetis K22 USB Issues When Using USB Stack In C++</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/NXP-Kinetis-K22-USB-Issues-When-Using-USB-Stack-In-C/m-p/2343076#M68291</link>
      <description>Does anyone have any experience when using the NXP/Freescale C USB Stack in C++?&lt;BR /&gt;&lt;BR /&gt;I'm facing a issue whereby when the CDC device attempts to enumerate, the device descriptor requests are failing. I've debugged as far as I can and I can see that the USB OTG interrupt is being entered for SLEEP, RESET and SOF states but no others.&lt;BR /&gt;&lt;BR /&gt;What I'm assuming is that I've missed something subtle however in the grand scheme of things, the only thing I've really changed is adding an `extern "C"` to the USB ISR function. Clocking is correct, interrupts have been configured and enabled.&lt;BR /&gt;&lt;BR /&gt;I have an existing C project which works absolutely fine, using the same USB stack source code. This is what I'm moving over from.&lt;BR /&gt;&lt;BR /&gt;My target hardware is a Kinetis MK22FN1M0AVLH12 device, running from a 16MHz crystal.&lt;BR /&gt;&lt;BR /&gt;I've not posted any code as I don't really know what to post at the moment - I can post anything which would be relevant. &lt;A href="https://routerlogin.uno/" target="_blank"&gt;https://routerlogin.uno/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I got this,...</description>
      <pubDate>Tue, 31 Mar 2026 12:44:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/NXP-Kinetis-K22-USB-Issues-When-Using-USB-Stack-In-C/m-p/2343076#M68291</guid>
      <dc:creator>prabhutravels</dc:creator>
      <dc:date>2026-03-31T12:44:35Z</dc:date>
    </item>
  </channel>
</rss>

