<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックRe: TWR-LCD demo program not reading uSD card</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-demo-program-not-reading-uSD-card/m-p/215349#M10859</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Code correction shown above does not solve problem, only straightens out the incorrect initial baud rate (per uSD card spec).&amp;nbsp; The SD Card Demo still does not initialize or read the directory.&amp;nbsp; Has anyone ever seen this thing work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Mar 2012 22:59:37 GMT</pubDate>
    <dc:creator>talktrn</dc:creator>
    <dc:date>2012-03-14T22:59:37Z</dc:date>
    <item>
      <title>TWR-LCD demo program not reading uSD card</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-demo-program-not-reading-uSD-card/m-p/215347#M10857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been developing code on the TWR-LCD without problem, until I added the microSD card.&amp;nbsp;&amp;nbsp;So&amp;nbsp;I went back to the&amp;nbsp;example programs provided with the board.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Demo for TWR-LCD-JM128 includes JM128_RevA_noBL_ECUI_SPI project for CW6.2 Processor Expert.&amp;nbsp; Every example works in this demo except for the SD Card demo.&amp;nbsp; It's screen is presented, and it says "initializing SD card driver" and hangs there forever.&amp;nbsp; Insert uSD (8GB) card, nothing happens.&amp;nbsp; Remove the card, "Card Present" checkbox briefly is X'ed, then it's empty and no other messages appear.&amp;nbsp; Insert card and now it says "reading directory" and hangs when I touch "DIR" button.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I started going through the Freescale code, and have scope on the uSD lines -- 1st surprise is that the baud rate for SPI is way off at high speed.&amp;nbsp; As I look through the code, I find:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define SD1_SPI_SetSlowMode()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (void)SM2_SetBaudRateMode(0) /* max 375kbps */&lt;BR /&gt;#define SD1_SPI_SetFastMode()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (void)SM2_SetBaudRateMode(1) /* max 12Mbps */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are clearly reversed!!&amp;nbsp; So I fix that, and behold the scope shows correct initial clock rate.&amp;nbsp; But then as I continue reviewing code I find more and more "issues".&amp;nbsp; What gives?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the uSD demo on TWR-LCD JM128 supposed to work?&amp;nbsp; I've tried multiple known-good uSD cards to no avail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Mar 2012 03:35:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-demo-program-not-reading-uSD-card/m-p/215347#M10857</guid>
      <dc:creator>talktrn</dc:creator>
      <dc:date>2012-03-11T03:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: TWR-LCD demo program not reading uSD card</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-demo-program-not-reading-uSD-card/m-p/215348#M10858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update:&amp;nbsp; the following lines not shown correclty in previous message, extracted from module SD1.c generated by Processor Expert, CW6.3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;original Processor Expert code:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;//#define SD1_SPI_SetFastMode()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (void)SM2_SetBaudRateMode(0) /* max 375kbps */&lt;BR /&gt;//#define SD1_SPI_SetSlowMode()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (void)SM2_SetBaudRateMode(1) /* max 12Mbps */&lt;/P&gt;&lt;P&gt;&lt;U&gt;should be:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;#define SD1_SPI_SetSlowMode()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (void)SM2_SetBaudRateMode(0) /* max 375kbps */&lt;BR /&gt;#define SD1_SPI_SetFastMode()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (void)SM2_SetBaudRateMode(1) /* max 12Mbps */&lt;/P&gt;&lt;P&gt;Once these lines are corrected, the baud rate on uSD card is correct during initialization.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 23:01:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-demo-program-not-reading-uSD-card/m-p/215348#M10858</guid>
      <dc:creator>talktrn</dc:creator>
      <dc:date>2012-03-13T23:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: TWR-LCD demo program not reading uSD card</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-demo-program-not-reading-uSD-card/m-p/215349#M10859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Code correction shown above does not solve problem, only straightens out the incorrect initial baud rate (per uSD card spec).&amp;nbsp; The SD Card Demo still does not initialize or read the directory.&amp;nbsp; Has anyone ever seen this thing work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 22:59:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-demo-program-not-reading-uSD-card/m-p/215349#M10859</guid>
      <dc:creator>talktrn</dc:creator>
      <dc:date>2012-03-14T22:59:37Z</dc:date>
    </item>
  </channel>
</rss>

