<?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: USB 4.0.3 stack performance in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-4-0-3-stack-performance/m-p/256308#M11625</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found that the 4.0.3 USB stack has much more overhead than the CMX stack we were using.&amp;nbsp; (I'm not really surprised by this since the new stack does so much more.)&amp;nbsp; To make the system work, I did have to buffer up the writes to and call f_sync() rather than f_close()/f_open() for each write.&amp;nbsp; With these changes the throughput is adequate.&amp;nbsp; So Tom was right on with the need to buffer up the data.&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Norm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2013 18:31:48 GMT</pubDate>
    <dc:creator>nmay</dc:creator>
    <dc:date>2013-02-28T18:31:48Z</dc:date>
    <item>
      <title>USB 4.0.3 stack performance</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-4-0-3-stack-performance/m-p/256305#M11622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the USB 4.0.3 stack in Host mode on a Coldfire V1 MCF51JM128 processor (DEMOJM board) and the performance is slower than I expected.&amp;nbsp; The code is the example for the MSD MFS generic code from Freescale.&amp;nbsp; And instead of running the full FAT demo code, I just use the following code and measure the time it takes to open a file, write a string and close the file.&amp;nbsp; The time to perform these actions (which are in the while loop below) is 109 ms.&amp;nbsp; I have a 1GB USB Freescale flash drive attached to the DEMOJM board.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void diskSpeedTest(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; volatile FRESULT returnCode = FR_OK; /* return code */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FATFS fatfs;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* File system object */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; FATFS *fs = NULL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint_32 fre_clust = 0, size;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FIL fil;&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; /* File object */&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; pfLogInit();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; LED_PutVal(TRUE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; time_delay(1000);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; LED_PutVal(FALSE);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; returnCode = f_mount(0, &amp;amp;fatfs);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; disk_initialize(0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; time_delay(1000);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; LED_PutVal(TRUE);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; pfLog(PF_APPMGR,0x10);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; returnCode = f_getfree("0:", &amp;amp;fre_clust, &amp;amp;fs);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; pfLog(PF_APPMGR,0x11);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; while (1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LED_PutVal(FALSE);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnCode = f_open(&amp;amp;fil,"NewFile1.dat",FA_WRITE|FA_CREATE_ALWAYS);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pfLog(PF_APPMGR,0x12);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnCode = f_write(&amp;amp;fil,"Line 1: Write data to&amp;nbsp; file uses f_write function \n\r",52,&amp;amp;size);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pfLog(PF_APPMGR,0x13);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnCode = f_sync(&amp;amp;fil);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pfLog(PF_APPMGR,0x14);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnCode = f_close(&amp;amp;fil);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pfLog(PF_APPMGR,0x15);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LED_PutVal(TRUE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time_delay(100);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Has anyone performed any benchmarks on the USB 4.0.3 stack?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;How much performance can I expect out of this stack?&amp;nbsp; I believe this stack does not use a buffer for the transmit/receive data, so that would help some, but I'm afraid not enough to get me to our product needs.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;To get a faster stack, do I need to look at other sources?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;--Norm&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 20:17:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-4-0-3-stack-performance/m-p/256305#M11622</guid>
      <dc:creator>nmay</dc:creator>
      <dc:date>2013-02-12T20:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: USB 4.0.3 stack performance</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-4-0-3-stack-performance/m-p/256306#M11623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest changing your benchmark to measure different operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As fine as measuring the execution times of every file-system call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd also suggest performing some "bulk writes". Write 512 bytes of binary data, or 1k or even 10k if the interface supports it and measure the "bulk write" speed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that is high enough you might be able to buffer the data in your code and write it out a block at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to work out what performance you require before finding if the system can deliver it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Speed? We're using the stack we bought from SMX. It consists of three parts, USBD, USBH and SMXFS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.smxrtos.com/rtos/usb/smxusbd.htm" title="http://www.smxrtos.com/rtos/usb/smxusbd.htm"&gt;http://www.smxrtos.com/rtos/usb/smxusbd.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We're nearly maxing out the 12MHz USB port on an MPC5329 and getting about 800 kbytes/second during bulk writes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2013 06:25:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-4-0-3-stack-performance/m-p/256306#M11623</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2013-02-13T06:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: USB 4.0.3 stack performance</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-4-0-3-stack-performance/m-p/256307#M11624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Norm, how is the project going?&lt;/P&gt;&lt;P&gt;Was this useful? &lt;/P&gt;&lt;P&gt;Keep us posted!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 22:42:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-4-0-3-stack-performance/m-p/256307#M11624</guid>
      <dc:creator>Monica</dc:creator>
      <dc:date>2013-02-18T22:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: USB 4.0.3 stack performance</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-4-0-3-stack-performance/m-p/256308#M11625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found that the 4.0.3 USB stack has much more overhead than the CMX stack we were using.&amp;nbsp; (I'm not really surprised by this since the new stack does so much more.)&amp;nbsp; To make the system work, I did have to buffer up the writes to and call f_sync() rather than f_close()/f_open() for each write.&amp;nbsp; With these changes the throughput is adequate.&amp;nbsp; So Tom was right on with the need to buffer up the data.&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Norm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 18:31:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-4-0-3-stack-performance/m-p/256308#M11625</guid>
      <dc:creator>nmay</dc:creator>
      <dc:date>2013-02-28T18:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: USB 4.0.3 stack performance</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-4-0-3-stack-performance/m-p/256309#M11626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AWESOME Norm, keep it up! :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 18:33:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-4-0-3-stack-performance/m-p/256309#M11626</guid>
      <dc:creator>Monica</dc:creator>
      <dc:date>2013-02-28T18:33:26Z</dc:date>
    </item>
  </channel>
</rss>

