<?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: sdmmc SD_Write()/SD_Read() failed with ATP card in MCUXpresso SDK</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681884#M205</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;no, each of the issues is separate.&lt;/P&gt;&lt;P&gt;The issue concerns sdmmc library bug (I finally solved) in SD_Init() in the file sdmmc/src/fsl_sd.c:&lt;/P&gt;&lt;P&gt;SD_SelectBusTiming() calls SD_SwitchFunction() which sets block size to 64bytes (512bits).&lt;/P&gt;&lt;P&gt;Therefore SD_SetBlockSize(card, FSL_SDMMC_DEFAULT_BLOCK_SIZE) should be called again before SD_Init() exits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;J.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Jul 2017 23:12:47 GMT</pubDate>
    <dc:creator>JohnU</dc:creator>
    <dc:date>2017-07-11T23:12:47Z</dc:date>
    <item>
      <title>sdmmc SD_Write()/SD_Read() failed with ATP card</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681881#M202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I test FSL sdmmc on OM13092 LPCXpresso54608 using sdcard_polling example (SDK 2.2.0).&lt;/P&gt;&lt;P&gt;I have found it fails on SD_Read() / SD_Write() a single 512-byte sector with the microSD card: ATP 512MB Industrial Grade (AF512UDI AML 16020015 161316M83ENM E1606BA).&lt;/P&gt;&lt;P&gt;I've also tried with decreased busClock_Hz to 3MHz and both 4 and 1-bit bus width.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On SD_Write(startBlock=2, blockSize=512, blockCount=1):&lt;/P&gt;&lt;P&gt;SD_WaitWriteComplete() is succressful (R1 response[0]=0x900).&lt;/P&gt;&lt;P&gt;Unfortunately kSDMMC_WriteSingleBlock (CMD24, argument=1024) fails due to SD_Transfer() failure:&lt;/P&gt;&lt;P&gt;- SDIF_WaitCommandDone(): status = 0x84 after SDIF_GetInterruptStatus() (DCRC bit is set). R1 response[0] = 0x20000900 (&lt;SPAN class=""&gt;BLOCK_LEN_ERROR&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On SD_Read(startBlock=2, blockSize=512, blockCount=1):&lt;/P&gt;&lt;P&gt;SD_WaitWriteComplete() is succressful (R1 response[0]=0x900).&lt;/P&gt;&lt;P&gt;Unfortunately kSDMMC_ReadSingleBlock (CMD17, argument=1024) fails due to SD_Transfer() failure:&lt;/P&gt;&lt;P&gt;- SDIF_WaitCommandDone(): status = 0x84 after SDIF_GetInterruptStatus() (DCRC bit is set). R1 response[0] = 0x900 ("success")&lt;/P&gt;&lt;P&gt;- first SDIF_GetInternalDMAStatus() call returns IDSTS=0x122&lt;/P&gt;&lt;P&gt;- SDIF_TransferDataBlocking(): SDIF_GetInternalDMAStatus() returns dmaStatus=0x122 (kSDIF_DMACardErrorSummary, ie. CES bit)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Card data:&lt;/P&gt;&lt;P&gt;RawCid Details:{4261479477, 269648260, 1176524100, 155275329}&lt;/P&gt;&lt;P&gt;RawCsd Details:{373293205, 3988258703, 1532592598, 6160434}&lt;/P&gt;&lt;P&gt;RawScr Details:{36012032, 0}&lt;/P&gt;&lt;P&gt;ocr 0x80ff8000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it known problem?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;J.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 09:02:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681881#M202</guid>
      <dc:creator>JohnU</dc:creator>
      <dc:date>2017-07-03T09:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: sdmmc SD_Write()/SD_Read() failed with ATP card</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681882#M203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When DMA support disabled in fsl_host.c:&lt;/P&gt;&lt;P&gt;SDIF_TransferFunction(): SDIF_TransferBlocking(base, /*&amp;amp;dmaConfig*/NULL, content):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On SD_Write(startBlock=2, blockSize=512, blockCount=1):&lt;/P&gt;&lt;P&gt;SD_Transfer() failure:&lt;/P&gt;&lt;P&gt;- SDIF_WaitCommandDone(): status = &lt;STRONG&gt;0x14&lt;/STRONG&gt; after SDIF_GetInterruptStatus(). R1 response[0] = 0x20000900 (&lt;SPAN class=""&gt;BLOCK_LEN_ERROR&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On SD_Read(startBlock=2, blockSize=512, blockCount=1):&lt;/P&gt;&lt;P&gt;SD_Transfer() failure:&lt;/P&gt;&lt;P&gt;- SDIF_WaitCommandDone(): status =&amp;nbsp;&lt;STRONG&gt;0x24&lt;/STRONG&gt; after SDIF_GetInterruptStatus(). R1 response[0] = 0x900 ("success")&lt;/P&gt;&lt;P&gt;- SDIF_TransferDataBlocking(): SDIF_ReadDataPortBlocking():&lt;/P&gt;&lt;P&gt;via step-by-step debugging:&lt;/P&gt;&lt;P&gt;* first SDIF_GetInterruptStatus() call returns &lt;STRONG&gt;0x420&lt;/STRONG&gt;, SDIF_ReadDataPort() returns transferredWords=0xF&lt;/P&gt;&lt;P&gt;* 2nd SDIF_GetInterruptStatus() call returns &lt;STRONG&gt;0x20&lt;/STRONG&gt;, SDIF_ReadDataPort() returns transferredWords=0x1E&lt;/P&gt;&lt;P&gt;* 3rd SDIF_GetInterruptStatus() call returns &lt;STRONG&gt;0x420&lt;/STRONG&gt;, SDIF_ReadDataPort() returns transferredWords=0x2D&lt;/P&gt;&lt;P&gt;* 4th SDIF_GetInterruptStatus() call returns &lt;STRONG&gt;0x20&lt;/STRONG&gt;, SDIF_ReadDataPort() returns transferredWords=0x3C&lt;/P&gt;&lt;P&gt;* 5th SDIF_GetInterruptStatus() call returns &lt;STRONG&gt;0x420&lt;/STRONG&gt;, SDIF_ReadDataPort() returns transferredWords=0x4B&lt;/P&gt;&lt;P&gt;* 6th SDIF_GetInterruptStatus() call returns &lt;STRONG&gt;0x20&lt;/STRONG&gt;, SDIF_ReadDataPort() returns transferredWords=0x5A&lt;/P&gt;&lt;P&gt;* 7th SDIF_GetInterruptStatus() call returns &lt;STRONG&gt;0x420&lt;/STRONG&gt;, SDIF_ReadDataPort() returns transferredWords=0x69&lt;/P&gt;&lt;P&gt;* 8th SDIF_GetInterruptStatus() call returns &lt;STRONG&gt;0x88&lt;/STRONG&gt;(failed - DCRC, DTO - data transfer over - likely FIFO overflow due to step-by-step debugging)&lt;/P&gt;&lt;P&gt;via breakpoints on error:&lt;/P&gt;&lt;P&gt;* last SDIF_GetInterruptStatus() call returns &lt;STRONG&gt;0x80 (DCRC)&lt;/STRONG&gt;, transferredWords=&lt;STRONG&gt;0x78&lt;/STRONG&gt; (underrun?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;J.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 10:08:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681882#M203</guid>
      <dc:creator>JohnU</dc:creator>
      <dc:date>2017-07-03T10:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: sdmmc SD_Write()/SD_Read() failed with ATP card</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681883#M204</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;I found the below thread: &lt;A href="https://community.nxp.com/thread/454708"&gt;sdmmc hangs on SD_Init()&lt;/A&gt; , is the same issue?&lt;/P&gt;&lt;P&gt;in the thread &lt;A href="https://community.nxp.com/thread/454771"&gt;sdmmc eMMC Decode CID properly&lt;/A&gt; did you find the solution to this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sol&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jul 2017 20:17:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681883#M204</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2017-07-11T20:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: sdmmc SD_Write()/SD_Read() failed with ATP card</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681884#M205</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;no, each of the issues is separate.&lt;/P&gt;&lt;P&gt;The issue concerns sdmmc library bug (I finally solved) in SD_Init() in the file sdmmc/src/fsl_sd.c:&lt;/P&gt;&lt;P&gt;SD_SelectBusTiming() calls SD_SwitchFunction() which sets block size to 64bytes (512bits).&lt;/P&gt;&lt;P&gt;Therefore SD_SetBlockSize(card, FSL_SDMMC_DEFAULT_BLOCK_SIZE) should be called again before SD_Init() exits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;J.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jul 2017 23:12:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681884#M205</guid>
      <dc:creator>JohnU</dc:creator>
      <dc:date>2017-07-11T23:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: sdmmc SD_Write()/SD_Read() failed with ATP card</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681885#M206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for identifying this issue. It fixed the problem i was having accessing an SD card.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't see how this could every have worked as released?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 12:14:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681885#M206</guid>
      <dc:creator>andyjackson</dc:creator>
      <dc:date>2017-08-04T12:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: sdmmc SD_Write()/SD_Read() failed with ATP card</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681886#M207</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;exactly. You can see other issues I found for sdmmc :/&lt;/P&gt;&lt;P&gt;Personally I'd suggest do not use the library for general SD card socket on the moment. It is rather good for embedded dedicated cards or chips like eMMC.&lt;/P&gt;&lt;P&gt;Unfortunately there is no NXP reaction yet. I've not found new version of the library here &lt;A class="link-titled" href="https://github.com/kylemanna/kinetis-sdk2/tree/master/middleware/sdmmc_2.1.2/port/sdhc/freertos" title="https://github.com/kylemanna/kinetis-sdk2/tree/master/middleware/sdmmc_2.1.2/port/sdhc/freertos"&gt;kinetis-sdk2/middleware/sdmmc_2.1.2/port/sdhc/freertos at master · kylemanna/kinetis-sdk2 · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be nice if NXP team reviewed the sdmmc library code against eg. uboot code: &lt;A class="link-titled" href="http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mmc/mmc.c;h=3cdf6a4f3b1370a3a3ec43e39db7a52c3f6cab96;hb=HEAD" title="http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mmc/mmc.c;h=3cdf6a4f3b1370a3a3ec43e39db7a52c3f6cab96;hb=HEAD"&gt;git.denx.de Git - u-boot.git/blob - drivers/mmc/mmc.c&lt;/A&gt; or just Linux kernel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;J.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 12:34:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681886#M207</guid>
      <dc:creator>JohnU</dc:creator>
      <dc:date>2017-08-04T12:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: sdmmc SD_Write()/SD_Read() failed with ATP card</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681887#M208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using the SDK code and also have SDRAM enabled? &amp;nbsp; If so, see this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/931558"&gt;https://community.nxp.com/message/931558&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was getting weird SD card issues/failures. &amp;nbsp; &amp;nbsp;This may solve your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2017 18:31:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681887#M208</guid>
      <dc:creator>Eli_H</dc:creator>
      <dc:date>2017-08-07T18:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: sdmmc SD_Write()/SD_Read() failed with ATP card</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681888#M209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Eli.&lt;/P&gt;&lt;P&gt;Pinmux is set according to the errara. But probably your hint helps others.&lt;/P&gt;&lt;P&gt;Described issue is related to SD specifications, eg. Part 1 Physical Layer, Simplified Specification version 2.00.&lt;/P&gt;&lt;P&gt;Some SD cards works, some not - especially older controllers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;J.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2017 23:41:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/sdmmc-SD-Write-SD-Read-failed-with-ATP-card/m-p/681888#M209</guid>
      <dc:creator>JohnU</dc:creator>
      <dc:date>2017-08-07T23:41:24Z</dc:date>
    </item>
  </channel>
</rss>

