<?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: Please Help (microSD card and SPI in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191480#M14738</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello Juan,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you are attempting to single step through the SPI communication code, keep in mind that it is possible for the actions of the debugger to clear the SPRF flag before the code can determine that it has become set.&amp;nbsp; It is best not to single step, but use a break point after the return data has been read.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Oct 2008 21:44:36 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2008-10-07T21:44:36Z</dc:date>
    <item>
      <title>Please Help (microSD card and SPI - MC9s08GT32</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191476#M14734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys, I am working with a microSD card in SPI mode. The cpu is a gt32&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can`t enter in spi mode,&amp;nbsp;I do not see any response from the card,. I have done a little piece of code that sends CMD0 and whait for the R1 response (0x01 card in idle state) but it never comes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I&amp;nbsp;think the code is ok, maybe is hardware problem,&amp;nbsp;I have tested the connection and is ok. I didnt put any pullup or pull down resistors.&amp;nbsp;I dont know what&amp;nbsp; to do! please help me!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The attached file is the code, if someone could check it, it would help me a lot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Juan&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Added p/n to subject.&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by NLFSJ on &lt;SPAN class="date_text"&gt;2008-10-06&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;07:02 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.freescale.com%2Ffiles%2Fcommunity_files%2F8BITCOMM%2Fmsg12174_Send_CMD_0.txt" rel="nofollow" target="_blank"&gt;Send_CMD_0.txt&lt;/A&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-09-04&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;02:01 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 01:54:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191476#M14734</guid>
      <dc:creator>juanb_arg</dc:creator>
      <dc:date>2008-10-06T01:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help (microSD card and SPI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191477#M14735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;Hi Juan, try to do this: set bits CPOL and CPHA of SPI1C1 control register, and be sure that you has set PTED_PTED2 as output (PTEDD_PTEDD2 = 1), this doesn't appears in your code.&lt;BR /&gt;&amp;nbsp;I also work with a SD and this is the only strange setting that I need set to comunicate with SD card, this setting was implemented in HC08GP32, GT60 and recently in a QE128 and works fine the rest of code looks good.&lt;BR /&gt;&lt;BR /&gt;Good Luck.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by erooll on &lt;SPAN class="date_text"&gt;2008-10-05&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:59 PM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by erooll on &lt;SPAN class="date_text"&gt;2008-10-05&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;11:02 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 10:46:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191477#M14735</guid>
      <dc:creator>erooll</dc:creator>
      <dc:date>2008-10-06T10:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help (microSD card and SPI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191478#M14736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi eroll! First of all thanks for your answer. Well i have taken what you said about clock considerations and port e into account in my code.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;Yesterday i while&amp;nbsp;was testing the code and i found that&amp;nbsp;in one situation it worked well, and later i tried to repeat the test and it did not work again. Iam using a BDM open source debugguer.&amp;nbsp;i dont know if it is working&amp;nbsp;as it should...sometimes when i debug a character sending&amp;nbsp;it shows&amp;nbsp;me the contents of the spi registers and sometimes not , it&amp;nbsp;is so extrange...&amp;nbsp;could be a problem of the debbuguer?&lt;/DIV&gt;&lt;DIV&gt;thaks again&lt;/DIV&gt;&lt;DIV&gt;regars&lt;/DIV&gt;&lt;DIV&gt;juan&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 19:03:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191478#M14736</guid>
      <dc:creator>juanb_arg</dc:creator>
      <dc:date>2008-10-06T19:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help (microSD card and SPI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191479#M14737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;You DO need at least a pull-up on the data out line.&lt;BR /&gt;If you read the spec it shows the values you should have.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 19:19:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191479#M14737</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-10-06T19:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help (microSD card and SPI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191480#M14738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello Juan,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you are attempting to single step through the SPI communication code, keep in mind that it is possible for the actions of the debugger to clear the SPRF flag before the code can determine that it has become set.&amp;nbsp; It is best not to single step, but use a break point after the return data has been read.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 21:44:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191480#M14738</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-10-07T21:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help (microSD card and SPI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191481#M14739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;Hi! Thanks Jim and BigMac for your response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BigMac, what you told me&amp;nbsp;is right,&amp;nbsp;I have experimented it.&amp;nbsp; after that I always&amp;nbsp;put the breakpoints after the call of the spi send or receive.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The problem that I was trying to describe, (maybe I didn’t explained it so clearly,&amp;nbsp; English is my second&amp;nbsp;language &lt;IMG alt=":smileysad:" class="emoticon emoticon-smileysad" id="smileysad" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif" title="Smiley Sad" /&gt;) is that when i start the debugging sometimes i can see the spi working well, the SPI1D reg&amp;nbsp;is full after sending a character in the breakpoint, and after that i restart the debugging and it doesn’t have the same behavior , and the program is exactly the same.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I dont know why....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 23:12:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191481#M14739</guid>
      <dc:creator>juanb_arg</dc:creator>
      <dc:date>2008-10-07T23:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help (microSD card and SPI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191482#M14740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BR /&gt;That's why I mentioned the pull up. If there is not a pull up on the data line from the card to the MCU, when you reset the card, it may float low you will not see FF like you expect.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 23:16:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191482#M14740</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-10-07T23:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help (microSD card and SPI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191483#M14741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I Got the low signal (500mv) at Data out from SD Card, even pull up does not work. Is it card problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2009 10:55:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191483#M14741</guid>
      <dc:creator>saranezhil30</dc:creator>
      <dc:date>2009-08-29T10:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help (microSD card and SPI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191484#M14742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&amp;nbsp;Hi,&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;JimDon wrote:&lt;BR /&gt;You DO need at least a pull-up on the data out line.&lt;BR /&gt;If you read the spec it shows the values you should have.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Is it possible to use the MCU internal pull-up even though the pin is defined as hardware SPI MISO?&lt;/P&gt;&lt;P&gt;I don't see something like that in the processor expert...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and bye,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 19:00:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Please-Help-microSD-card-and-SPI-MC9s08GT32/m-p/191484#M14742</guid>
      <dc:creator>Superberti</dc:creator>
      <dc:date>2009-08-31T19:00:51Z</dc:date>
    </item>
  </channel>
</rss>

