<?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: SD\MMC issue in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SD-MMC-issue/m-p/521786#M4422</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by drs on Thu Sep 27 14:53:31 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The SD\MMC can be used along with external SDRAM. The Hitex board is designed to support his.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On that board the sdio_clk signal comes out on PC_0 which is not muxed with any of the EMC clocks so you should be fine. Of course you will need to configure the function of this pin to be the SDIO_CLK.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:38:09 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:38:09Z</dc:date>
    <item>
      <title>SD\MMC issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SD-MMC-issue/m-p/521785#M4421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mirfan on Mon Sep 24 05:49:52 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I received a Hitex LPC4350 Eval board. I am currently porting SD\MMC driver using my own state machine so I am not using the driver from the LPC driver library. The issue i am having right now is that the command phase of SD\MMC card initialization completes without a hitch, but as soon as I make a data transaction over DMA, it generates a Data CRC error. Even if I do get a DMA transaction, the received data is invalid. One thing that I doubt to be the culprit is the SD clock source multiplexing. The SD clock is multiplexed with EMC controller clocks for external SDRAM. So, can SD\MMC be used along with external SDRAM? (I am currently running my image from external SDRAM)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:38:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SD-MMC-issue/m-p/521785#M4421</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: SD\MMC issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SD-MMC-issue/m-p/521786#M4422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by drs on Thu Sep 27 14:53:31 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The SD\MMC can be used along with external SDRAM. The Hitex board is designed to support his.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On that board the sdio_clk signal comes out on PC_0 which is not muxed with any of the EMC clocks so you should be fine. Of course you will need to configure the function of this pin to be the SDIO_CLK.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:38:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SD-MMC-issue/m-p/521786#M4422</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: SD\MMC issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SD-MMC-issue/m-p/521787#M4423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quote:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;On that board the sdio_clk signal comes out on PC_0 which is not muxed with any of the EMC clocks so you should be fine. Of course you will need to configure the function of this pin to be the SDIO_CLK.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a similar setup with a LPC4337, external SDRAM (EMC) and SD card and need clarification regarding the CLK configuration:&lt;/P&gt;&lt;P&gt;Per UM10503:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;All four EMC_CLK clock signals must be configured for all SDRAM devices&lt;/P&gt;&lt;P&gt;independently of their size by selecting the EMC_CLK function and enabling the input&lt;/P&gt;&lt;P&gt;buffer (EZI = 1) in all four SFSCLKn registers in the SCU.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14692036237815187 jive_text_macro" data-renderedposition="348_8_1168_80" jivemacro_uid="_14692036237815187"&gt;&lt;P&gt;Chip_SCU_PinMuxSet( 6, 11, (SCU_PINIO_FAST | SCU_MODE_FUNC3));&amp;nbsp; // CKEOUT0&lt;/P&gt;&lt;P&gt;Chip_SCU_ClockPinMuxSet(0, (SCU_PINIO_FAST | SCU_MODE_FUNC0));&amp;nbsp; // CLK0 connected to EMC_CLK0&lt;/P&gt;&lt;P&gt;Chip_SCU_ClockPinMuxSet(1, (SCU_PINIO_FAST | SCU_MODE_FUNC0));&amp;nbsp; // CLK1 connected to EMC_CLK1&lt;/P&gt;&lt;P&gt;Chip_SCU_ClockPinMuxSet(2, (SCU_PINIO_FAST | SCU_MODE_FUNC0));&amp;nbsp; // CLK2 connected to EMC_CLK3&lt;/P&gt;&lt;P&gt;Chip_SCU_ClockPinMuxSet(3, (SCU_PINIO_FAST | SCU_MODE_FUNC0));&amp;nbsp; // CLK3 connected to EMC_CLK2&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My SD Card configuration based on the SDMMC example and board.c:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1469203698520591 jive_text_macro" data-renderedposition="480_8_1168_176" jivemacro_uid="_1469203698520591" modifiedtitle="true"&gt;&lt;P&gt;void board_SDMMC_init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 4, SDIO_DAT_PINCFG); /* PC_4 connected to SDIO_D0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 5, SDIO_DAT_PINCFG); /* PC_5 connected to SDIO_D1 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 6, SDIO_DAT_PINCFG); /* PC_6 connected to SDIO_D2 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 7, SDIO_DAT_PINCFG); /* PC_7 connected to SDIO_D3 */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 0, (SCU_PINIO_FAST_CLK | SCU_MODE_FUNC7)); // CKEOUT0&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_ClockPinMuxSet(2, (SCU_PINIO_FAST | SCU_MODE_FUNC4)); // CLK2 connected to SDIO_CLK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 10, SDIO_DAT_PINCFG); /* PC_10 connected to SDIO_CMD */&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 8, (SCU_MODE_INBUFF_EN | SCU_MODE_FUNC7)); /* PC_8 connected to SDIO_CD */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't work, as&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14692040354776030 jive_macro_code jive_text_macro" data-renderedposition="708_8_1168_16" jivemacro_uid="_14692040354776030"&gt;&lt;P&gt;Chip_SCU_ClockPinMuxSet(2, (SCU_PINIO_FAST | SCU_MODE_FUNC4));&amp;nbsp; // CLK2 connected to SDIO_CLK&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;takes CLK2 away from EMC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this does work fine:&lt;/P&gt;&lt;P&gt;void board_SDMMC_init(void)&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14692041061826498 jive_text_macro" data-renderedposition="828_8_1168_176" jivemacro_uid="_14692041061826498" modifiedtitle="true"&gt;&lt;P&gt;void board_SDMMC_init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 4, SDIO_DAT_PINCFG); /* PC_4 connected to SDIO_D0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 5, SDIO_DAT_PINCFG); /* PC_5 connected to SDIO_D1 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 6, SDIO_DAT_PINCFG); /* PC_6 connected to SDIO_D2 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 7, SDIO_DAT_PINCFG); /* PC_7 connected to SDIO_D3 */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 0, (SCU_PINIO_FAST_CLK | SCU_MODE_FUNC7)); // CKEOUT0&lt;/P&gt;&lt;P&gt;// Chip_SCU_ClockPinMuxSet(2, (SCU_PINIO_FAST | SCU_MODE_FUNC4)); // CLK2 connected to SDIO_CLK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 10, SDIO_DAT_PINCFG); /* PC_10 connected to SDIO_CMD */&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chip_SCU_PinMuxSet(0xC, 8, (SCU_MODE_INBUFF_EN | SCU_MODE_FUNC7)); /* PC_8 connected to SDIO_CD */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question... is this OK? Don't I need to ClockPinMux the clock signal to SD_CLK? Is it enough to assign the SD_CLK FUNC to PC_0?&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>Fri, 22 Jul 2016 16:17:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SD-MMC-issue/m-p/521787#M4423</guid>
      <dc:creator>zzzmqp</dc:creator>
      <dc:date>2016-07-22T16:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: SD\MMC issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SD-MMC-issue/m-p/521788#M4424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;bump&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2016 14:31:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SD-MMC-issue/m-p/521788#M4424</guid>
      <dc:creator>zzzmqp</dc:creator>
      <dc:date>2016-08-16T14:31:34Z</dc:date>
    </item>
  </channel>
</rss>

