<?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>Kinetis MicrocontrollersのトピックK70 DDR2 read failure with increasing temperature</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-DDR2-read-failure-with-increasing-temperature/m-p/653967#M39896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using K70 controller (&lt;STRONG&gt;MK70FN1M0VMJ15&lt;/STRONG&gt; rev. &lt;STRONG&gt;3N96B&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Architecture is the same as the tower TWRK70F120 supplied by NXP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To reproduce the issue, we are running a simple test software that continues to write and read different values (0x00 to 0xff) in a loop into the whole 128 MB external RAM memory (&lt;STRONG&gt;Samsung K4T1G164QG-BCE7&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;Once the board is heated to 40 °C or more, the RAM test fails. Note that once the problem arises, the faulty reading persists with following retries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our software is using MQX 4.1.0 operating system and the DDR controller is initialized by means of &lt;STRONG&gt;_bsp_ddr2_setup&lt;/STRONG&gt; provided in init_hw.c (BSP library) module, as it is, without changes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void _bsp_ddr2_setup (void)&lt;BR /&gt;{&lt;BR /&gt; SIM_MemMapPtr sim = SIM_BASE_PTR;&lt;BR /&gt; DDR_MemMapPtr ddr = DDR_BASE_PTR;&lt;BR /&gt; MCM_MemMapPtr mcm = MCM_BASE_PTR;&lt;/P&gt;&lt;P&gt;/* Enable DDR controller clock */&lt;BR /&gt; sim-&amp;gt;SCGC3 |= SIM_SCGC3_DDR_MASK;&lt;BR /&gt; &lt;BR /&gt; /* Enable DDR pads and set slew rate */&lt;BR /&gt; sim-&amp;gt;MCR |= 0xC4; /* bits were left out of the manual so there isn't a macro right now */&lt;/P&gt;&lt;P&gt;ddr-&amp;gt;RCR |= DDR_RCR_RST_MASK;&lt;/P&gt;&lt;P&gt;* (volatile uint32_t *)(0x400Ae1ac) = 0x01030203;&lt;/P&gt;&lt;P&gt;/* TC's init */&lt;BR /&gt; ddr-&amp;gt;CR00 = 0x00000400;&lt;BR /&gt; ddr-&amp;gt;CR02 = 0x02000031;&lt;BR /&gt; ddr-&amp;gt;CR03 = 0x02020506;&lt;BR /&gt; ddr-&amp;gt;CR04 = 0x06090202;&lt;BR /&gt; ddr-&amp;gt;CR05 = 0x02020302;&lt;BR /&gt; ddr-&amp;gt;CR06 = 0x02904002;&lt;BR /&gt; ddr-&amp;gt;CR07 = 0x01000303;&lt;BR /&gt; ddr-&amp;gt;CR08 = 0x05030201;&lt;BR /&gt; ddr-&amp;gt;CR09 = 0x020000c8;&lt;BR /&gt; ddr-&amp;gt;CR10 = 0x03003207;&lt;BR /&gt; ddr-&amp;gt;CR11 = 0x01000000;&lt;BR /&gt; ddr-&amp;gt;CR12 = 0x04920031;&lt;BR /&gt; ddr-&amp;gt;CR13 = 0x00000005;&lt;BR /&gt; ddr-&amp;gt;CR14 = 0x00C80002;&lt;BR /&gt; ddr-&amp;gt;CR15 = 0x00000032;&lt;BR /&gt; ddr-&amp;gt;CR16 = 0x00000001;&lt;BR /&gt; ddr-&amp;gt;CR20 = 0x00030300;&lt;BR /&gt; ddr-&amp;gt;CR21 = 0x00040232;&lt;BR /&gt; ddr-&amp;gt;CR22 = 0x00000000;&lt;BR /&gt; ddr-&amp;gt;CR23 = 0x00040302;&lt;BR /&gt; ddr-&amp;gt;CR25 = 0x0A010201;&lt;BR /&gt; ddr-&amp;gt;CR26 = 0x0101FFFF;&lt;BR /&gt; ddr-&amp;gt;CR27 = 0x01010101;&lt;BR /&gt; ddr-&amp;gt;CR28 = 0x00000003;&lt;BR /&gt; ddr-&amp;gt;CR29 = 0x00000000;&lt;BR /&gt; ddr-&amp;gt;CR30 = 0x00000001;&lt;BR /&gt; ddr-&amp;gt;CR34 = 0x02020101;&lt;BR /&gt; ddr-&amp;gt;CR36 = 0x01010201;&lt;BR /&gt; ddr-&amp;gt;CR37 = 0x00000200;&lt;BR /&gt; ddr-&amp;gt;CR38 = 0x00200000;&lt;BR /&gt; ddr-&amp;gt;CR39 = 0x01010020;&lt;BR /&gt; ddr-&amp;gt;CR40 = 0x00002000;&lt;BR /&gt; ddr-&amp;gt;CR41 = 0x01010020;&lt;BR /&gt; ddr-&amp;gt;CR42 = 0x00002000;&lt;BR /&gt; ddr-&amp;gt;CR43 = 0x01010020;&lt;BR /&gt; ddr-&amp;gt;CR44 = 0x00000000;&lt;BR /&gt; ddr-&amp;gt;CR45 = 0x03030303;&lt;BR /&gt; ddr-&amp;gt;CR46 = 0x02006401;&lt;BR /&gt; ddr-&amp;gt;CR47 = 0x01020202;&lt;BR /&gt; ddr-&amp;gt;CR48 = 0x01010064;&lt;BR /&gt; ddr-&amp;gt;CR49 = 0x00020101;&lt;BR /&gt; ddr-&amp;gt;CR50 = 0x00000064;&lt;BR /&gt; ddr-&amp;gt;CR52 = 0x02000602;&lt;BR /&gt; ddr-&amp;gt;CR53 = 0x03c80000;&lt;BR /&gt; ddr-&amp;gt;CR54 = 0x03c803c8;&lt;BR /&gt; ddr-&amp;gt;CR55 = 0x03c803c8;&lt;BR /&gt; ddr-&amp;gt;CR56 = 0x020303c8;&lt;BR /&gt; ddr-&amp;gt;CR57 = 0x01010002;&lt;/P&gt;&lt;P&gt;_ASM_NOP();&lt;/P&gt;&lt;P&gt;ddr-&amp;gt;CR00 |= 0x00000001;&lt;/P&gt;&lt;P&gt;while ((ddr-&amp;gt;CR30 &amp;amp; 0x400) != 0x400) {&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;mcm-&amp;gt;CR |= MCM_CR_DDRSIZE(1); &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not all the boards are experiencing the problem, but roughly 60 % of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We suspect that the issue may be related to the K70 DDR controller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We tried to apply the advice in this &lt;A href="http://www.nxp.com/assets/documents/data/en/errata/KINETIS_3N96B.pdf"&gt;document&lt;/A&gt;&amp;nbsp;(erratum ID &lt;STRONG&gt;e10521&lt;/STRONG&gt;), and tried also various RCR values other than those read by the procedure explained in e10521, but with no success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update 2017-04-07:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We tried to apply a different ddr2 setup by using the output produced by Freescale's &lt;A href="http://cache.nxp.com/files/32bit/software_tools/initialization/boot_code_generation/KINETIS_K70_DDR_INIT.exe"&gt;K70memctrl&lt;/A&gt;&amp;nbsp;(we found it &lt;A _jive_internal="true" href="https://community.nxp.com/thread/429340"&gt;here&lt;/A&gt;) with the following command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;K70memctrl&amp;nbsp;&lt;/SPAN&gt;c MT47H64M16.mem ddr2setup.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and reporting the output of ddr2setup.c in our initialization function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void _bsp_ddr2_setup_modified (void)&lt;BR /&gt;{&lt;BR /&gt; SIM_MemMapPtr sim = SIM_BASE_PTR;&lt;BR /&gt; DDR_MemMapPtr ddr = DDR_BASE_PTR;&lt;BR /&gt; MCM_MemMapPtr mcm = MCM_BASE_PTR;&lt;/P&gt;&lt;P&gt;/* Enable DDR controller clock */&lt;BR /&gt; sim-&amp;gt;SCGC3 |= SIM_SCGC3_DDR_MASK;&lt;BR /&gt; &lt;BR /&gt; /* Enable DDR pads and set slew rate */&lt;BR /&gt; sim-&amp;gt;MCR |= 0xC4; /* bits were left out of the manual so there isn't a macro right now */&lt;/P&gt;&lt;P&gt;ddr-&amp;gt;RCR |= DDR_RCR_RST_MASK;&lt;/P&gt;&lt;P&gt;* (volatile uint32_t *)(0x400Ae1ac) = 0x01030203;&lt;/P&gt;&lt;P&gt;/* TC's init */&lt;BR /&gt; ddr-&amp;gt;CR00 = 0x00000400;&lt;BR /&gt; ddr-&amp;gt;CR02 = 0x02007530;&lt;BR /&gt; ddr-&amp;gt;CR03 = 0x02020707;&lt;BR /&gt; ddr-&amp;gt;CR04 = 0x07090202;&lt;BR /&gt; ddr-&amp;gt;CR05 = 0x02020302;&lt;BR /&gt; ddr-&amp;gt;CR06 = 0x00290402;&lt;BR /&gt; ddr-&amp;gt;CR07 = 0x01010303;&lt;BR /&gt; ddr-&amp;gt;CR08 = 0x06030301;&lt;BR /&gt; ddr-&amp;gt;CR09 = 0x020000c8;&lt;BR /&gt; ddr-&amp;gt;CR10 = 0x02000808;&lt;BR /&gt; ddr-&amp;gt;CR11 = 0x01000000;&lt;BR /&gt; ddr-&amp;gt;CR12 = 0x048a001e;&lt;BR /&gt; ddr-&amp;gt;CR13 = 0x00000005;&lt;BR /&gt; ddr-&amp;gt;CR14 = 0x00c70002;&lt;BR /&gt; ddr-&amp;gt;CR15 = 0x00000015;&lt;BR /&gt; ddr-&amp;gt;CR16 = 0x00000001;&lt;BR /&gt; ddr-&amp;gt;CR20 = 0x00030300;&lt;BR /&gt; ddr-&amp;gt;CR21 = 0x24040232;&lt;BR /&gt;// ddr-&amp;gt;CR22 = 0x00000000;&lt;BR /&gt;// ddr-&amp;gt;CR23 = 0x00040302;&lt;BR /&gt; ddr-&amp;gt;CR25 = 0x0A010201;&lt;BR /&gt; ddr-&amp;gt;CR26 = 0x0101FFFF;&lt;BR /&gt; ddr-&amp;gt;CR27 = 0x00010101;&lt;BR /&gt; ddr-&amp;gt;CR28 = 0x00000001;&lt;BR /&gt;// ddr-&amp;gt;CR29 = 0x00000000;&lt;BR /&gt; ddr-&amp;gt;CR30 = 0x00000001;&lt;BR /&gt; ddr-&amp;gt;CR34 = 0x00000101;&lt;BR /&gt;// ddr-&amp;gt;CR36 = 0x01010201;&lt;BR /&gt; ddr-&amp;gt;CR37 = 0x00000200;&lt;BR /&gt; ddr-&amp;gt;CR38 = 0x00200000;&lt;BR /&gt; ddr-&amp;gt;CR39 = 0x00000020;&lt;BR /&gt; ddr-&amp;gt;CR40 = 0x00002000;&lt;BR /&gt; ddr-&amp;gt;CR41 = 0x01010020;&lt;BR /&gt; ddr-&amp;gt;CR42 = 0x00002000;&lt;BR /&gt; ddr-&amp;gt;CR43 = 0x02020020;&lt;BR /&gt;// ddr-&amp;gt;CR44 = 0x00000000;&lt;BR /&gt; ddr-&amp;gt;CR45 = 0x00070b0f; &lt;BR /&gt; ddr-&amp;gt;CR46 = 0x0f004000; &lt;BR /&gt; ddr-&amp;gt;CR47 = 0x0100070b; &lt;BR /&gt; ddr-&amp;gt;CR48 = 0x0b0f0040; &lt;BR /&gt; ddr-&amp;gt;CR49 = 0x00020007; &lt;BR /&gt; ddr-&amp;gt;CR50 = 0x00000040; &lt;BR /&gt; ddr-&amp;gt;CR52 = 0x02000602; &lt;BR /&gt;// ddr-&amp;gt;CR53 = 0x03c80000;&lt;BR /&gt;// ddr-&amp;gt;CR54 = 0x03c803c8;&lt;BR /&gt;// ddr-&amp;gt;CR55 = 0x03c803c8;&lt;BR /&gt; ddr-&amp;gt;CR56 = 0x02030000;&lt;BR /&gt; ddr-&amp;gt;CR57 = 0x01000000;&lt;/P&gt;&lt;P&gt;_ASM_NOP();&lt;/P&gt;&lt;P&gt;ddr-&amp;gt;CR00 |= 0x00000001;&lt;/P&gt;&lt;P&gt;while ((ddr-&amp;gt;CR30 &amp;amp; 0x400) != 0x400) {&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;mcm-&amp;gt;CR |= MCM_CR_DDRSIZE(1); &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this setup, the problem on faulty boards is occurring much less often within a series of tests, but it is always present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hints?&lt;BR /&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Apr 2017 09:41:57 GMT</pubDate>
    <dc:creator>spiderman</dc:creator>
    <dc:date>2017-04-06T09:41:57Z</dc:date>
    <item>
      <title>K70 DDR2 read failure with increasing temperature</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-DDR2-read-failure-with-increasing-temperature/m-p/653967#M39896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using K70 controller (&lt;STRONG&gt;MK70FN1M0VMJ15&lt;/STRONG&gt; rev. &lt;STRONG&gt;3N96B&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Architecture is the same as the tower TWRK70F120 supplied by NXP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To reproduce the issue, we are running a simple test software that continues to write and read different values (0x00 to 0xff) in a loop into the whole 128 MB external RAM memory (&lt;STRONG&gt;Samsung K4T1G164QG-BCE7&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;Once the board is heated to 40 °C or more, the RAM test fails. Note that once the problem arises, the faulty reading persists with following retries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our software is using MQX 4.1.0 operating system and the DDR controller is initialized by means of &lt;STRONG&gt;_bsp_ddr2_setup&lt;/STRONG&gt; provided in init_hw.c (BSP library) module, as it is, without changes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void _bsp_ddr2_setup (void)&lt;BR /&gt;{&lt;BR /&gt; SIM_MemMapPtr sim = SIM_BASE_PTR;&lt;BR /&gt; DDR_MemMapPtr ddr = DDR_BASE_PTR;&lt;BR /&gt; MCM_MemMapPtr mcm = MCM_BASE_PTR;&lt;/P&gt;&lt;P&gt;/* Enable DDR controller clock */&lt;BR /&gt; sim-&amp;gt;SCGC3 |= SIM_SCGC3_DDR_MASK;&lt;BR /&gt; &lt;BR /&gt; /* Enable DDR pads and set slew rate */&lt;BR /&gt; sim-&amp;gt;MCR |= 0xC4; /* bits were left out of the manual so there isn't a macro right now */&lt;/P&gt;&lt;P&gt;ddr-&amp;gt;RCR |= DDR_RCR_RST_MASK;&lt;/P&gt;&lt;P&gt;* (volatile uint32_t *)(0x400Ae1ac) = 0x01030203;&lt;/P&gt;&lt;P&gt;/* TC's init */&lt;BR /&gt; ddr-&amp;gt;CR00 = 0x00000400;&lt;BR /&gt; ddr-&amp;gt;CR02 = 0x02000031;&lt;BR /&gt; ddr-&amp;gt;CR03 = 0x02020506;&lt;BR /&gt; ddr-&amp;gt;CR04 = 0x06090202;&lt;BR /&gt; ddr-&amp;gt;CR05 = 0x02020302;&lt;BR /&gt; ddr-&amp;gt;CR06 = 0x02904002;&lt;BR /&gt; ddr-&amp;gt;CR07 = 0x01000303;&lt;BR /&gt; ddr-&amp;gt;CR08 = 0x05030201;&lt;BR /&gt; ddr-&amp;gt;CR09 = 0x020000c8;&lt;BR /&gt; ddr-&amp;gt;CR10 = 0x03003207;&lt;BR /&gt; ddr-&amp;gt;CR11 = 0x01000000;&lt;BR /&gt; ddr-&amp;gt;CR12 = 0x04920031;&lt;BR /&gt; ddr-&amp;gt;CR13 = 0x00000005;&lt;BR /&gt; ddr-&amp;gt;CR14 = 0x00C80002;&lt;BR /&gt; ddr-&amp;gt;CR15 = 0x00000032;&lt;BR /&gt; ddr-&amp;gt;CR16 = 0x00000001;&lt;BR /&gt; ddr-&amp;gt;CR20 = 0x00030300;&lt;BR /&gt; ddr-&amp;gt;CR21 = 0x00040232;&lt;BR /&gt; ddr-&amp;gt;CR22 = 0x00000000;&lt;BR /&gt; ddr-&amp;gt;CR23 = 0x00040302;&lt;BR /&gt; ddr-&amp;gt;CR25 = 0x0A010201;&lt;BR /&gt; ddr-&amp;gt;CR26 = 0x0101FFFF;&lt;BR /&gt; ddr-&amp;gt;CR27 = 0x01010101;&lt;BR /&gt; ddr-&amp;gt;CR28 = 0x00000003;&lt;BR /&gt; ddr-&amp;gt;CR29 = 0x00000000;&lt;BR /&gt; ddr-&amp;gt;CR30 = 0x00000001;&lt;BR /&gt; ddr-&amp;gt;CR34 = 0x02020101;&lt;BR /&gt; ddr-&amp;gt;CR36 = 0x01010201;&lt;BR /&gt; ddr-&amp;gt;CR37 = 0x00000200;&lt;BR /&gt; ddr-&amp;gt;CR38 = 0x00200000;&lt;BR /&gt; ddr-&amp;gt;CR39 = 0x01010020;&lt;BR /&gt; ddr-&amp;gt;CR40 = 0x00002000;&lt;BR /&gt; ddr-&amp;gt;CR41 = 0x01010020;&lt;BR /&gt; ddr-&amp;gt;CR42 = 0x00002000;&lt;BR /&gt; ddr-&amp;gt;CR43 = 0x01010020;&lt;BR /&gt; ddr-&amp;gt;CR44 = 0x00000000;&lt;BR /&gt; ddr-&amp;gt;CR45 = 0x03030303;&lt;BR /&gt; ddr-&amp;gt;CR46 = 0x02006401;&lt;BR /&gt; ddr-&amp;gt;CR47 = 0x01020202;&lt;BR /&gt; ddr-&amp;gt;CR48 = 0x01010064;&lt;BR /&gt; ddr-&amp;gt;CR49 = 0x00020101;&lt;BR /&gt; ddr-&amp;gt;CR50 = 0x00000064;&lt;BR /&gt; ddr-&amp;gt;CR52 = 0x02000602;&lt;BR /&gt; ddr-&amp;gt;CR53 = 0x03c80000;&lt;BR /&gt; ddr-&amp;gt;CR54 = 0x03c803c8;&lt;BR /&gt; ddr-&amp;gt;CR55 = 0x03c803c8;&lt;BR /&gt; ddr-&amp;gt;CR56 = 0x020303c8;&lt;BR /&gt; ddr-&amp;gt;CR57 = 0x01010002;&lt;/P&gt;&lt;P&gt;_ASM_NOP();&lt;/P&gt;&lt;P&gt;ddr-&amp;gt;CR00 |= 0x00000001;&lt;/P&gt;&lt;P&gt;while ((ddr-&amp;gt;CR30 &amp;amp; 0x400) != 0x400) {&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;mcm-&amp;gt;CR |= MCM_CR_DDRSIZE(1); &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not all the boards are experiencing the problem, but roughly 60 % of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We suspect that the issue may be related to the K70 DDR controller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We tried to apply the advice in this &lt;A href="http://www.nxp.com/assets/documents/data/en/errata/KINETIS_3N96B.pdf"&gt;document&lt;/A&gt;&amp;nbsp;(erratum ID &lt;STRONG&gt;e10521&lt;/STRONG&gt;), and tried also various RCR values other than those read by the procedure explained in e10521, but with no success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update 2017-04-07:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We tried to apply a different ddr2 setup by using the output produced by Freescale's &lt;A href="http://cache.nxp.com/files/32bit/software_tools/initialization/boot_code_generation/KINETIS_K70_DDR_INIT.exe"&gt;K70memctrl&lt;/A&gt;&amp;nbsp;(we found it &lt;A _jive_internal="true" href="https://community.nxp.com/thread/429340"&gt;here&lt;/A&gt;) with the following command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;K70memctrl&amp;nbsp;&lt;/SPAN&gt;c MT47H64M16.mem ddr2setup.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and reporting the output of ddr2setup.c in our initialization function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void _bsp_ddr2_setup_modified (void)&lt;BR /&gt;{&lt;BR /&gt; SIM_MemMapPtr sim = SIM_BASE_PTR;&lt;BR /&gt; DDR_MemMapPtr ddr = DDR_BASE_PTR;&lt;BR /&gt; MCM_MemMapPtr mcm = MCM_BASE_PTR;&lt;/P&gt;&lt;P&gt;/* Enable DDR controller clock */&lt;BR /&gt; sim-&amp;gt;SCGC3 |= SIM_SCGC3_DDR_MASK;&lt;BR /&gt; &lt;BR /&gt; /* Enable DDR pads and set slew rate */&lt;BR /&gt; sim-&amp;gt;MCR |= 0xC4; /* bits were left out of the manual so there isn't a macro right now */&lt;/P&gt;&lt;P&gt;ddr-&amp;gt;RCR |= DDR_RCR_RST_MASK;&lt;/P&gt;&lt;P&gt;* (volatile uint32_t *)(0x400Ae1ac) = 0x01030203;&lt;/P&gt;&lt;P&gt;/* TC's init */&lt;BR /&gt; ddr-&amp;gt;CR00 = 0x00000400;&lt;BR /&gt; ddr-&amp;gt;CR02 = 0x02007530;&lt;BR /&gt; ddr-&amp;gt;CR03 = 0x02020707;&lt;BR /&gt; ddr-&amp;gt;CR04 = 0x07090202;&lt;BR /&gt; ddr-&amp;gt;CR05 = 0x02020302;&lt;BR /&gt; ddr-&amp;gt;CR06 = 0x00290402;&lt;BR /&gt; ddr-&amp;gt;CR07 = 0x01010303;&lt;BR /&gt; ddr-&amp;gt;CR08 = 0x06030301;&lt;BR /&gt; ddr-&amp;gt;CR09 = 0x020000c8;&lt;BR /&gt; ddr-&amp;gt;CR10 = 0x02000808;&lt;BR /&gt; ddr-&amp;gt;CR11 = 0x01000000;&lt;BR /&gt; ddr-&amp;gt;CR12 = 0x048a001e;&lt;BR /&gt; ddr-&amp;gt;CR13 = 0x00000005;&lt;BR /&gt; ddr-&amp;gt;CR14 = 0x00c70002;&lt;BR /&gt; ddr-&amp;gt;CR15 = 0x00000015;&lt;BR /&gt; ddr-&amp;gt;CR16 = 0x00000001;&lt;BR /&gt; ddr-&amp;gt;CR20 = 0x00030300;&lt;BR /&gt; ddr-&amp;gt;CR21 = 0x24040232;&lt;BR /&gt;// ddr-&amp;gt;CR22 = 0x00000000;&lt;BR /&gt;// ddr-&amp;gt;CR23 = 0x00040302;&lt;BR /&gt; ddr-&amp;gt;CR25 = 0x0A010201;&lt;BR /&gt; ddr-&amp;gt;CR26 = 0x0101FFFF;&lt;BR /&gt; ddr-&amp;gt;CR27 = 0x00010101;&lt;BR /&gt; ddr-&amp;gt;CR28 = 0x00000001;&lt;BR /&gt;// ddr-&amp;gt;CR29 = 0x00000000;&lt;BR /&gt; ddr-&amp;gt;CR30 = 0x00000001;&lt;BR /&gt; ddr-&amp;gt;CR34 = 0x00000101;&lt;BR /&gt;// ddr-&amp;gt;CR36 = 0x01010201;&lt;BR /&gt; ddr-&amp;gt;CR37 = 0x00000200;&lt;BR /&gt; ddr-&amp;gt;CR38 = 0x00200000;&lt;BR /&gt; ddr-&amp;gt;CR39 = 0x00000020;&lt;BR /&gt; ddr-&amp;gt;CR40 = 0x00002000;&lt;BR /&gt; ddr-&amp;gt;CR41 = 0x01010020;&lt;BR /&gt; ddr-&amp;gt;CR42 = 0x00002000;&lt;BR /&gt; ddr-&amp;gt;CR43 = 0x02020020;&lt;BR /&gt;// ddr-&amp;gt;CR44 = 0x00000000;&lt;BR /&gt; ddr-&amp;gt;CR45 = 0x00070b0f; &lt;BR /&gt; ddr-&amp;gt;CR46 = 0x0f004000; &lt;BR /&gt; ddr-&amp;gt;CR47 = 0x0100070b; &lt;BR /&gt; ddr-&amp;gt;CR48 = 0x0b0f0040; &lt;BR /&gt; ddr-&amp;gt;CR49 = 0x00020007; &lt;BR /&gt; ddr-&amp;gt;CR50 = 0x00000040; &lt;BR /&gt; ddr-&amp;gt;CR52 = 0x02000602; &lt;BR /&gt;// ddr-&amp;gt;CR53 = 0x03c80000;&lt;BR /&gt;// ddr-&amp;gt;CR54 = 0x03c803c8;&lt;BR /&gt;// ddr-&amp;gt;CR55 = 0x03c803c8;&lt;BR /&gt; ddr-&amp;gt;CR56 = 0x02030000;&lt;BR /&gt; ddr-&amp;gt;CR57 = 0x01000000;&lt;/P&gt;&lt;P&gt;_ASM_NOP();&lt;/P&gt;&lt;P&gt;ddr-&amp;gt;CR00 |= 0x00000001;&lt;/P&gt;&lt;P&gt;while ((ddr-&amp;gt;CR30 &amp;amp; 0x400) != 0x400) {&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;mcm-&amp;gt;CR |= MCM_CR_DDRSIZE(1); &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this setup, the problem on faulty boards is occurring much less often within a series of tests, but it is always present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hints?&lt;BR /&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 09:41:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-DDR2-read-failure-with-increasing-temperature/m-p/653967#M39896</guid>
      <dc:creator>spiderman</dc:creator>
      <dc:date>2017-04-06T09:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: K70 DDR2 read failure with increasing temperature</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-DDR2-read-failure-with-increasing-temperature/m-p/653968#M39897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://barrgroup.com/Embedded-Systems/How-To/Memory-Test-Suite-C" title="https://barrgroup.com/Embedded-Systems/How-To/Memory-Test-Suite-C"&gt;Fast Accurate Memory Test Code in C | Barr Group&lt;/A&gt;&amp;nbsp;in the comments they note about DDR2 issues of power and cross talk showing up with 0xFF/0x00 type tests. &amp;nbsp;Issues may exist at all temperatures just appear at the higher ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.ganssle.com/testingram.htm" title="http://www.ganssle.com/testingram.htm"&gt;Testing RAM&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 12:01:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-DDR2-read-failure-with-increasing-temperature/m-p/653968#M39897</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2017-04-06T12:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: K70 DDR2 read failure with increasing temperature</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-DDR2-read-failure-with-increasing-temperature/m-p/653969#M39898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For those who may be interested in, finally we &lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;found&lt;/SPAN&gt; that although there may be other settings for CR&lt;EM&gt;nn&lt;/EM&gt; registers that we need to fix, depending on our memory chip, using the Kinetis K70 DDR memory initialization tool (&lt;A class="link-titled" href="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/k-series-performance-m4/k7x-graphic-lcd/kinetis-k70-120150-mhz-high-speed-usb-ethernet-ddr-and-anti-tamper-microcontrollers-mcus-based-on-arm-cortex-m4-core:K70_120?tab=Design_Tools_Tab" title="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/k-series-performance-m4/k7x-graphic-lcd/kinetis-k70-120150-mhz-high-speed-usb-ethernet-ddr-and-anti-tamper-microcontrollers-mcus-based-on-arm-cortex-m4-core:K70_120?tab=Design_Tools_Tab"&gt;ARM Cortex-M4|Kinetis K70 120-150 MHz 32-bit MCUs|NXP&lt;/A&gt;),&amp;nbsp;what really is needed is adding a clear of some bits in the MCR:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;sim-&amp;gt;MCR &amp;amp;= 0xFFFFFF00;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before the OR operation in MQX initialization:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sim-&amp;gt;MCR |= 0xC4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It turned out that the &lt;STRONG&gt;DDRDQSDIS&lt;/STRONG&gt; bit (3rd bit) is 1 at MCU reset (Configure the DDR_DQS pins in a low power state!!!) and this is documented only in Rev. 3 of the reference manual, while according to Rev. 2 it should have been 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 13:43:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-DDR2-read-failure-with-increasing-temperature/m-p/653969#M39898</guid>
      <dc:creator>spiderman</dc:creator>
      <dc:date>2017-04-21T13:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: K70 DDR2 read failure with increasing temperature</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-DDR2-read-failure-with-increasing-temperature/m-p/653970#M39899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="" data-aligning="#src_0,#tran_0" style="color: #35a1d4 !important; background-color: rgba(255, 255, 255, 0.8); border: 0px; font-size: 12px;"&gt;We also found the same problem, &lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 15px;"&gt;&lt;STRONG&gt;sim-&amp;gt;MCR &amp;amp;= 0xFFFFFF00;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;(+80 c) after the test is normal, but (-10c) near the same problem, your side for this test?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" data-aligning="#src_1,#tran_1" style="color: #434343; background-color: #eeeeee; border: 0px; font-size: 12px;"&gt;I found DDRDQSDIS = 1 high temperature ddr data error, DDRDQSDIS = 0&amp;nbsp;low temperature(-10C) error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" data-aligning="#src_1,#tran_1" style="color: #434343; background-color: #eeeeee; border: 0px; font-size: 12px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0.8); border: 0px; color: #434343; font-size: 12px;"&gt;Finally, I by single chip microcomputer internal ADC temperature sensor, automatic adjustment, but long run time is still likely to collapse&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0.8); border: 0px; color: #434343; font-size: 12px;"&gt;&lt;SPAN&gt;Is there a better solution?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2020 07:53:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-DDR2-read-failure-with-increasing-temperature/m-p/653970#M39899</guid>
      <dc:creator>linguohui</dc:creator>
      <dc:date>2020-07-30T07:53:45Z</dc:date>
    </item>
  </channel>
</rss>

