<?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 MicrocontrollersのトピックRe: SDHC Error Recovery</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SDHC-Error-Recovery/m-p/797727#M48520</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mike.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Dec 2018 16:45:07 GMT</pubDate>
    <dc:creator>JHinkle</dc:creator>
    <dc:date>2018-12-25T16:45:07Z</dc:date>
    <item>
      <title>SDHC Error Recovery</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SDHC-Error-Recovery/m-p/797723#M48516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a K64 in a commercial application which uses the SDHC to interface with a micro SD card.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code for reading and writing sectors include several "while" loops waiting for flags to be set in the SDHC controller's register to identify completion of the operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On several SD cards (at customer not at my location) the SDHC code stalls waiting for a completion flag to be set -- which NEVER sets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have installed timout within these "while loop" code sections to break out after 25 millsecs without the flag being set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question -- what is the best/robust error recovery method which will result in completion if run again?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now -- I'm of the mindset the issue is with the SD card since I have replaced the CPU board and the same issue occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current recovery method I have employed is to trap the timeout error at the read/write block functions and force a SDHC initialization again (kick it in the head and do a SDHC reset and initialize the whole system again).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current method seems like an extreme measure because it takes time to perform the initialization process which leads to the customer seeing/hearing the extended time.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm attempting recovery this way since I don't know a better way to correct the operational status of the SDHC or the SD card so the read/write operation can be attempted again and complete without error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any insights or comments - please tell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2018 16:42:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SDHC-Error-Recovery/m-p/797723#M48516</guid>
      <dc:creator>JHinkle</dc:creator>
      <dc:date>2018-12-13T16:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: SDHC Error Recovery</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SDHC-Error-Recovery/m-p/797724#M48517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, sorry for the later reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the MQX file system for SD card demo, which also using timeout to jump out of error issue.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/70797i80EC153F4F399E1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please check attached code for the detailed info of &amp;lt;_io_sdcard_esdhc_read_block&amp;gt; function.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2018 03:35:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SDHC-Error-Recovery/m-p/797724#M48517</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-12-24T03:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: SDHC Error Recovery</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SDHC-Error-Recovery/m-p/797725#M48518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mike.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had implemented code that would reset and re-initialize the SDHC upon "timeout" detection.&amp;nbsp; I was hoping a simpler method was available since the time to initialize is long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2018 17:01:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SDHC-Error-Recovery/m-p/797725#M48518</guid>
      <dc:creator>JHinkle</dc:creator>
      <dc:date>2018-12-24T17:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: SDHC Error Recovery</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SDHC-Error-Recovery/m-p/797726#M48519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also checked the MCUXpresso SDK for K64 about SDCard application, which also using timeout to check error recovery condition. With the SDMMCHOST_TRANSFER_COMPLETE_TIMEOUT macro definition, customer can set the timeout value in Milliseconds.&lt;/P&gt;&lt;P&gt;Source code located at&amp;nbsp; &amp;lt;fsl_sdmmc_host.c&amp;gt; file.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/70942iEE2F3DDBBA88C14D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2018 03:13:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SDHC-Error-Recovery/m-p/797726#M48519</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-12-25T03:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: SDHC Error Recovery</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SDHC-Error-Recovery/m-p/797727#M48520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mike.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2018 16:45:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SDHC-Error-Recovery/m-p/797727#M48520</guid>
      <dc:creator>JHinkle</dc:creator>
      <dc:date>2018-12-25T16:45:07Z</dc:date>
    </item>
  </channel>
</rss>

