<?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: SdCard with MCI interface from LPCopen</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521799#M4435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by schisanoa on Tue Jul 29 05:54:18 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Example: periph_sdmmc&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;start debug, with break on: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"rc = f_open(&amp;amp;fileObj, "MESSAGE.TXT", FA_READ);"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(about line 229)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if I step over this line with lpcXpresso it return: FR_NOT_READY (hex code:0x03) and on the console I receive this message: "Card Acquire failed..."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if I step in when I am in the function Chip_SDMMC_Acquire(LPC_SDC_T *pSDC, SDMMC_CARD_T *pCardInfo), at this line: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Ret = sendAppOpCond(pSDC, 0, true, &amp;amp;OCR, &amp;amp;CCS);" &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I notice that "CCS" is a random number instead of a bool. So, stepping into this last function you will be in "sendAppOpCond(LPC_SDC_T *pSDC, uint16_t rca, bool hcs, uint32_t *pOcr, bool *pCCS)", &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Ret = executeCmd(pSDC, SD_ACMD41_SD_SEND_OP_COND, Argument, &amp;amp;Response);" &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Response.Data[0] never match with "CMDRESP_R3_INIT_COMPLETE".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I discovered until now, but may also be something else that I have not discovered yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank for your support.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS, I think that you should have the same problem also with a different hardware&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:36:35 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:36:35Z</dc:date>
    <item>
      <title>SdCard with MCI interface from LPCopen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521795#M4431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by schisanoa on Tue Jul 29 00:35:06 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working with a LPC4088, with the embedded artist LPC4088 DEVELOPER'S KIT(OEM + BASE board) and I can't get working the SDMMC example. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried both Periph_SDMMC and App_SdMmc_Meas example(both provided from the LpcOpen 2.10 package for LPC4088) but the example code not work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the LpcXpresso 7.2 and 7.3 on MAC laptop(but I also tried with Windows PC), with the Red Probe + debugger. It seem's that the interrupt is not working, but I'm not sure about this. However, yesterday I tried the IAR EW ARM, with a j-link lite, the same development board and the LPCOpen 2.10 example for IAR/KEIL and the same example code is now working. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After this test I have reconnected the LpcXpresso with RedProb+(without disconnect power supply) and the code is working also with the lpcxpresso tool now, but only until I cycle power. If I switch off, and On the power the LpcXpresso example code stop working. It work again only if I connect and start debug with the IAR tool before switch to the LPCXpresso, but I can't do that because I can't use the IAR anymore.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could someone try the lpcOpen periph_sdmmmc example with ea development board+lpcxpresso+codered(or lpc link) debugger and tell me if it work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:36:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521795#M4431</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: SdCard with MCI interface from LPCopen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521796#M4432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Tue Jul 29 03:09:20 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't currently have access to a board to test this, but I suspect that this is an optimisation issue related to a delay loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso 7.2.0 and later build at -Og by default for debug builds. And looking in the source code for these examples, Chip_SDC_Init() in lpc_chip_40xx\src\sdc_17xx_40xx.c is using a simple 'for' loop as a delay - where the variable 'i' used for the delay is not declared as volatile.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspect therefore that the loop is simply not "long" enough (or is getting removed completely) when compiling with optimisation. I'll flag this to our LPCOpen team.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the meantime, try making 'i' volatile, or even just change the optimisation level to -O0 for this file (or the whole project). Please then post back as to whether this gets the examples working for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For more information visit:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Ffaq%2Flpcxpresso%2Foptimize-for-debug" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/faq/lpcxpresso/optimize-for-debug&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Ffaq%2Flpcxpresso%2Fcompiler-optimization" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/faq/lpcxpresso/compiler-optimization&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso Support&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:36:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521796#M4432</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: SdCard with MCI interface from LPCopen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521797#M4433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by schisanoa on Tue Jul 29 03:34:20 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried both the 2 solution you suggested but nothing changes, the example is still not working. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the strange thing is that if I start debug one time with the IAR EW ARM, if I don't disconnect the power I can connect the RedProbe+ with LpcXpresso, build the project and it works, only until I Power Off the board.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ale&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:36:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521797#M4433</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: SdCard with MCI interface from LPCopen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521798#M4434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Tue Jul 29 05:12:41 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to track down a board so that I can try this out. In the meantime, can you clarify in what way the example does not work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso Support&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:36:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521798#M4434</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: SdCard with MCI interface from LPCopen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521799#M4435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by schisanoa on Tue Jul 29 05:54:18 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Example: periph_sdmmc&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;start debug, with break on: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"rc = f_open(&amp;amp;fileObj, "MESSAGE.TXT", FA_READ);"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(about line 229)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if I step over this line with lpcXpresso it return: FR_NOT_READY (hex code:0x03) and on the console I receive this message: "Card Acquire failed..."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if I step in when I am in the function Chip_SDMMC_Acquire(LPC_SDC_T *pSDC, SDMMC_CARD_T *pCardInfo), at this line: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Ret = sendAppOpCond(pSDC, 0, true, &amp;amp;OCR, &amp;amp;CCS);" &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I notice that "CCS" is a random number instead of a bool. So, stepping into this last function you will be in "sendAppOpCond(LPC_SDC_T *pSDC, uint16_t rca, bool hcs, uint32_t *pOcr, bool *pCCS)", &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Ret = executeCmd(pSDC, SD_ACMD41_SD_SEND_OP_COND, Argument, &amp;amp;Response);" &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Response.Data[0] never match with "CMDRESP_R3_INIT_COMPLETE".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I discovered until now, but may also be something else that I have not discovered yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank for your support.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS, I think that you should have the same problem also with a different hardware&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:36:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521799#M4435</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: SdCard with MCI interface from LPCopen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521800#M4436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by NXP_Support on Tue Jul 29 10:42:00 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a fix in a forthcoming version of LPCOpen software for these boards that might resolve this issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It was discovered that the MCIPWRAL bit in the SCS (System Controls and Status register) powers up with random polarity.&amp;nbsp; The result being that the polarity of the SD_PWR output becomes inverted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The MCIPWRAL bit needs to be explicitly cleared to force active low polarity of SD_PWR on these boards.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached are the following updated files containing the fix:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;software/lpc_core/lpc_board/boards_17xx/ea_devkit_4088/board.c&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;software/lpc_core/lpc_chip/chip_17xx_40xx/sdc_17xx_40xx.c&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;software/lpc_core/lpc_chip/chip_17xx_40xx/sdc_17xx_40xx.h&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:36:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521800#M4436</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: SdCard with MCI interface from LPCopen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521801#M4437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by schisanoa on Wed Jul 30 05:32:57 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;OK, Now it works!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the support.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:36:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SdCard-with-MCI-interface-from-LPCopen/m-p/521801#M4437</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:36:36Z</dc:date>
    </item>
  </channel>
</rss>

