<?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>Kinetis Software Development KitのトピックRe: fsl_sdhc_driver Stuck at SDHC_HAL_GetCurState()</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407930#M1763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Audi:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That result is because the SD Card initialization is not finished by the time the task is first launched. If you print the values again then you might receive the expected results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make sure that the SD card is initialized before your task is executed, you can change the initialization sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to Window -&amp;gt; Show View -&amp;gt; Other...-&amp;gt; Processor Expert -&amp;gt; Initialization Sequence. Enable the initialization for the &lt;STRONG&gt;fsl_sdcard&lt;/STRONG&gt; and the &lt;STRONG&gt;OS_Task&lt;/STRONG&gt; components and make sure that the SD card is initialized first:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52419i89B3C8227F847C49/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the correct information will be printed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52453iD3218EC5CE9B6470/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Aug 2015 01:28:34 GMT</pubDate>
    <dc:creator>Jorge_Gonzalez</dc:creator>
    <dc:date>2015-08-12T01:28:34Z</dc:date>
    <item>
      <title>fsl_sdhc_driver Stuck at SDHC_HAL_GetCurState()</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407925#M1758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used Processor Expert in KDS 3.0.0 with KSDK 1.2.0 to create a project for the FRDM-K64F board.&amp;nbsp; I added MQX Standard (I intend to use MFS later), one task, and an fsl_sdcard component.&amp;nbsp; PEx has no errors, and appears to generate its code with no problems.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The one task simply prints a string to the debug console, delays a little bit then repeats.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I debug the program, it will sometimes print the string; but, most often it will hang in the fsl_sdhc_driver. . .&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Wait until last time sdhc send operation complete */&lt;/P&gt;&lt;P&gt;while(!SDHC_HAL_GetCurState(g_sdhcBase[instance], kSdhcHalGetDataLine0Level)){}&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do have a known good SD card inserted.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I have something configured wrong?&amp;nbsp; Project attached.&lt;/P&gt;&lt;P&gt;- Audi&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338740"&gt;transflash_drive.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 16:36:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407925#M1758</guid>
      <dc:creator>audi_mcavoy</dc:creator>
      <dc:date>2015-08-03T16:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_sdhc_driver Stuck at SDHC_HAL_GetCurState()</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407926#M1759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Audi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please insert your SD card into your board.&lt;/P&gt;&lt;P&gt;I have test your project on my side after i insert one SD card, it can work well , please see the&amp;nbsp; result :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54461i9CEC7AA0A619F4D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice&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>Wed, 05 Aug 2015 07:33:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407926#M1759</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-08-05T07:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_sdhc_driver Stuck at SDHC_HAL_GetCurState()</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407927#M1760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Were you able to repeat that success?&amp;nbsp; Because I have seen it work on rare occasion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I've tried the same thing on my custom board with a K64 processor and a real SD card on it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It gets stuck at the same place. . .&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;while(!SDHC_HAL_GetCurState(g_sdhcBase[instance], kSdhcHalGetDataLine0Level)){}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what else to try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 17:47:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407927#M1760</guid>
      <dc:creator>audi_mcavoy</dc:creator>
      <dc:date>2015-08-10T17:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_sdhc_driver Stuck at SDHC_HAL_GetCurState()</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407928#M1761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Audi McAvoy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you are just missing to enable the Pull-ups and High-drive strength features for the SDHC pins. You can do this with a &lt;STRONG&gt;Init_PORT&lt;/STRONG&gt; component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try with the attached project.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards!,&lt;BR /&gt;Jorge Gonzalez&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, 10 Aug 2015 22:58:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407928#M1761</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-08-10T22:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_sdhc_driver Stuck at SDHC_HAL_GetCurState()</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407929#M1762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&amp;nbsp; thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are getting closer to having a functional memory card.&amp;nbsp; Your fix did allow the &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;fsl_sdhc_driver to finish initializing.&amp;nbsp; (I am going to insert a micro-rant here: Why doesn't the fsl_sdcard or the fsl_sdhc component configure the port to actually work?!&amp;nbsp; Arghh!)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;As I was saying, we are getting closer.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;When I add the following two lines before the while() loop in os_tasks.c . . .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; printf("Block Size: %d\r\n", (uint16_t)memoryCard1_state.blockSize);&lt;/P&gt;&lt;P&gt;&amp;nbsp; printf("Clock Speed: %d MHz, %d MHz max\r\n", (int)(memoryCard1_state.host-&amp;gt;clock / 1000000), (int)(memoryCard1_state.host-&amp;gt;maxClock / 1000000));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the following output. . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Block Size: 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; Clock Speed: 0 MHz, 48 MHz max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know the block size should be 512.&amp;nbsp; I expect the clock speed to be something greater than 0MHz.&amp;nbsp; So the driver has finished initializing; but, the card is unusable.&amp;nbsp; I am using a FAT formatted 2GB Transcend microSD card.&amp;nbsp; I'm confident the card is good because it works with some of the demo apps provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should I try next?&lt;/P&gt;&lt;P&gt;- Audi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: I applied your fix to my custom board running a K64 with a real 1GB SD card on it, and it works.&amp;nbsp; The card appears to be fully functional.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 16:35:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407929#M1762</guid>
      <dc:creator>audi_mcavoy</dc:creator>
      <dc:date>2015-08-11T16:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_sdhc_driver Stuck at SDHC_HAL_GetCurState()</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407930#M1763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Audi:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That result is because the SD Card initialization is not finished by the time the task is first launched. If you print the values again then you might receive the expected results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make sure that the SD card is initialized before your task is executed, you can change the initialization sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to Window -&amp;gt; Show View -&amp;gt; Other...-&amp;gt; Processor Expert -&amp;gt; Initialization Sequence. Enable the initialization for the &lt;STRONG&gt;fsl_sdcard&lt;/STRONG&gt; and the &lt;STRONG&gt;OS_Task&lt;/STRONG&gt; components and make sure that the SD card is initialized first:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52419i89B3C8227F847C49/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the correct information will be printed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52453iD3218EC5CE9B6470/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 01:28:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407930#M1763</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-08-12T01:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_sdhc_driver Stuck at SDHC_HAL_GetCurState()</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407931#M1764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, that did it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I &lt;EM&gt;really&lt;/EM&gt; appreciate your help.&amp;nbsp; I marked both of your replies as helpful.&amp;nbsp; I wish I could mark them both as correct, because we really need to implement both to guarantee that the SD card works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is so much of this kind of information that can't be learned by opening an example project.&amp;nbsp; I've seen a few "how to" posts that show each step with explanations along the way -- I find those the most helpful.&amp;nbsp; Ideally, there would be a post like that for every component in the PEx components library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&amp;nbsp; Now I can go be productful.&lt;/P&gt;&lt;P&gt;- Audi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 13:30:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/fsl-sdhc-driver-Stuck-at-SDHC-HAL-GetCurState/m-p/407931#M1764</guid>
      <dc:creator>audi_mcavoy</dc:creator>
      <dc:date>2015-08-13T13:30:47Z</dc:date>
    </item>
  </channel>
</rss>

