<?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: LPC1837 SD card again plug in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1837-SD-card-again-plug/m-p/688447#M27768</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jan,&lt;/P&gt;&lt;P&gt;Yeah, that's you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;I just get this community question two days ago.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Ok, if your problem is solved in the case, please help me to mark the correct answer to close this question.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thank you!&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&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>Wed, 19 Jul 2017 02:17:38 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2017-07-19T02:17:38Z</dc:date>
    <item>
      <title>LPC1837 SD card again plug</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1837-SD-card-again-plug/m-p/688444#M27765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;can me help somebody, please?I have a problem with LPC 1837 with example &lt;EM&gt;periph_sdmmc.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I use settings/files this project&amp;nbsp;in my program. I take a card outside from adapter&amp;nbsp;and then I put card again into adapter. The program doesn't write anything&amp;nbsp;on sd card after new inserting. I try to call the function &lt;EM&gt;App_SDMMC_Init&lt;/EM&gt; and &lt;EM&gt;fmount&lt;/EM&gt; after insert the card, but the problem is the same...&lt;/P&gt;&lt;P&gt;What I have to do&amp;nbsp;to processor reads the card again?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read the comment, that&amp;nbsp;I have to restart the processor. But it isn't possible....&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 14:27:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1837-SD-card-again-plug/m-p/688444#M27765</guid>
      <dc:creator>phateee</dc:creator>
      <dc:date>2017-05-22T14:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1837 SD card again plug</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1837-SD-card-again-plug/m-p/688445#M27766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; About this question, I meet a customer who have the same question as you in the last month, after he follow my step, he made the SD card reinsert work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Now, I post my answer directly:&lt;/P&gt;&lt;P&gt;I already make the reinsert SD card works on my side now.&lt;BR /&gt;Two points need to do the modification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. sdmmc.c , main function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Folder: lpcopen_3_01_keil_iar_nxp_lpcxpresso_1837\LPC43xx_18xx\examples_43xx_18xx\periph_sdmmc\src&lt;BR /&gt;After you take off the SD card, you need to do the reinitialization again.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_DisableIRQ(SDIO_IRQn);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_Clock_Disable(CLK_MX_SDIO);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_SDIF_DeInit(LPC_SDMMC);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; App_SDMMC_Init();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_EnableIRQ(SDIO_IRQn);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. fs_mci.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Folder:lpcopen_3_01_keil_iar_nxp_lpcxpresso_1837\filesystems\fatfslpc&lt;BR /&gt;The disk_initialize can be modified like this:&lt;BR /&gt;DSTATUS disk_initialize(BYTE drv)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;if (drv) {&lt;BR /&gt;&amp;nbsp; return STA_NOINIT;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Supports only single drive */&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;/* if (Stat &amp;amp; STA_NODISK) return Stat; *//* No card in the socket */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stat = STA_NOINIT;&amp;nbsp; // jjadd, do the FSMCI_Cardinit each time.&lt;BR /&gt;&amp;nbsp;if (Stat != STA_NOINIT) {&lt;BR /&gt;&amp;nbsp; return Stat;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;#if !_FS_READONLY&lt;BR /&gt;&amp;nbsp;FSMCI_InitRealTimeClock();&lt;BR /&gt;&amp;nbsp;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;/* Initialize the Card Data Strucutre */&lt;BR /&gt;&amp;nbsp;hCard = FSMCI_CardInit();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;/* Reset */&lt;BR /&gt;&amp;nbsp;Stat = STA_NOINIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;FSMCI_CardInsertWait(hCard); /* Wait for card to be inserted */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;/* Enumerate the card once detected. Note this function may block for a little while. */&lt;BR /&gt;&amp;nbsp;if (!FSMCI_CardAcquire(hCard)) {&lt;BR /&gt;&amp;nbsp; DEBUGOUT("Card Acquire failed...\r\n");&lt;BR /&gt;&amp;nbsp; return Stat;&lt;BR /&gt;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;Stat &amp;amp;= ~STA_NOINIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;return Stat;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also attached these two file.&lt;BR /&gt;My code function is:&lt;BR /&gt;1. after reset, the code will read the MESSAGE.TXT which already in the SD card before insert it, and read the content in the MESSAGE.TXT.&lt;BR /&gt;2. wait the uart char input from the uart.&lt;BR /&gt;I use the LPCXpresso LPC18S37 board on board virtual com port.&lt;BR /&gt;After input the char, the code will do the reintialization again.&lt;BR /&gt;3. I test the code by take off the SD card, and insert it again, then input the char, the code will printf:&lt;BR /&gt;1Opening jjHello.TXT from SD Card...Done.&lt;BR /&gt;Opening jjHello1.TXT from SD Card...Done.&lt;BR /&gt;It means I can create jjhello.txt, and jjhello1.txt file in the SD card.&lt;BR /&gt;After delete all the file in the SD card, and test it again, I find even I take off the sd card, and insert it again, I can work successfully, no error happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On you side, I think you can detect the SD card insert pin, if you get the SD card has been take off, you can do the SD card reintialization again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More details, please check my attached .c file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;BR /&gt;If you still have question, please let me know!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&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, 17 Jul 2017 07:41:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1837-SD-card-again-plug/m-p/688445#M27766</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-07-17T07:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1837 SD card again plug</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1837-SD-card-again-plug/m-p/688446#M27767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you, I know, I made a case by nxp:smileyhappy: &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 10:23:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1837-SD-card-again-plug/m-p/688446#M27767</guid>
      <dc:creator>phateee</dc:creator>
      <dc:date>2017-07-18T10:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1837 SD card again plug</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1837-SD-card-again-plug/m-p/688447#M27768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jan,&lt;/P&gt;&lt;P&gt;Yeah, that's you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;I just get this community question two days ago.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Ok, if your problem is solved in the case, please help me to mark the correct answer to close this question.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thank you!&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&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>Wed, 19 Jul 2017 02:17:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1837-SD-card-again-plug/m-p/688447#M27768</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-07-19T02:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1837 SD card again plug</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1837-SD-card-again-plug/m-p/688448#M27769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I will do it next time...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2017 07:52:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1837-SD-card-again-plug/m-p/688448#M27769</guid>
      <dc:creator>phateee</dc:creator>
      <dc:date>2017-07-25T07:52:08Z</dc:date>
    </item>
  </channel>
</rss>

