<?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>MCX MicrocontrollersのトピックUSB_DeviceSetSpeed() fix for usb_device_descriptor.c</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/USB-DeviceSetSpeed-fix-for-usb-device-descriptor-c/m-p/2350351#M5230</link>
    <description>&lt;P&gt;We found a problem in the usb_device_descriptor.c file of the frdmmcxn947_dev_phdc_weighscale_freertos_cm33_core0 sample project for the FRDM-MCXN947 development board.&amp;nbsp; We used this project as the basis for a new project.&amp;nbsp; After an upgrade to MacOS version Tahoe 26.4 our USB communication stopped working.&amp;nbsp; The symptom of the problem was that communication from the Mac to the FRDM-MCXN947 development board worked, but communication from the development board back to the Mac stopped working.&amp;nbsp; The fix to the problem was the following code changes to the USB_DeviceSetSpeed() function in usb_device_descriptor.c:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;USB_ENDPOINT_INTERRUPT) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; USB_ENDPOINT_BULK) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; USB_ENDPOINT_BULK) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;USB_ENDPOINT_INTERRUPT) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; USB_ENDPOINT_BULK) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; USB_ENDPOINT_BULK) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We no longer have problems with USB communication. I am posting this information in case it solves USB communication problems for others as well.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Apr 2026 22:03:35 GMT</pubDate>
    <dc:creator>Don_Adams_HPE</dc:creator>
    <dc:date>2026-04-13T22:03:35Z</dc:date>
    <item>
      <title>USB_DeviceSetSpeed() fix for usb_device_descriptor.c</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/USB-DeviceSetSpeed-fix-for-usb-device-descriptor-c/m-p/2350351#M5230</link>
      <description>&lt;P&gt;We found a problem in the usb_device_descriptor.c file of the frdmmcxn947_dev_phdc_weighscale_freertos_cm33_core0 sample project for the FRDM-MCXN947 development board.&amp;nbsp; We used this project as the basis for a new project.&amp;nbsp; After an upgrade to MacOS version Tahoe 26.4 our USB communication stopped working.&amp;nbsp; The symptom of the problem was that communication from the Mac to the FRDM-MCXN947 development board worked, but communication from the development board back to the Mac stopped working.&amp;nbsp; The fix to the problem was the following code changes to the USB_DeviceSetSpeed() function in usb_device_descriptor.c:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;USB_ENDPOINT_INTERRUPT) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; USB_ENDPOINT_BULK) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; USB_ENDPOINT_BULK) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;USB_ENDPOINT_INTERRUPT) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; USB_ENDPOINT_BULK) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (((pDescStart-&amp;gt;endpoint.bmAttributes &amp;amp; USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK) ==&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; USB_ENDPOINT_BULK) &amp;amp;&amp;amp;&lt;BR /&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((pDescStart-&amp;gt;endpoint.bEndpointAddress &amp;amp; USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) ==&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We no longer have problems with USB communication. I am posting this information in case it solves USB communication problems for others as well.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2026 22:03:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/USB-DeviceSetSpeed-fix-for-usb-device-descriptor-c/m-p/2350351#M5230</guid>
      <dc:creator>Don_Adams_HPE</dc:creator>
      <dc:date>2026-04-13T22:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: USB_DeviceSetSpeed() fix for usb_device_descriptor.c</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/USB-DeviceSetSpeed-fix-for-usb-device-descriptor-c/m-p/2351455#M5244</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/261582"&gt;@Don_Adams_HPE&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Thank you for your kind sharing.&lt;BR /&gt;I will report this to the internal SDK team for further review.&lt;BR /&gt;Thank you.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 10:24:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/USB-DeviceSetSpeed-fix-for-usb-device-descriptor-c/m-p/2351455#M5244</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2026-04-15T10:24:58Z</dc:date>
    </item>
  </channel>
</rss>

