<?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: sync function hangs when using FATFS with SDHC - K70 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237673#M5591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello Erich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have downloaded test for SD card which you have attached. I found that It is for CW 10.3 version. Can same test is avaliable for Keil tool ? Or how can we implement sd card test for keil tool?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My basic application is like this :&lt;/P&gt;&lt;P&gt;&amp;gt; Open file from SD card.&lt;/P&gt;&lt;P&gt;&amp;gt; Read from the file.&lt;/P&gt;&lt;P&gt;&amp;gt; Perform some mathemetical operation.&lt;/P&gt;&lt;P&gt;&amp;gt; Write output in file on SD card.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help from you is appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Mar 2013 12:51:01 GMT</pubDate>
    <dc:creator>johnturnur</dc:creator>
    <dc:date>2013-03-04T12:51:01Z</dc:date>
    <item>
      <title>sync function hangs when using FATFS with SDHC - K70</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237668#M5586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I am having an issue when using FATFs with a micro 4gb SDHC card and my K70 tower board.&lt;/P&gt;&lt;P&gt;I wrote a basic test program with the help of Erich's wonderful blog at &lt;A href="http://mcuoneclipse.com/2012/07/30/fatfs-with-kinetis/"&gt;http://mcuoneclipse.com/2012/07/30/fatfs-with-kinetis/&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My card is preformatted to FAT32.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My program does the following:&lt;/P&gt;&lt;P&gt;1. ensures that a card is inserted&lt;/P&gt;&lt;P&gt;2. mounts the card&lt;/P&gt;&lt;P&gt;3. opens a file&lt;/P&gt;&lt;P&gt;4. writes a test string&lt;/P&gt;&lt;P&gt;5. closes the file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issues occurs on the final step, and I have traced it back to the sync function hanging.&lt;/P&gt;&lt;P&gt;(this occurs if sync is called manually, or when it is called from the action of closing the file)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears to spin forever in the SD_Wait function called from the disk_ioctl function passing the CTRL_SYNC command.&lt;/P&gt;&lt;P&gt;This indicates that SD-&amp;gt;Finished is not being set AND a timeout is not occurring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I pull the card and put it in my PC, the file is in the root directory as expected, with the test string.&lt;/P&gt;&lt;P&gt;Any ideas on what may be causing this hang or how to fix it ?&lt;/P&gt;&lt;P&gt;It is reassuring that the files exist correctly on the card, as this should indicate that the rest of the code is working okay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chandler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 14:26:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237668#M5586</guid>
      <dc:creator>dachancellor</dc:creator>
      <dc:date>2013-01-25T14:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: sync function hangs when using FATFS with SDHC - K70</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237669#M5587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chandler,&lt;/P&gt;&lt;P&gt;hard to tell without actually debugging it. One thing could be that there is a timeout somewhere (but it should not hang). The thing is that the timing is very different from one SD card to another. You might try with a different SD card.&lt;/P&gt;&lt;P&gt;I see if I can replicate over the week-end what you see. If you can share your project, that would give me a good starting point.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 14:56:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237669#M5587</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2013-01-25T14:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: sync function hangs when using FATFS with SDHC - K70</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237670#M5588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;Thanks for the quick response!&lt;/P&gt;&lt;P&gt;Code attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I can think is that I am not clocking the timer for my timeout within SD_Wait, resulting in a hang.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the sync function, specifically the disk_ioctl CTRL_SYNC call, I do not understand what purpose it serves.&lt;/P&gt;&lt;P&gt;The SD-&amp;gt;Finished flag will be set and cleared by the disk_write call a few lines above it.&lt;/P&gt;&lt;P&gt;When the disk_ioctl CTRL_SYNC is called, it calls an empty Activate function, then enters SD_Wait.&lt;/P&gt;&lt;P&gt;Since the finished flag is already cleared, SD_Wait will only be able to time out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chandler&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 15:27:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237670#M5588</guid>
      <dc:creator>dachancellor</dc:creator>
      <dc:date>2013-01-25T15:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: sync function hangs when using FATFS with SDHC - K70</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237671#M5589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chandler,&lt;/P&gt;&lt;P&gt;I have spotted the missing part: the Timeout component is not called peridically from a 10ms timer interrupt. So I have added a 10 ms timer, and called it from the Events.c:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void TI1_OnInterrupt(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; TMOUT1_AddTick();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN class="mce_paste_marker"&gt;I have extended the post in &lt;/SPAN&gt;&lt;A href="http://mcuoneclipse.com/2012/07/30/fatfs-with-kinetis/" title="http://mcuoneclipse.com/2012/07/30/fatfs-with-kinetis/"&gt;FatFs with Kinetis | MCU on Eclipse&lt;/A&gt;&lt;SPAN class="mce_paste_marker"&gt; so it is less likely to be missed.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Attached is the modified project, but I think the change is straigt forward. &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;If you I agree, I would like to publish that project on &lt;/SPAN&gt;&lt;A href="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples" title="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples"&gt;mcuoneclipse/Examples at master · ErichStyger/mcuoneclipse · GitHub&lt;/A&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;. That way I can keep it in sync with all the other Embedded Components hosted on GitHub. Let me know if that's ok for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Jan 2013 10:30:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237671#M5589</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2013-01-27T10:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: sync function hangs when using FATFS with SDHC - K70</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237672#M5590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Erich!&lt;/P&gt;&lt;P&gt;I figured it was something small like that, but then I was confused since it seemed like the sync was designed to timeout every time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are welcome to post that project on Git.&lt;/P&gt;&lt;P&gt;V/R,&lt;/P&gt;&lt;P&gt;Chandler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 12:31:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237672#M5590</guid>
      <dc:creator>dachancellor</dc:creator>
      <dc:date>2013-01-28T12:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: sync function hangs when using FATFS with SDHC - K70</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237673#M5591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello Erich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have downloaded test for SD card which you have attached. I found that It is for CW 10.3 version. Can same test is avaliable for Keil tool ? Or how can we implement sd card test for keil tool?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My basic application is like this :&lt;/P&gt;&lt;P&gt;&amp;gt; Open file from SD card.&lt;/P&gt;&lt;P&gt;&amp;gt; Read from the file.&lt;/P&gt;&lt;P&gt;&amp;gt; Perform some mathemetical operation.&lt;/P&gt;&lt;P&gt;&amp;gt; Write output in file on SD card.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help from you is appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 12:51:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237673#M5591</guid>
      <dc:creator>johnturnur</dc:creator>
      <dc:date>2013-03-04T12:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: sync function hangs when using FATFS with SDHC - K70</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237674#M5592</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;you could use that project/componets posted here with Keil too (see &lt;A href="http://mcuoneclipse.com/2013/06/28/using-keil-%C2%B5vision-arm-mdk-with-processor-expert-driver-suite/" title="http://mcuoneclipse.com/2013/06/28/using-keil-%C2%B5vision-arm-mdk-with-processor-expert-driver-suite/"&gt;Using Keil µVision (ARM-MDK) with Processor Expert Driver Suite | MCU on Eclipse&lt;/A&gt;). Download the free CodeWarrior version, open that project and copy the components into the DriverSuite. Then you can use it with Keil as outlined in this article.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 10:48:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/sync-function-hangs-when-using-FATFS-with-SDHC-K70/m-p/237674#M5592</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2014-04-11T10:48:10Z</dc:date>
    </item>
  </channel>
</rss>

