<?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: Possible BUG in USB 5.0 Stack (yes, another one) in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Possible-BUG-in-USB-5-0-Stack-yes-another-one/m-p/338493#M16237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for the clarification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I missed the semicolon.&amp;nbsp; You're right, the semicolon makes it safe.&amp;nbsp; It still bothers me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for accepting the change suggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Nov 2014 16:57:17 GMT</pubDate>
    <dc:creator>johnstrohm</dc:creator>
    <dc:date>2014-11-18T16:57:17Z</dc:date>
    <item>
      <title>Possible BUG in USB 5.0 Stack (yes, another one)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Possible-BUG-in-USB-5-0-Stack-yes-another-one/m-p/338491#M16235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In file usb_dev.c, lines 276-278, I find the following:&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((event-&amp;gt;direction == USB_RECV) &amp;amp;&amp;amp; (event-&amp;gt;buffer_ptr != NULL))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&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;&amp;nbsp;&amp;nbsp; OS_dcache_invalidate_mlines((void*)event-&amp;gt;buffer_ptr,event-&amp;gt;len);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; service_ptr-&amp;gt;service(event,service_ptr-&amp;gt;arg);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In file adapter_bm.h, line 64, I find the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;#define OS_dcache_invalidate_mlines(p,n)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The combination of these lines looks, to me, suspiciously like one of those old-time cartoon bombs, with the big,black sphere, and the fuse sizzling away.&amp;nbsp; The hapless customer who attempts to use the library on bare metal, without MQX, is likely to find himself chasing an interesting problem.&amp;nbsp; Once the preprocessor does its thing, the compiler will see:&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((event-&amp;gt;direction == USB_RECV) &amp;amp;&amp;amp; (event-&amp;gt;buffer_ptr != NULL))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&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;&amp;nbsp;&amp;nbsp; service_ptr-&amp;gt;service(event,service_ptr-&amp;gt;arg);&amp;nbsp; /* indentation added to emphasize issue */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;which is probably not exactly what is wanted, if the direction happened to be USB_SEND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I respectfully suggest the following modification?&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((event-&amp;gt;direction == USB_RECV) &amp;amp;&amp;amp; (event-&amp;gt;buffer_ptr != NULL))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OS_dcache_invalidate_mlines((void*)event-&amp;gt;buffer_ptr,event-&amp;gt;len);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; service_ptr-&amp;gt;service(event,service_ptr-&amp;gt;arg);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 22:36:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Possible-BUG-in-USB-5-0-Stack-yes-another-one/m-p/338491#M16235</guid>
      <dc:creator>johnstrohm</dc:creator>
      <dc:date>2014-11-13T22:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Possible BUG in USB 5.0 Stack (yes, another one)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Possible-BUG-in-USB-5-0-Stack-yes-another-one/m-p/338492#M16236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Firstly thanks for your raising the problem and help us improve the USB’s stack’s quality.&amp;nbsp; Since there is a “;” , the combination of&amp;nbsp; these line by compiler will be to:&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; color: #3d3d3d; font-size: 7pt;"&gt;if((event-&amp;gt;direction == USB_RECV) &amp;amp;&amp;amp; (event-&amp;gt;buffer_ptr != NULL))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; color: #3d3d3d; font-size: 7pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; color: #3d3d3d; font-size: 7pt;"&gt;service_ptr-&amp;gt;service(event,service_ptr-&amp;gt;arg);&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;So it will not impact the functionality of code. But I appreciate your code that you suggest change to. Such code is more clear and unambiguous. We accept it and change it in our stack.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 08:41:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Possible-BUG-in-USB-5-0-Stack-yes-another-one/m-p/338492#M16236</guid>
      <dc:creator>makeshi</dc:creator>
      <dc:date>2014-11-17T08:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Possible BUG in USB 5.0 Stack (yes, another one)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Possible-BUG-in-USB-5-0-Stack-yes-another-one/m-p/338493#M16237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for the clarification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I missed the semicolon.&amp;nbsp; You're right, the semicolon makes it safe.&amp;nbsp; It still bothers me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for accepting the change suggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 16:57:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Possible-BUG-in-USB-5-0-Stack-yes-another-one/m-p/338493#M16237</guid>
      <dc:creator>johnstrohm</dc:creator>
      <dc:date>2014-11-18T16:57:17Z</dc:date>
    </item>
  </channel>
</rss>

