<?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 SAI Demo Program mis-detected SD Card in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/SAI-Demo-Program-mis-detected-SD-Card/m-p/1043627#M3354</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm experimenting with the sai demo application (sai.c) on a FRDM-K66F eval board. If I execute the program with no SD card inserted, the program falsely detects an SD card and launches in an SD card init, which obviously fails. Here's the output of the application:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;[MCUXpresso Semihosting Telnet console for 'frdmk66f_sai LinkServer Debug' started on port 55837 @ 127.0.0.1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;SAI Demo started!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;Please insert a card into board.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-family: terminal, monaco, monospace;"&gt;Card inserted. &amp;nbsp; &amp;lt;--- ACTUALLY NO CARD IS PHYSICALLY PRESENT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;Make file system......The time may be long if the card capacity is big.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;Make file system failed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;SDCARD init failed ! &amp;nbsp;&amp;lt;--- NOT SURPRISING BECAUSE NO CARD IS PRESENT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;Please choose the option :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;1. Record and playback at same time&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;2. Playback sine wave&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;3. Record to SDcard, after record playback it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;4. Quit&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: terminal, monaco, monospace; "&gt;Has anyone seen this behaviour? I've tested with 2 separate eval board, same behaviour.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: terminal, monaco, monospace; "&gt;SDK: 2.7.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: terminal, monaco, monospace; "&gt;IDE: 11.1.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: terminal, monaco, monospace; "&gt;Thanks for any tips.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: terminal, monaco, monospace; "&gt;Scott&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 May 2020 22:14:57 GMT</pubDate>
    <dc:creator>scott1</dc:creator>
    <dc:date>2020-05-05T22:14:57Z</dc:date>
    <item>
      <title>SAI Demo Program mis-detected SD Card</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SAI-Demo-Program-mis-detected-SD-Card/m-p/1043627#M3354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm experimenting with the sai demo application (sai.c) on a FRDM-K66F eval board. If I execute the program with no SD card inserted, the program falsely detects an SD card and launches in an SD card init, which obviously fails. Here's the output of the application:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;[MCUXpresso Semihosting Telnet console for 'frdmk66f_sai LinkServer Debug' started on port 55837 @ 127.0.0.1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;SAI Demo started!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;Please insert a card into board.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-family: terminal, monaco, monospace;"&gt;Card inserted. &amp;nbsp; &amp;lt;--- ACTUALLY NO CARD IS PHYSICALLY PRESENT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;Make file system......The time may be long if the card capacity is big.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;Make file system failed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;SDCARD init failed ! &amp;nbsp;&amp;lt;--- NOT SURPRISING BECAUSE NO CARD IS PRESENT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;Please choose the option :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;1. Record and playback at same time&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;2. Playback sine wave&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;3. Record to SDcard, after record playback it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: terminal, monaco, monospace;"&gt;4. Quit&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: terminal, monaco, monospace; "&gt;Has anyone seen this behaviour? I've tested with 2 separate eval board, same behaviour.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: terminal, monaco, monospace; "&gt;SDK: 2.7.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: terminal, monaco, monospace; "&gt;IDE: 11.1.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: terminal, monaco, monospace; "&gt;Thanks for any tips.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: terminal, monaco, monospace; "&gt;Scott&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2020 22:14:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SAI-Demo-Program-mis-detected-SD-Card/m-p/1043627#M3354</guid>
      <dc:creator>scott1</dc:creator>
      <dc:date>2020-05-05T22:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAI Demo Program mis-detected SD Card</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SAI-Demo-Program-mis-detected-SD-Card/m-p/1043628#M3355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Scott,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry for the late reply. I have reproduced your issue on my board. This is because there is a mistake on the configuration of this pin. As you can see in the following snippet, PTD10 shorts with VDD when card is inserted.&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 alt="pastedImage_2.png" src="https://community.nxp.com/t5/image/serverpage/image-id/106357iECB028C1981B94EA/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, you will see that in &lt;STRONG&gt;pin_mux.c&lt;/STRONG&gt; file the pin has pull-up resistor activated. That is the reason why it detects the card as inserted even if it's not. Please change the configuration as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; port_pin_config_t portd10_pinB3_config &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;/* Internal pull-up resistor is enabled */&lt;/SPAN&gt;
                                kPORT_PullDown&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                &lt;SPAN class="comment token"&gt;/* Fast slew rate is configured */&lt;/SPAN&gt;
                                kPORT_FastSlewRate&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                &lt;SPAN class="comment token"&gt;/* Passive filter is disabled */&lt;/SPAN&gt;
                                kPORT_PassiveFilterDisable&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                &lt;SPAN class="comment token"&gt;/* Open drain is disabled */&lt;/SPAN&gt;
                                kPORT_OpenDrainDisable&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                &lt;SPAN class="comment token"&gt;/* Low drive strength is configured */&lt;/SPAN&gt;
                                kPORT_LowDriveStrength&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                &lt;SPAN class="comment token"&gt;/* Pin is configured as PTD10 */&lt;/SPAN&gt;
                                kPORT_MuxAsGpio&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                &lt;SPAN class="comment token"&gt;/* Pin Control Register fields [15:0] are not locked */&lt;/SPAN&gt;
                                kPORT_UnlockRegister&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;/* PORTD10 (pin B3) is configured as PTD10 */&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;PORT_SetPinConfig&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PORTD&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10U&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;portd10_pinB3_config&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;/P&gt;&lt;P&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:38:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SAI-Demo-Program-mis-detected-SD-Card/m-p/1043628#M3355</guid>
      <dc:creator>FelipeGarcia</dc:creator>
      <dc:date>2020-11-02T14:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAI Demo Program mis-detected SD Card</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SAI-Demo-Program-mis-detected-SD-Card/m-p/1043629#M3356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Felipe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry it has taken me so long to respond, I have been dragged off to help out on another project, but I did manage to test your fix just now. It works. Thank you very much. I still have the investigation regarding the 48KHz/24-bit issue on my todo list, but it may be a little time before I have an opportunity to dig back in. Meanwhile, if you are looking into the issue, please keep me updated. Thank you again.&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2020 22:13:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SAI-Demo-Program-mis-detected-SD-Card/m-p/1043629#M3356</guid>
      <dc:creator>scott1</dc:creator>
      <dc:date>2020-05-18T22:13:53Z</dc:date>
    </item>
  </channel>
</rss>

