<?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: attempting SD card on K60 without RTOS in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329230#M15280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Erich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck with this problem and was wondering if you could help me out,&lt;/P&gt;&lt;P&gt;Is it possible to store a file in a particular address of my choosing in an sd card,that way i do not need to know the the file name for any operation like file deletion or file renaming?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also in the "FAT1_getfree(path, nclst, fs)" function does nclst gives the size in Bytes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Mar 2015 05:18:58 GMT</pubDate>
    <dc:creator>arunkumar1989</dc:creator>
    <dc:date>2015-03-24T05:18:58Z</dc:date>
    <item>
      <title>attempting SD card on K60 without RTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329223#M15273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I am attempting to get an SD card working without using an RTOS.&lt;/P&gt;&lt;P&gt;I am stuck at a few points and need some help.&lt;/P&gt;&lt;P&gt;I have attached the project with this thread.&lt;/P&gt;&lt;P&gt;Firstly when opening&amp;nbsp; file using FAT1_open(),it returns FR_OK,but i do not see the file created on my computer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly,&lt;/P&gt;&lt;P&gt;FAT1_close() always gives error 0x01, FR_DISK_ERR for no reason, am i missing something else here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Arun Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 04:38:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329223#M15273</guid>
      <dc:creator>arunkumar1989</dc:creator>
      <dc:date>2015-03-19T04:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: attempting SD card on K60 without RTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329224#M15274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arun,&lt;/P&gt;&lt;P&gt;there is no project attached?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 07:15:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329224#M15274</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-03-19T07:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Re: attempting SD card on K60 without RTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329225#M15275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Opps here it is&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 07:34:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329225#M15275</guid>
      <dc:creator>arunkumar1989</dc:creator>
      <dc:date>2015-03-19T07:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Re: attempting SD card on K60 without RTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329226#M15276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arun,&lt;/P&gt;&lt;P&gt;thanks for posting the project. I assume you are using CodeWarrior v10.6 with my latest components from SourceForge?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that you had a .metadata (workspace) folder inside your project: that's clearly something not good (don't put a workspace into your project folder).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When compiling, I noticed this warning:&lt;/P&gt;&lt;P&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp; Resource&amp;nbsp;&amp;nbsp;&amp;nbsp; Path&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&amp;nbsp;&amp;nbsp;&amp;nbsp; Type&lt;/P&gt;&lt;P&gt;ignoring #pragma jump_switch&amp;nbsp; [-Wunknown-pragmas]&amp;nbsp;&amp;nbsp;&amp;nbsp; display.c&amp;nbsp;&amp;nbsp;&amp;nbsp; /sdcard1/Sources&amp;nbsp;&amp;nbsp;&amp;nbsp; line 261&amp;nbsp;&amp;nbsp;&amp;nbsp; C/C++ Problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this one is a real problem:&lt;/P&gt;&lt;P&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp; Resource&amp;nbsp;&amp;nbsp;&amp;nbsp; Path&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&amp;nbsp;&amp;nbsp;&amp;nbsp; Type&lt;/P&gt;&lt;P&gt;passing argument 1 of 'f_mount' from incompatible pointer type [enabled by default] passing argument 2 of 'f_mount' makes pointer from integer without a cast [enabled by default]&amp;nbsp;&amp;nbsp;&amp;nbsp; sdcard.c&amp;nbsp;&amp;nbsp;&amp;nbsp; /sdcard1/Sources&amp;nbsp;&amp;nbsp;&amp;nbsp; line 19&amp;nbsp;&amp;nbsp;&amp;nbsp; C/C++ Problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You pass a pointer to a file (FILE fp), and not a pointer to a FATFS fs. For sure, this will be a big problem the memory blocks/size behind these are different.&lt;/P&gt;&lt;P&gt;So can you fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other problem with your project I see is this: you are using the Timeout component, but I don't see that you feed the timeout every 10 ms (as specified in the properties) from a 10 ms timer interrupt or similar: you need to call TMOUT1_AddTick() every 10 ms, e.g. from Events.c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please have a look at this FatFS bare-metal (no OS) project on GitHub:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/TRW-K60N512/TWR-K60N512_FatFS_BM" title="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/TRW-K60N512/TWR-K60N512_FatFS_BM"&gt;mcuoneclipse/Examples/TRW-K60N512/TWR-K60N512_FatFS_BM at master · GitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 09:13:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329226#M15276</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-03-19T09:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: attempting SD card on K60 without RTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329227#M15277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes sir, i am using CW 10.6&lt;/P&gt;&lt;P&gt;I changed FILE fp to FAFTS fp;&lt;/P&gt;&lt;P&gt;I checked out the bare metal project,it gives me error on these lines&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;while(!FAT1_isDiskPresent()) {&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp; Resource&amp;nbsp;&amp;nbsp;&amp;nbsp; Path&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&amp;nbsp;&amp;nbsp;&amp;nbsp; Type&lt;/P&gt;&lt;P&gt;too few arguments to function 'FAT1_isDiskPresent'&amp;nbsp;&amp;nbsp;&amp;nbsp; Application.c&amp;nbsp;&amp;nbsp;&amp;nbsp; /TWR-K60N512_FatFS_BM/Sources&amp;nbsp;&amp;nbsp;&amp;nbsp; line 79&amp;nbsp;&amp;nbsp;&amp;nbsp; C/C++ Problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;FAT1_mount(0, &amp;amp;fileSystemObject); /* mount file system */&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp; Resource&amp;nbsp;&amp;nbsp;&amp;nbsp; Path&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&amp;nbsp;&amp;nbsp;&amp;nbsp; Type&lt;/P&gt;&lt;P&gt;macro "FAT1_mount" requires 3 arguments, but only 2 given 'FAT1_mount' undeclared (first use in this function)&amp;nbsp;&amp;nbsp;&amp;nbsp; Application.c&amp;nbsp;&amp;nbsp;&amp;nbsp; /TWR-K60N512_FatFS_BM/Sources&amp;nbsp;&amp;nbsp;&amp;nbsp; line 83&amp;nbsp;&amp;nbsp;&amp;nbsp; C/C++ Problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 09:51:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329227#M15277</guid>
      <dc:creator>arunkumar1989</dc:creator>
      <dc:date>2015-03-19T09:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: attempting SD card on K60 without RTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329228#M15278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I'm sorry, I missed to make the changes needed for CW for MCU10.6. I have now commited the changes:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/ErichStyger/mcuoneclipse/commit/1ece772a76c38a46c4fcaa3f8a49b8fcbaf4343f" title="https://github.com/ErichStyger/mcuoneclipse/commit/1ece772a76c38a46c4fcaa3f8a49b8fcbaf4343f"&gt;https://github.com/ErichStyger/mcuoneclipse/commit/1ece772a76c38a46c4fcaa3f8a49b8fcbaf4343f&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 10:07:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329228#M15278</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-03-19T10:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: attempting SD card on K60 without RTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329229#M15279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello sir,&lt;/P&gt;&lt;P&gt;I am able to create a file in the SD card now, Thank you so much.&lt;/P&gt;&lt;P&gt;The timer interrupt did the trick .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:58:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329229#M15279</guid>
      <dc:creator>arunkumar1989</dc:creator>
      <dc:date>2015-03-20T09:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: attempting SD card on K60 without RTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329230#M15280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Erich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck with this problem and was wondering if you could help me out,&lt;/P&gt;&lt;P&gt;Is it possible to store a file in a particular address of my choosing in an sd card,that way i do not need to know the the file name for any operation like file deletion or file renaming?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also in the "FAT1_getfree(path, nclst, fs)" function does nclst gives the size in Bytes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 05:18:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329230#M15280</guid>
      <dc:creator>arunkumar1989</dc:creator>
      <dc:date>2015-03-24T05:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: attempting SD card on K60 without RTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329231#M15281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arun,&lt;/P&gt;&lt;P&gt;the file system manages the low level blocks and allocation, so you cannot put a file at a specifiic address if using the file system. You would need to use the SD card in raw/block mode instead (but then you are not using the file system).&lt;/P&gt;&lt;P&gt;Using the file system, you do not need to know the file name for the delete operation: you need the file handle. But of course you need the file name/path to open the file to get the handle.&lt;/P&gt;&lt;P&gt;As for getfree() (and others), I recomment to have a look at the FatFs web site, or here &lt;A href="http://elm-chan.org/fsw/ff/en/getfree.html" title="http://elm-chan.org/fsw/ff/en/getfree.html"&gt;FatFs - f_getfree&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 11:21:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/attempting-SD-card-on-K60-without-RTOS/m-p/329231#M15281</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-03-24T11:21:54Z</dc:date>
    </item>
  </channel>
</rss>

