<?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: Can't write to SDRAM (16-bit vs 32-bit)</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Can-t-write-to-SDRAM-16-bit-vs-32-bit/m-p/144094#M2837</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;KRichard,&lt;BR /&gt;&lt;BR /&gt;Any further luck with your SDRAM problem?&amp;nbsp; I've been away for awhile and couldn't look at your issue.&lt;BR /&gt;&lt;BR /&gt;If you are still struggling, can you share the pseudo code for how you init the SDRAM controller?&amp;nbsp; Or just attach the MEM file and CodeWarrior CFG file to your next post?&lt;BR /&gt;&lt;BR /&gt;It may actually be a problem in the CFG file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-JWW&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Sep 2007 11:20:23 GMT</pubDate>
    <dc:creator>JWW</dc:creator>
    <dc:date>2007-09-14T11:20:23Z</dc:date>
    <item>
      <title>Can't write to SDRAM (16-bit vs 32-bit)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Can-t-write-to-SDRAM-16-bit-vs-32-bit/m-p/144091#M2834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello I have a problem. I am using an MCF5373L ColdFire MPU with a EDS2516AFTA (16M words × 16 bits) SDRAM and when CodeWarrior tries to write my software into the SDRAM I get an error saying:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;----&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Memory Write Verify Failure&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Memory Write to address 0x40000480 failed to verify: Expected value: 0x4001aa60 Actual value: 0xaa60 Retry?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;----&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think (beware, I have almost zero experience in this matter) the problem is that CodeWarrior handles this module as it would be 32bit, while it is a 16 bit module (as you can see from the error message, the lower 16bit is OK).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any hints?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can read/write the module from Tools -&amp;gt; Hardware diagnostic fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2007 01:35:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Can-t-write-to-SDRAM-16-bit-vs-32-bit/m-p/144091#M2834</guid>
      <dc:creator>KRichard</dc:creator>
      <dc:date>2007-08-31T01:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can't write to SDRAM (16-bit vs 32-bit)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Can-t-write-to-SDRAM-16-bit-vs-32-bit/m-p/144092#M2835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;KRichard,&lt;BR /&gt;&lt;BR /&gt;I had one quick thought when I read this.&amp;nbsp; And I hope it is not bad news.&amp;nbsp; &lt;SPAN&gt;&lt;SPAN&gt;&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;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;You appear to be using SDR memory.&amp;nbsp; And you stated that it is 16 bit wide.&amp;nbsp; My assumption is that you did use two of these memories to form a 32 bit wide bus in SDR mode.&amp;nbsp; At least I hope you did...&lt;BR /&gt;&lt;BR /&gt;See note in user's manual: Page 18-6&lt;BR /&gt;&lt;BR /&gt;NOTE&lt;BR /&gt;When the SDRAMC is configured to support an external 32-bit data bus. It&lt;BR /&gt;is not possible to connect a smaller device(s) to only part of the SDRAM’s&lt;BR /&gt;data bus. For example, if 16-bit wide devices are used, then user must use&lt;BR /&gt;two 16-bit devices connected as a 32-bit port.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And yes.. Codewarrior does default to what is configured in the MEM file for the type of transaction that is performed in a given address range.&amp;nbsp; This mem file is just a text file that allows you to set up different types of transaction types (port sizes) for numerious address ranges.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Let me know if I mis-understood your problem.&lt;BR /&gt;&lt;BR /&gt;-JWW&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2007 11:39:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Can-t-write-to-SDRAM-16-bit-vs-32-bit/m-p/144092#M2835</guid>
      <dc:creator>JWW</dc:creator>
      <dc:date>2007-08-31T11:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can't write to SDRAM (16-bit vs 32-bit)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Can-t-write-to-SDRAM-16-bit-vs-32-bit/m-p/144093#M2836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello JWW, first I would like to thank you for taking the time to participate in this thread, your suggestions are most welcome! &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;BR /&gt;&lt;BR /&gt;Yes, my board has a single 16 bit SDR memory module and a 16 bit flash (but I think the latter doesn't count in this matter).&lt;BR /&gt;&lt;BR /&gt;I am using a custom-made MCF5373 based board, I only do the software part, another student designed the hardware.&lt;BR /&gt;&lt;BR /&gt;What I want to do: make CodeWarrior upload my code into the SDRAM and run it from there (it works from the internal SRAM). I know that there can be lots of things I don't know about, please feel free to point out mistakes / misunderstandings in my thinking.&lt;BR /&gt;&lt;BR /&gt;What I did:&lt;BR /&gt;&lt;BR /&gt;- I configured the external bus width to 16 bit via the .CFG file, the relevant source line is:&lt;BR /&gt;writemem.l 0xFC0B8004 0xC1082002 # SDCR config&lt;BR /&gt;&lt;BR /&gt;- I also modified the memory configuration .MEM file, I added:&lt;BR /&gt;range 0x40000000 0x41ffffff 2 ReadWrite # 16 bit SDRAM&lt;BR /&gt;&lt;BR /&gt;Unfortunately I don't understand how CodeWarrior uploads the data (and I haven't found any documentation about it yet).&lt;BR /&gt;&lt;BR /&gt;I think this (or something like this) should happen:&lt;BR /&gt;&lt;BR /&gt;- CodeWarrior uploads a 32bit value like 0x12345678, the SDRAM controller writes that value into the SDRAM as two 16bit value, 0x1234 and 0x5678;&lt;BR /&gt;&lt;BR /&gt;- CodeWarrior fetches a 32 bit value to verify, the controller fetches two 16bit values (0x1234 and 0x5678), assembles it into a 32 bit value (0x12345678) then gives it to CodeWarrior;&lt;BR /&gt;&lt;BR /&gt;- CodeWarrior sees that the write was successful and repeats;&lt;BR /&gt;&lt;BR /&gt;Clearly it doesn't happen that way, I conclude from the error message (see my first post in the thread) that CodeWarrior tries to upload a 32bit value into SDRAM, but upon verifying it receives back only one half of the data. Like it tries uploads 0x12345678 then downloads only 0x00005678.&lt;BR /&gt;&lt;BR /&gt;What may be my mistake?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance, Richard&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 00:22:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Can-t-write-to-SDRAM-16-bit-vs-32-bit/m-p/144093#M2836</guid>
      <dc:creator>KRichard</dc:creator>
      <dc:date>2007-09-05T00:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can't write to SDRAM (16-bit vs 32-bit)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Can-t-write-to-SDRAM-16-bit-vs-32-bit/m-p/144094#M2837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;KRichard,&lt;BR /&gt;&lt;BR /&gt;Any further luck with your SDRAM problem?&amp;nbsp; I've been away for awhile and couldn't look at your issue.&lt;BR /&gt;&lt;BR /&gt;If you are still struggling, can you share the pseudo code for how you init the SDRAM controller?&amp;nbsp; Or just attach the MEM file and CodeWarrior CFG file to your next post?&lt;BR /&gt;&lt;BR /&gt;It may actually be a problem in the CFG file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-JWW&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2007 11:20:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Can-t-write-to-SDRAM-16-bit-vs-32-bit/m-p/144094#M2837</guid>
      <dc:creator>JWW</dc:creator>
      <dc:date>2007-09-14T11:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can't write to SDRAM (16-bit vs 32-bit)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Can-t-write-to-SDRAM-16-bit-vs-32-bit/m-p/144095#M2838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Dear JWW,&lt;BR /&gt;&lt;BR /&gt;Thank you, the problem is solved. It was a miscommunication issue between me and the fellow student, the board was designed in a way that I must handle it as a 32 bit memory but only use the lower 16 bits. I assume, that with a self-imposed design limitation like that he was able make the board simpler, or something like that. So I can only use the SDRAM for data storing, I can't run code from there.&lt;BR /&gt;&lt;BR /&gt;I have contacted Freescale support about this issue and got some prompt help with troubleshooting pretty fast, it was cool. I thought they would not respond to a silly problem of a "random no one", I was pleasantly surprised, kudos to Freescale.&lt;BR /&gt;&lt;BR /&gt;Running code from Flash memory works, so I am very happy actually. &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;BR /&gt;&lt;BR /&gt;Richard&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2007 19:04:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Can-t-write-to-SDRAM-16-bit-vs-32-bit/m-p/144095#M2838</guid>
      <dc:creator>KRichard</dc:creator>
      <dc:date>2007-09-14T19:04:11Z</dc:date>
    </item>
  </channel>
</rss>

