<?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>MCUXpresso SDKのトピックRe: How to handle SD card eject &amp; reinsert?</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031454#M2207</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I think I found and resolved my issue.&amp;nbsp; It appears that the SDK is missing some functionality, specifically for managing the Card Detect of a MicroSD card.&amp;nbsp;&amp;nbsp;&amp;nbsp; I am using a MicroSD card in an adapter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the following thread for details: &lt;A _jive_internal="true" href="https://community.nxp.com/message/1272833?commentID=1272833#comment-1272833"&gt;https://community.nxp.com/message/1272833?commentID=1272833#comment-1272833&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, I had to add the function to turn off the DAT3 pull-up for card detect.&amp;nbsp; That is why it was failing on reinsert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After adding this, the card can be reliably read again after reinsert!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Feb 2020 18:20:42 GMT</pubDate>
    <dc:creator>jackking</dc:creator>
    <dc:date>2020-02-28T18:20:42Z</dc:date>
    <item>
      <title>How to handle SD card eject &amp; reinsert?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031449#M2202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the IMXRT1062 and testing the SDK examples for FatFS SDcard.&amp;nbsp; It seems that when the card is ejected and reinserted, FatFS can no longer read any files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried unmounting the disk on ejection using f_mount(0, "", 0)&lt;/P&gt;&lt;P&gt;I also tried SD_HostDeinit() on eject and then reinit on insertion, but these don't seem to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SDK example doesn't seem to handle reinsertion at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the correct way to handle eject/insert of the SDcard while the MCU is running?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Feb 2020 15:33:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031449#M2202</guid>
      <dc:creator>jackking</dc:creator>
      <dc:date>2020-02-02T15:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle SD card eject &amp; reinsert?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031450#M2203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still banging my head on this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully someone has dealt with this same issue?&amp;nbsp; I would assume it is a really common requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 02:23:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031450#M2203</guid>
      <dc:creator>jackking</dc:creator>
      <dc:date>2020-02-14T02:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle SD card eject &amp; reinsert?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031451#M2204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;I made a demo base on the example evkmimxrt1060_fatfs_usdcard. It seems you don't need to do anything after desert.&amp;nbsp; The files in SD card is created by original fatfs_usdcard project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 10:04:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031451#M2204</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2020-02-14T10:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle SD card eject &amp; reinsert?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031452#M2205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My test case is a little different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see in your example you did not MKFS and create the files on first insertion, assuming they were created some other time:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="local_workspace_-_evkmimxrt1060_fatfs_usdcard_source_fatfs_sdcard_c_-_MCUXpresso_IDE.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/100019iF157568E32DB231C/image-size/large?v=v2&amp;amp;px=999" role="button" title="local_workspace_-_evkmimxrt1060_fatfs_usdcard_source_fatfs_sdcard_c_-_MCUXpresso_IDE.jpg" alt="local_workspace_-_evkmimxrt1060_fatfs_usdcard_source_fatfs_sdcard_c_-_MCUXpresso_IDE.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my example I create the filesystem and files on first insertion each time and then the reinsert fails.&lt;/P&gt;&lt;P&gt;I have modified your example and tested, here is the output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="local_workspace_-_evkmimxrt1060_fatfs_usdcard_source_fatfs_sdcard_c_-_MCUXpresso_IDE.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/99985iFE65157ECE9BA4B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="local_workspace_-_evkmimxrt1060_fatfs_usdcard_source_fatfs_sdcard_c_-_MCUXpresso_IDE.jpg" alt="local_workspace_-_evkmimxrt1060_fatfs_usdcard_source_fatfs_sdcard_c_-_MCUXpresso_IDE.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the modified project, which I also changed to use semihosting with a J-Link, linked to RAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Feb 2020 16:11:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031452#M2205</guid>
      <dc:creator>jackking</dc:creator>
      <dc:date>2020-02-15T16:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle SD card eject &amp; reinsert?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031453#M2206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It is strange. You code works fine on my board.&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/91769iA7C40B25CE5C87C8/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;Can you try another card?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2020 07:08:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031453#M2206</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2020-02-25T07:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle SD card eject &amp; reinsert?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031454#M2207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I think I found and resolved my issue.&amp;nbsp; It appears that the SDK is missing some functionality, specifically for managing the Card Detect of a MicroSD card.&amp;nbsp;&amp;nbsp;&amp;nbsp; I am using a MicroSD card in an adapter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the following thread for details: &lt;A _jive_internal="true" href="https://community.nxp.com/message/1272833?commentID=1272833#comment-1272833"&gt;https://community.nxp.com/message/1272833?commentID=1272833#comment-1272833&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, I had to add the function to turn off the DAT3 pull-up for card detect.&amp;nbsp; That is why it was failing on reinsert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After adding this, the card can be reliably read again after reinsert!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2020 18:20:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/How-to-handle-SD-card-eject-reinsert/m-p/1031454#M2207</guid>
      <dc:creator>jackking</dc:creator>
      <dc:date>2020-02-28T18:20:42Z</dc:date>
    </item>
  </channel>
</rss>

