<?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のトピックMCF5235 to SDRAM interface problem</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5235-to-SDRAM-interface-problem/m-p/136489#M1798</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;BR /&gt;we have a board with MCF5235 coldfire connected to a&lt;BR /&gt;128Mbit Sdram (ELPIDA EDS1216AGTA 8M words x 16 bit) chip. It is connected with the&lt;BR /&gt;following configurations:&lt;/DIV&gt;&lt;DIV&gt;16-bit Port,9-Column Address&lt;BR /&gt;MCF5235 Pin - A16 A15 A14 A13 A12 A11 A10 A9&amp;nbsp; A18 A19 A20 A21&amp;nbsp; A22&amp;nbsp; A23&lt;BR /&gt;SDRAM Pin&amp;nbsp;&amp;nbsp; - A0&amp;nbsp;&amp;nbsp;&amp;nbsp; A1&amp;nbsp;&amp;nbsp; A2&amp;nbsp;&amp;nbsp; A3&amp;nbsp;&amp;nbsp; A4&amp;nbsp;&amp;nbsp; A5&amp;nbsp;&amp;nbsp; A6&amp;nbsp;&amp;nbsp; A7&amp;nbsp; A8&amp;nbsp;&amp;nbsp; A9&amp;nbsp;&amp;nbsp; A10 A11&amp;nbsp; BA0&amp;nbsp; BA1&lt;/DIV&gt;&lt;DIV&gt;where BA0,BA1 are the Bank Select Addresses&lt;/DIV&gt;&lt;DIV&gt;We then run our Pemicro ICDCFZ_PRO BDM debugger&lt;BR /&gt;to initialise the registers:&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;/********Start Of Script**********/&lt;BR /&gt;;;;;;;;;Clock module Chapter 7&lt;BR /&gt;;Crystal Frequency = 13.56MHz&lt;BR /&gt;;Sets the Core Frequency = 10 * 13.56MHz =135.6MHz&lt;BR /&gt;;Internal Bus Frequency = 67.8MHz&lt;BR /&gt;MM.L 0x40120000 0x03000000&lt;BR /&gt;DELAY 100&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;;;;;;;;GPIO module Chapter 12&lt;BR /&gt;;A[23:21] pin configured for address bit 23-21&lt;BR /&gt;;D[15:0] pins configured for data 15-0 functions&lt;BR /&gt;MM.B 0x40100040 0xE0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;Only CS1 pin is configured for CS function&lt;BR /&gt;;The rest of CS pins are used for GPIO functions&lt;BR /&gt;MM.B 0x40100045 0x02&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;SD_WE pin configured for SDRAMC WE function&lt;BR /&gt;;SD_CAS pin configured for SDRAMC CAS function&lt;BR /&gt;;SD_SRAS pin configured for SDRAMC SRAS function&lt;BR /&gt;;SD_CKE pin configured for SDRAMC CKE function&lt;BR /&gt;;SD_CS pin configured for SDRAMC CS function&lt;BR /&gt;;CS2 abd CS3 are NOT configured for SDRAMC function&lt;BR /&gt;MM.B 0x40100046 0x3F&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3366FF;"&gt;;;;;;;;;;; SDRAM module Chapter 18&lt;BR /&gt;;Refresh Timing = 6 clocks&lt;BR /&gt;;Refresh Count = 0x42&lt;BR /&gt;MM.W 0x40000040 0x0242&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set RAM base address to 0x10000000&lt;BR /&gt;;CBM set to 3&lt;BR /&gt;;CASL set to bit value 01&lt;BR /&gt;;set Port Size 16 bit&lt;BR /&gt;MM.L 0x40000048 0x10001320&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set RAM base address mask to allow for 16M range&lt;BR /&gt;;set bit V to initialize registers controlling DRAM block&lt;BR /&gt;MM.L 0x4000004C 0x00fc0001&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set IP bit to initiate Precharge All command&lt;BR /&gt;MM.L 0x40000048 0x10001328&lt;BR /&gt;DELAY 10&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;SPAN style="color: #3366FF;"&gt;; Write to SDRAM to initiate precharge&lt;BR /&gt;MM.L 0x10000000 0xA5A59696&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;; Turn On Refresh Enable bit&lt;BR /&gt;MM.L 0x40000048 0x10009328&lt;BR /&gt;DELAY 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;Initiate Mode Register Set command&lt;BR /&gt;MM.L 0x40000048 0x10009368&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;Write to the SDRAM Mode Register&lt;BR /&gt;MM.L 0x10000400 0xA5A59696&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;/********End Of Script************/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Here is the error log:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;/************Start of error log*****************/&lt;BR /&gt;&amp;gt;;;;;;;;;Clock module Chapter 7&lt;BR /&gt;&amp;gt;;Crystal Frequency = 13.56MHz&lt;BR /&gt;&amp;gt;;Sets the Core Frequency = 10 * 13.56MHz =135.6MHz&lt;BR /&gt;&amp;gt;;Internal Bus Frequency = 67.8MHz&lt;BR /&gt;&amp;gt;MM.L 0x40120000 0x03000000&lt;BR /&gt;&amp;gt;DELAY 100&lt;BR /&gt;Delaying for 100mS ... Done.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;;;;;;;;GPIO module Chapter 12&lt;BR /&gt;&amp;gt;;A[23:21] pin configured for address bit 23-21&lt;BR /&gt;&amp;gt;;D[15:0] pins configured for data 15-0 functions&lt;BR /&gt;&amp;gt;MM.B 0x40100040 0xE0&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;Only CS1 pin is configured for CS function&lt;BR /&gt;&amp;gt;;The rest of CS pins are used for GPIO functions&lt;BR /&gt;&amp;gt;MM.B 0x40100045 0x02&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;SD_WE pin configured for SDRAMC WE function&lt;BR /&gt;&amp;gt;;SD_CAS pin configured for SDRAMC CAS function&lt;BR /&gt;&amp;gt;;SD_SRAS pin configured for SDRAMC SRAS function&lt;BR /&gt;&amp;gt;;SD_CKE pin configured for SDRAMC CKE function&lt;BR /&gt;&amp;gt;;SD_CS pin configured for SDRAMC CS function&lt;BR /&gt;&amp;gt;;CS2 and CS3 are NOT configured for SDRAMC function&lt;BR /&gt;&amp;gt;MM.B 0x40100046 0x3F&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;;;;;;;;;; SDRAM module Chapter 18&lt;BR /&gt;&amp;gt;;Refresh Timing = 6 clocks&lt;BR /&gt;&amp;gt;;Refresh Count = 0x46&lt;BR /&gt;&amp;gt;MM.W 0x40000040 0x0242&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;set RAM base address to 0x10000000&lt;BR /&gt;&amp;gt;;CBM set to 3&lt;BR /&gt;&amp;gt;;CASL set to bit value 01&lt;BR /&gt;&amp;gt;;set Port Size 16 bit&lt;BR /&gt;&amp;gt;MM.L 0x40000048 0x10001320&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;set RAM base address mask to allow for 16M range&lt;BR /&gt;&amp;gt;;set bit V to initialize registers controlling DRAM block&lt;BR /&gt;&amp;gt;MM.L 0x4000004C 0x00fc0001&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;set IP bit to initiate Precharge All command&lt;BR /&gt;&amp;gt;MM.L 0x40000048 0x10001328&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;/************End of error log*****************/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;As you can see from the error log,&lt;BR /&gt;it always produce the "Not Ready from Chip" error when we&lt;BR /&gt;set DACR0's IP bit. We are unable to solve this problem.&lt;BR /&gt;We always have to do a reset at this point&lt;BR /&gt;so that we can use our BDM again.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;OK here's the puzzling part:&lt;BR /&gt;if we change the following lines in the script (to WRONGLY configure&lt;BR /&gt;it as a 32 bit port), the register&lt;BR /&gt;initialization works:&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;/******modified scipt*********/&lt;BR /&gt;;;;;;;;;GPIO module Chapter 12&lt;BR /&gt;;A[23:21] pin configured for address bit 23-21&lt;BR /&gt;;D[15:0] pins configured for data 15-0 functions&lt;BR /&gt;MM.B 0x40100040 0xE1 ;&amp;lt;----modified to 32 bit port&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set RAM base address to 0x10000000&lt;BR /&gt;;CBM set to 3&lt;BR /&gt;;CASL set to bit value 01&lt;BR /&gt;;set Port Size 16 bit&lt;BR /&gt;MM.L 0x40000048 0x10001300 ;&amp;lt;----modified to 32 bit port&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set RAM base address mask to allow for 16M range&lt;BR /&gt;;set bit V to initialize registers controlling DRAM block&lt;BR /&gt;MM.L 0x4000004C 0x00fc0001&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set IP bit to initiate Precharge All command&lt;BR /&gt;MM.L 0x40000048 0x10001308 ;&amp;lt;----modified to 32 bit port&lt;BR /&gt;DELAY 10&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;SPAN style="color: #3366FF;"&gt;; Write to SDRAM to initiate precharge&lt;BR /&gt;MM.L 0x10000000 0xA5A59696&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;; Turn On Refresh Enable bit&lt;BR /&gt;MM.L 0x40000048 0x10009308 ;&amp;lt;----modified to 32 bit port&lt;BR /&gt;DELAY 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;Initiate Mode Register Set command&lt;BR /&gt;MM.L 0x40000048 0x10009348 ;&amp;lt;----modified to 32 bit port&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;Write to the SDRAM Mode Register&lt;BR /&gt;MM.L 0x10000400 0xA5A59696&lt;BR /&gt;/*******End of Modified script*****/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;Now, with the modified script, we don't see&lt;BR /&gt;the "Not ready response" anymore. However, we see a problem&lt;BR /&gt;when we write to SDRAM adress 0x10FFFFFF with, say,&lt;BR /&gt;a value of 0x99&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;SDRAM locations:&lt;BR /&gt;0x10FFFFFF = 0x99(correct)&lt;BR /&gt;0x10FFFFFA = 0x99(wrong)&lt;BR /&gt;0x10FFFFF7 = 0x99(wrong)&lt;BR /&gt;0x10FFFFF3 = 0x99(wrong)&lt;BR /&gt;....and many other locations all the way to 0x10FFFFD3......&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Many other locations got wrongly written as well. This error is&lt;BR /&gt;understandable since ours is actually a 16-bit port.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So our question is:&lt;BR /&gt;1) Why, in our orginal 16-bit script, the board always&lt;BR /&gt;go haywire when we set DACR0's IP bit?&lt;/DIV&gt;&lt;DIV&gt;2) Why the register initialization went smoothly when we WRONGLY&lt;BR /&gt;configure it as a 32-bit port?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks in advance for any help given!&lt;/DIV&gt;&lt;DIV&gt;rgds,&lt;BR /&gt;Mun Lai&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Nov 2006 11:22:09 GMT</pubDate>
    <dc:creator>wmunlai</dc:creator>
    <dc:date>2006-11-14T11:22:09Z</dc:date>
    <item>
      <title>MCF5235 to SDRAM interface problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5235-to-SDRAM-interface-problem/m-p/136489#M1798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;BR /&gt;we have a board with MCF5235 coldfire connected to a&lt;BR /&gt;128Mbit Sdram (ELPIDA EDS1216AGTA 8M words x 16 bit) chip. It is connected with the&lt;BR /&gt;following configurations:&lt;/DIV&gt;&lt;DIV&gt;16-bit Port,9-Column Address&lt;BR /&gt;MCF5235 Pin - A16 A15 A14 A13 A12 A11 A10 A9&amp;nbsp; A18 A19 A20 A21&amp;nbsp; A22&amp;nbsp; A23&lt;BR /&gt;SDRAM Pin&amp;nbsp;&amp;nbsp; - A0&amp;nbsp;&amp;nbsp;&amp;nbsp; A1&amp;nbsp;&amp;nbsp; A2&amp;nbsp;&amp;nbsp; A3&amp;nbsp;&amp;nbsp; A4&amp;nbsp;&amp;nbsp; A5&amp;nbsp;&amp;nbsp; A6&amp;nbsp;&amp;nbsp; A7&amp;nbsp; A8&amp;nbsp;&amp;nbsp; A9&amp;nbsp;&amp;nbsp; A10 A11&amp;nbsp; BA0&amp;nbsp; BA1&lt;/DIV&gt;&lt;DIV&gt;where BA0,BA1 are the Bank Select Addresses&lt;/DIV&gt;&lt;DIV&gt;We then run our Pemicro ICDCFZ_PRO BDM debugger&lt;BR /&gt;to initialise the registers:&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;/********Start Of Script**********/&lt;BR /&gt;;;;;;;;;Clock module Chapter 7&lt;BR /&gt;;Crystal Frequency = 13.56MHz&lt;BR /&gt;;Sets the Core Frequency = 10 * 13.56MHz =135.6MHz&lt;BR /&gt;;Internal Bus Frequency = 67.8MHz&lt;BR /&gt;MM.L 0x40120000 0x03000000&lt;BR /&gt;DELAY 100&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;;;;;;;;GPIO module Chapter 12&lt;BR /&gt;;A[23:21] pin configured for address bit 23-21&lt;BR /&gt;;D[15:0] pins configured for data 15-0 functions&lt;BR /&gt;MM.B 0x40100040 0xE0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;Only CS1 pin is configured for CS function&lt;BR /&gt;;The rest of CS pins are used for GPIO functions&lt;BR /&gt;MM.B 0x40100045 0x02&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;SD_WE pin configured for SDRAMC WE function&lt;BR /&gt;;SD_CAS pin configured for SDRAMC CAS function&lt;BR /&gt;;SD_SRAS pin configured for SDRAMC SRAS function&lt;BR /&gt;;SD_CKE pin configured for SDRAMC CKE function&lt;BR /&gt;;SD_CS pin configured for SDRAMC CS function&lt;BR /&gt;;CS2 abd CS3 are NOT configured for SDRAMC function&lt;BR /&gt;MM.B 0x40100046 0x3F&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3366FF;"&gt;;;;;;;;;;; SDRAM module Chapter 18&lt;BR /&gt;;Refresh Timing = 6 clocks&lt;BR /&gt;;Refresh Count = 0x42&lt;BR /&gt;MM.W 0x40000040 0x0242&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set RAM base address to 0x10000000&lt;BR /&gt;;CBM set to 3&lt;BR /&gt;;CASL set to bit value 01&lt;BR /&gt;;set Port Size 16 bit&lt;BR /&gt;MM.L 0x40000048 0x10001320&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set RAM base address mask to allow for 16M range&lt;BR /&gt;;set bit V to initialize registers controlling DRAM block&lt;BR /&gt;MM.L 0x4000004C 0x00fc0001&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set IP bit to initiate Precharge All command&lt;BR /&gt;MM.L 0x40000048 0x10001328&lt;BR /&gt;DELAY 10&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;SPAN style="color: #3366FF;"&gt;; Write to SDRAM to initiate precharge&lt;BR /&gt;MM.L 0x10000000 0xA5A59696&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;; Turn On Refresh Enable bit&lt;BR /&gt;MM.L 0x40000048 0x10009328&lt;BR /&gt;DELAY 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;Initiate Mode Register Set command&lt;BR /&gt;MM.L 0x40000048 0x10009368&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;Write to the SDRAM Mode Register&lt;BR /&gt;MM.L 0x10000400 0xA5A59696&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;/********End Of Script************/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Here is the error log:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;/************Start of error log*****************/&lt;BR /&gt;&amp;gt;;;;;;;;;Clock module Chapter 7&lt;BR /&gt;&amp;gt;;Crystal Frequency = 13.56MHz&lt;BR /&gt;&amp;gt;;Sets the Core Frequency = 10 * 13.56MHz =135.6MHz&lt;BR /&gt;&amp;gt;;Internal Bus Frequency = 67.8MHz&lt;BR /&gt;&amp;gt;MM.L 0x40120000 0x03000000&lt;BR /&gt;&amp;gt;DELAY 100&lt;BR /&gt;Delaying for 100mS ... Done.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;;;;;;;;GPIO module Chapter 12&lt;BR /&gt;&amp;gt;;A[23:21] pin configured for address bit 23-21&lt;BR /&gt;&amp;gt;;D[15:0] pins configured for data 15-0 functions&lt;BR /&gt;&amp;gt;MM.B 0x40100040 0xE0&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;Only CS1 pin is configured for CS function&lt;BR /&gt;&amp;gt;;The rest of CS pins are used for GPIO functions&lt;BR /&gt;&amp;gt;MM.B 0x40100045 0x02&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;SD_WE pin configured for SDRAMC WE function&lt;BR /&gt;&amp;gt;;SD_CAS pin configured for SDRAMC CAS function&lt;BR /&gt;&amp;gt;;SD_SRAS pin configured for SDRAMC SRAS function&lt;BR /&gt;&amp;gt;;SD_CKE pin configured for SDRAMC CKE function&lt;BR /&gt;&amp;gt;;SD_CS pin configured for SDRAMC CS function&lt;BR /&gt;&amp;gt;;CS2 and CS3 are NOT configured for SDRAMC function&lt;BR /&gt;&amp;gt;MM.B 0x40100046 0x3F&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;;;;;;;;;; SDRAM module Chapter 18&lt;BR /&gt;&amp;gt;;Refresh Timing = 6 clocks&lt;BR /&gt;&amp;gt;;Refresh Count = 0x46&lt;BR /&gt;&amp;gt;MM.W 0x40000040 0x0242&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;set RAM base address to 0x10000000&lt;BR /&gt;&amp;gt;;CBM set to 3&lt;BR /&gt;&amp;gt;;CASL set to bit value 01&lt;BR /&gt;&amp;gt;;set Port Size 16 bit&lt;BR /&gt;&amp;gt;MM.L 0x40000048 0x10001320&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;set RAM base address mask to allow for 16M range&lt;BR /&gt;&amp;gt;;set bit V to initialize registers controlling DRAM block&lt;BR /&gt;&amp;gt;MM.L 0x4000004C 0x00fc0001&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;;set IP bit to initiate Precharge All command&lt;BR /&gt;&amp;gt;MM.L 0x40000048 0x10001328&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;Not ready response from chip - try a RESET.&lt;BR /&gt;/************End of error log*****************/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;As you can see from the error log,&lt;BR /&gt;it always produce the "Not Ready from Chip" error when we&lt;BR /&gt;set DACR0's IP bit. We are unable to solve this problem.&lt;BR /&gt;We always have to do a reset at this point&lt;BR /&gt;so that we can use our BDM again.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;OK here's the puzzling part:&lt;BR /&gt;if we change the following lines in the script (to WRONGLY configure&lt;BR /&gt;it as a 32 bit port), the register&lt;BR /&gt;initialization works:&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;/******modified scipt*********/&lt;BR /&gt;;;;;;;;;GPIO module Chapter 12&lt;BR /&gt;;A[23:21] pin configured for address bit 23-21&lt;BR /&gt;;D[15:0] pins configured for data 15-0 functions&lt;BR /&gt;MM.B 0x40100040 0xE1 ;&amp;lt;----modified to 32 bit port&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set RAM base address to 0x10000000&lt;BR /&gt;;CBM set to 3&lt;BR /&gt;;CASL set to bit value 01&lt;BR /&gt;;set Port Size 16 bit&lt;BR /&gt;MM.L 0x40000048 0x10001300 ;&amp;lt;----modified to 32 bit port&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set RAM base address mask to allow for 16M range&lt;BR /&gt;;set bit V to initialize registers controlling DRAM block&lt;BR /&gt;MM.L 0x4000004C 0x00fc0001&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;set IP bit to initiate Precharge All command&lt;BR /&gt;MM.L 0x40000048 0x10001308 ;&amp;lt;----modified to 32 bit port&lt;BR /&gt;DELAY 10&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;SPAN style="color: #3366FF;"&gt;; Write to SDRAM to initiate precharge&lt;BR /&gt;MM.L 0x10000000 0xA5A59696&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;; Turn On Refresh Enable bit&lt;BR /&gt;MM.L 0x40000048 0x10009308 ;&amp;lt;----modified to 32 bit port&lt;BR /&gt;DELAY 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;Initiate Mode Register Set command&lt;BR /&gt;MM.L 0x40000048 0x10009348 ;&amp;lt;----modified to 32 bit port&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3366FF;"&gt;;Write to the SDRAM Mode Register&lt;BR /&gt;MM.L 0x10000400 0xA5A59696&lt;BR /&gt;/*******End of Modified script*****/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;Now, with the modified script, we don't see&lt;BR /&gt;the "Not ready response" anymore. However, we see a problem&lt;BR /&gt;when we write to SDRAM adress 0x10FFFFFF with, say,&lt;BR /&gt;a value of 0x99&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;SDRAM locations:&lt;BR /&gt;0x10FFFFFF = 0x99(correct)&lt;BR /&gt;0x10FFFFFA = 0x99(wrong)&lt;BR /&gt;0x10FFFFF7 = 0x99(wrong)&lt;BR /&gt;0x10FFFFF3 = 0x99(wrong)&lt;BR /&gt;....and many other locations all the way to 0x10FFFFD3......&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Many other locations got wrongly written as well. This error is&lt;BR /&gt;understandable since ours is actually a 16-bit port.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So our question is:&lt;BR /&gt;1) Why, in our orginal 16-bit script, the board always&lt;BR /&gt;go haywire when we set DACR0's IP bit?&lt;/DIV&gt;&lt;DIV&gt;2) Why the register initialization went smoothly when we WRONGLY&lt;BR /&gt;configure it as a 32-bit port?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks in advance for any help given!&lt;/DIV&gt;&lt;DIV&gt;rgds,&lt;BR /&gt;Mun Lai&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 11:22:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5235-to-SDRAM-interface-problem/m-p/136489#M1798</guid>
      <dc:creator>wmunlai</dc:creator>
      <dc:date>2006-11-14T11:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5235 to SDRAM interface problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5235-to-SDRAM-interface-problem/m-p/136490#M1799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm using a 32 bits SDRAM and not a 16 bits one so my cabling is different, but I think you can check that:&lt;/DIV&gt;&lt;DIV&gt;The SDRAM &lt;FONT color="#ff0000"&gt;'CAS Latency'&lt;/FONT&gt; programmed in the DACR0 Register&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#3366FF"&gt;&amp;gt;;set RAM base address to 0x10000000&lt;BR /&gt;&amp;gt;;CBM set to 3&lt;BR /&gt;&amp;gt;;CASL set to bit value 01&lt;BR /&gt;&amp;gt;;set Port Size 16 bit&lt;BR /&gt;&amp;gt;MM.L 0x40000048 0x1000&lt;FONT color="#ff0000"&gt;1&lt;/FONT&gt;320&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#3366FF"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;is the same as the one programmed in the SDRAM Mode Register&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#3366FF"&gt;&amp;gt;;Write to the SDRAM Mode Register&lt;BR /&gt;&amp;gt;MM.L 0x100&lt;FONT color="#0000ff"&gt;0&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#6633FF"&gt;0&lt;/FONT&gt;&lt;FONT color="#ff0000"&gt;4&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0033FF"&gt;00&lt;/FONT&gt; 0xA5A59696&lt;/FONT&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;Regards&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 22:16:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5235-to-SDRAM-interface-problem/m-p/136490#M1799</guid>
      <dc:creator>Arev</dc:creator>
      <dc:date>2006-11-14T22:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5235 to SDRAM interface problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5235-to-SDRAM-interface-problem/m-p/136491#M1800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Ares,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for the Info.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Now, we are suspecting that the problem might be due to the software Pemicro's ICDCFZ_PRO BDM debugger. It seems the values displayed in the Memory Window&amp;nbsp;of ICDCFZ_PRO can affect the initialization of our board. In our case, if we avoid displaying the SDRAM memory space which starts at 0x10000000 and instead display the Flash memory space starting at 0x00000000, our board&amp;nbsp;initialises without a problem. But if the Memory Window displays from 0x10000000 onwards (SDRAM space), the initialisation always fails. We are wondering if anyone else has a similar experience with ICDCFZ_PRO. Anyway, we are waiting for PEmicro to reply to us.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Unfortuantely, I now face another problem. It seems that writing to the first half of SDRAM space is ok. But, writing to the 2nd half of memory space causes another location to be written as well. I have started another thread for this problem.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&amp;amp;message.id=1167" target="_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&amp;amp;message.id=1167&lt;/A&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 21:52:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5235-to-SDRAM-interface-problem/m-p/136491#M1800</guid>
      <dc:creator>wmunlai</dc:creator>
      <dc:date>2006-11-15T21:52:32Z</dc:date>
    </item>
  </channel>
</rss>

