<?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>LPC MicrocontrollersのトピックRe: SD card write and read issues</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SD-card-write-and-read-issues/m-p/628145#M24697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neither LPC176x nor LPC1313 has the true SD interface but uses SSP and 1-bit mode for SD card access, so CPU speed&amp;nbsp;and SSP&amp;nbsp;clock setting is important. LPC13xx is slower than LPC17xx, you need to adjust the SSP and CPU clock&lt;/P&gt;&lt;P&gt;accordingly. Make sure SD_ReadConfiguration works all the time first with the card you are testing, if you can't read CID and CSD info of the card, therre is no need to try SD_ReadSector/SD_WriteSector.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure your CPU speed is maximum and two phases of the SSP&amp;nbsp;clock are no more than 400KHz and 25MHz respectively, then try to lower the SSP clock gradually see if you can read/write the card or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Apr 2017 23:04:22 GMT</pubDate>
    <dc:creator>Dezheng_Tang</dc:creator>
    <dc:date>2017-04-20T23:04:22Z</dc:date>
    <item>
      <title>SD card write and read issues</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SD-card-write-and-read-issues/m-p/628144#M24696</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 have modified the SD card example project (AN10916) for FAT32 file system that was available for LPC1700 controller. I am using the LPC1313 controller. I am seeing the below issues:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am able to initialize the SD card properly and read the configuration.&lt;/P&gt;&lt;P&gt;However, if I try to read using the&amp;nbsp;SD_ReadSector() function, after reading the configuration, then it fails most of the times. The card doesn't indicate that it is ready (DI signal is High) &amp;nbsp;using the SD_WaitForReady() function.&lt;/P&gt;&lt;P&gt;However, if I read from the card without reading the configuration first, then the read seems to pass properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The write function SD_WriteSector() always indicates a failure. However, when I try to read from the sector to which I have tried to write, I see that the data is being written.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what may be the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Prachi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Apr 2017 10:29:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SD-card-write-and-read-issues/m-p/628144#M24696</guid>
      <dc:creator>prachipanse</dc:creator>
      <dc:date>2017-04-20T10:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: SD card write and read issues</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SD-card-write-and-read-issues/m-p/628145#M24697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neither LPC176x nor LPC1313 has the true SD interface but uses SSP and 1-bit mode for SD card access, so CPU speed&amp;nbsp;and SSP&amp;nbsp;clock setting is important. LPC13xx is slower than LPC17xx, you need to adjust the SSP and CPU clock&lt;/P&gt;&lt;P&gt;accordingly. Make sure SD_ReadConfiguration works all the time first with the card you are testing, if you can't read CID and CSD info of the card, therre is no need to try SD_ReadSector/SD_WriteSector.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure your CPU speed is maximum and two phases of the SSP&amp;nbsp;clock are no more than 400KHz and 25MHz respectively, then try to lower the SSP clock gradually see if you can read/write the card or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Apr 2017 23:04:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SD-card-write-and-read-issues/m-p/628145#M24697</guid>
      <dc:creator>Dezheng_Tang</dc:creator>
      <dc:date>2017-04-20T23:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: SD card write and read issues</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SD-card-write-and-read-issues/m-p/628146#M24698</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;Thank you for your response. When I run the SD_ReadConfiguration() function in a loop after a successful SD_initialization, the function seems to pass alternately. If do not execute the SD_STATUS (command 13), then the function passes successfully each time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the SD_SendCommand() function, once the 6 byte command is send, then the response from the SD card is checked. It says, "The command response time (Ncr) is 0 to 8 bytes for SDC, 1 to 8 bytes for MMC." Is this as per the SD standard? I seem to be able to receive the command in 0 to 10 bytes. Also, I get the response after the introduction of some delay after the command is send.&lt;/P&gt;&lt;P&gt;What may be the issue in this case?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prachi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2017 04:05:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SD-card-write-and-read-issues/m-p/628146#M24698</guid>
      <dc:creator>prachipanse</dc:creator>
      <dc:date>2017-04-24T04:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: SD card write and read issues</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SD-card-write-and-read-issues/m-p/628147#M24699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to add another point. The&amp;nbsp;SD_STATUS register is always read as 0 when I read the configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prachi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2017 08:31:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SD-card-write-and-read-issues/m-p/628147#M24699</guid>
      <dc:creator>prachipanse</dc:creator>
      <dc:date>2017-04-24T08:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: SD card write and read issues</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SD-card-write-and-read-issues/m-p/628148#M24700</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 found out the above issues were seen because the timer value was not accurately set. With that correction, the issue is resolved using NCR value of 8 itself.&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2017 03:54:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SD-card-write-and-read-issues/m-p/628148#M24700</guid>
      <dc:creator>prachipanse</dc:creator>
      <dc:date>2017-05-18T03:54:59Z</dc:date>
    </item>
  </channel>
</rss>

