<?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 Software Development Kit中的主题 How to speed up Ram Drive?</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-speed-up-Ram-Drive/m-p/423654#M2273</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a ram drive using the function &lt;EM&gt;_io_mfs_install,&lt;/EM&gt; and &lt;EM&gt;_io_register_file_system &lt;/EM&gt;for the file system.&lt;EM&gt; &lt;/EM&gt;I write to the disk using &lt;EM&gt;fwrite&lt;/EM&gt;. All goes well without errors, but it is slow: around 45kB/s. Not what I expected of a ram drive. This is after compiler optimizations.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to speed up the ram drive? What is the maximum it could theoretically reach?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Sep 2015 08:57:30 GMT</pubDate>
    <dc:creator>sinterklaas</dc:creator>
    <dc:date>2015-09-03T08:57:30Z</dc:date>
    <item>
      <title>How to speed up Ram Drive?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-speed-up-Ram-Drive/m-p/423654#M2273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a ram drive using the function &lt;EM&gt;_io_mfs_install,&lt;/EM&gt; and &lt;EM&gt;_io_register_file_system &lt;/EM&gt;for the file system.&lt;EM&gt; &lt;/EM&gt;I write to the disk using &lt;EM&gt;fwrite&lt;/EM&gt;. All goes well without errors, but it is slow: around 45kB/s. Not what I expected of a ram drive. This is after compiler optimizations.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to speed up the ram drive? What is the maximum it could theoretically reach?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 08:57:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-speed-up-Ram-Drive/m-p/423654#M2273</guid>
      <dc:creator>sinterklaas</dc:creator>
      <dc:date>2015-09-03T08:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up Ram Drive?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-speed-up-Ram-Drive/m-p/423655#M2274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Sint,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it convenient to paste your code so that we can review your code even have a test? what is the software tools and hardware platform you are using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 06:23:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-speed-up-Ram-Drive/m-p/423655#M2274</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2015-09-08T06:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up Ram Drive?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-speed-up-Ram-Drive/m-p/423656#M2275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Software tools and hardware platform: I run with KDS3.0.0 and SDK library 1.1, and run this on a Freescale K64F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the following simplified code snippet, with all error checking removed. First a ram disk is created, then a file is written to it. Writing goes very slow:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14419715527387086" data-renderedposition="70_8_1232_184" jivemacro_uid="_14419715527387086"&gt;&lt;/PRE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;//Simplified version of creating ramdisk without error checking&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;const NIO_MEM_INIT_DATA_STRUCT NIO_MEM = { (uint32_t) myData, 8192};&lt;/P&gt;&lt;P&gt;_nio_dev_install(A_DEVICE, &amp;amp;nio_mem_dev_fn, (void *) &amp;amp;NIO_MEM) == NULL);&lt;/P&gt;&lt;P&gt;file_desc = open(A_DEVICE, 0);&lt;/P&gt;&lt;P&gt;io_mfs_install(file_desc, DISK, (_file_size) 0);&lt;/P&gt;&lt;P&gt;disk_file_desc = open(DISK, O_RDWR);&lt;/P&gt;&lt;P&gt;_io_register_file_system(disk_file_desc, DISK);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//write to a_file without error checking&lt;/P&gt;&lt;P&gt;a_file = fopen(a_file_name, "w");&lt;/P&gt;&lt;P&gt;fwrite(data_to_write, sizeof(char), size_of_data, a_file);&lt;/P&gt;&lt;P&gt;fclose(a_file)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this code snippet helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 11:38:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-speed-up-Ram-Drive/m-p/423656#M2275</guid>
      <dc:creator>sinterklaas</dc:creator>
      <dc:date>2015-09-11T11:38:21Z</dc:date>
    </item>
  </channel>
</rss>

