<?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のトピックRe: More anomalous code fragments in the USB 5.0 stack</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/More-anomalous-code-fragments-in-the-USB-5-0-stack/m-p/349706#M17185</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry, but which version are you referring to? I just checked usb_phdc.c in KSDK 1.1, the line 844-849 is not what you mentioned above, so would you please help to clarify?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/47570iC8553B99F42FB8C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jan 2015 06:31:44 GMT</pubDate>
    <dc:creator>Kan_Li</dc:creator>
    <dc:date>2015-01-16T06:31:44Z</dc:date>
    <item>
      <title>More anomalous code fragments in the USB 5.0 stack</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/More-anomalous-code-fragments-in-the-USB-5-0-stack/m-p/349705#M17184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This shows up in several places, most severely in usb_phdc.c, at lines 844-849.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; devicePtr-&amp;gt;user_handle = *phdcHandle;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #if USB_METADATA_SUPPORTED&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; devicePtr-&amp;gt;phdc_metadata = FALSE; /* metadata feature disabled */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *phdcHandle =(unsigned long)devicePtr;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;phdcHandle is described as an OUT parameter, meaning that it points SOMEWHERE valid, but the contents are unlikely to be anything useful.&amp;nbsp; This means that the assignment at line 844 is likely to store garbage in a well-defined place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the two assignments are reversed in order, garbage is not stored.&amp;nbsp; Instead, devicePtr-&amp;gt;user_handle points to itself, which does not seem particularly useful, since you would then have devicePtr-&amp;gt;user_handle == devicePtr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;usb_hid.c has the assignments in reverse order, viz.,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *hidHandle =(unsigned long)devicePtr;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //devicePtr-&amp;gt;user_handle = *hidHandle;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;but the self-looper creation is commented out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;usb_audio.c has the assignments in reverse order, making the self-looper.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *audioHandle =(uint32_t)devicePtr;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; devicePtr-&amp;gt;user_handle = *audioHandle;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other class drivers all define a user_handle field in their respective header files, but do not bother to assign anything to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This looks like something that could be cleaned up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 23:57:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/More-anomalous-code-fragments-in-the-USB-5-0-stack/m-p/349705#M17184</guid>
      <dc:creator>johnstrohm</dc:creator>
      <dc:date>2015-01-15T23:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: More anomalous code fragments in the USB 5.0 stack</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/More-anomalous-code-fragments-in-the-USB-5-0-stack/m-p/349706#M17185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry, but which version are you referring to? I just checked usb_phdc.c in KSDK 1.1, the line 844-849 is not what you mentioned above, so would you please help to clarify?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/47570iC8553B99F42FB8C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 06:31:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/More-anomalous-code-fragments-in-the-USB-5-0-stack/m-p/349706#M17185</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2015-01-16T06:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: More anomalous code fragments in the USB 5.0 stack</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/More-anomalous-code-fragments-in-the-USB-5-0-stack/m-p/349707#M17186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://www.freescale.com/webapp/Download?colCode=USB_STACK_V5.0&amp;amp;prodCode=MEDICALUSB&amp;amp;appType=license&amp;amp;location=null&amp;amp;fpsp=1" style="color: #017bba; font-family: arial, sans-serif; font-size: 12px;"&gt;USB_STACK_V5.0&lt;/A&gt;&lt;SPAN style="color: #51626f; font-family: arial, sans-serif; font-size: 12px;"&gt;: USB Stack v5.0-Beta Freescale bare metal (no OS) USB Stack, freshly downloaded from &lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MEDICALUSB" title="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MEDICALUSB"&gt;USB Stack|Freescale&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, sans-serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, sans-serif; font-size: 12px;"&gt;I just pulled a brand-new copy, and verified it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, sans-serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, sans-serif; font-size: 12px;"&gt;The lines in question are about 70 lines down from where your version shows line 844.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, sans-serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 16:39:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/More-anomalous-code-fragments-in-the-USB-5-0-stack/m-p/349707#M17186</guid>
      <dc:creator>johnstrohm</dc:creator>
      <dc:date>2015-01-16T16:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: More anomalous code fragments in the USB 5.0 stack</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/More-anomalous-code-fragments-in-the-USB-5-0-stack/m-p/349708#M17187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reporting this! I have forwarded this question to our USB stack team, and will let you know when I have any more information!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 07:28:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/More-anomalous-code-fragments-in-the-USB-5-0-stack/m-p/349708#M17187</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2015-01-19T07:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Re: More anomalous code fragments in the USB 5.0 stack</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/More-anomalous-code-fragments-in-the-USB-5-0-stack/m-p/349709#M17188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just got the feedback, and the software team told me The code of PHDC init is wrong, actually user_handle is obsolete and should not be used. so in the later version usb_handle will all be commented. Thanks for your reporting!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 08:58:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/More-anomalous-code-fragments-in-the-USB-5-0-stack/m-p/349709#M17188</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2015-01-19T08:58:40Z</dc:date>
    </item>
  </channel>
</rss>

