<?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: LPC4357 EMC long-long rare fail in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-EMC-long-long-rare-fail/m-p/934938#M37271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexis,&lt;/P&gt;&lt;P&gt;   One more important data point I forgot to mention--the long-long data&lt;/P&gt;&lt;P&gt;writes and reads are aligned, address bits 2:0 are always zero for the&lt;/P&gt;&lt;P&gt;transfer.  I do see the low addresses change as expected while the transfer&lt;/P&gt;&lt;P&gt;is taking place.  The bogus 32-bit write goes to the same address as the&lt;/P&gt;&lt;P&gt;first half of the actual 64-bit write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Wed, Sep 18, 2019 at 8:22 PM Robert Morrison &amp;lt;morrisonpiano@gmail.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Sep 2019 02:37:30 GMT</pubDate>
    <dc:creator>robertmorrison</dc:creator>
    <dc:date>2019-09-19T02:37:30Z</dc:date>
    <item>
      <title>LPC4357 EMC long-long rare fail</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-EMC-long-long-rare-fail/m-p/934935#M37268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the LPC3457 208 PQFP device on a custom board.&amp;nbsp; I have written a lot of working firmware for it, but recently found a rare failure mode that I was able to trace back to the processor issuing a bad long long (64 bit) write cycle on the EMC bus.&amp;nbsp; Traces are shown below--on the good access trace, you can see two long long writes which the processor automatically breaks into two 32bit accesses.&amp;nbsp; In between are several diagnostic marker accesses (removing the diagnostic stuff has no effect on the failure mode).&amp;nbsp; In the bad access trace, which happens at the same address but only occurs after about 10000 test iterations, the second long-long write occurs, but is preceded by a bogus bad 32 bit write to the same address.&amp;nbsp; Here is the code that the emulator aborts on, note that the hw_signal trigger is off-screen to the right on the bad access trace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;// here is the first long long write
&amp;nbsp;&amp;nbsp; *(long long *)FPGA_CHAN_DATA_H = data1;&amp;nbsp;&amp;nbsp;&amp;nbsp; // This is sent on second burst cycle
&amp;nbsp;&amp;nbsp; wait_short(2);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *FPGA_MODE = 0x4;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // swap longs, reset param cnt
// detect if first write fails
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((*FPGA_NXP_TEST &amp;amp; 0xffffffff00000000) == 0)
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; param_cnt = *FPGA_MODE;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hw_signal();
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; *FPGA_MODE = 4;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // swap longs back
&amp;nbsp;&amp;nbsp; wait_short(2);
// hw_signal();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Uncomment this to show the good trace
&amp;nbsp;&amp;nbsp; *FPGA_MODE = 0x8;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // swap longs, reset param cnt

// here is the second long long write, it generates a bogus access about once
// every 10000 iterations.

&amp;nbsp;&amp;nbsp; *(long long *)FPGA_CHAN_DATA_H = data2;&amp;nbsp;&amp;nbsp;&amp;nbsp; // This is sent on second burst cycle
&amp;nbsp;&amp;nbsp; wait_short(10);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; param_cnt = *FPGA_MODE;
// detect if bad write occurs
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((*FPGA_NXP_TEST &amp;amp; 0xffffffff00000000) == 0)
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hw_signal();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hw_signal();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hw_signal();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

Has anyone seen problems with EMC long-long accesses like this?&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2019 18:03:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-EMC-long-long-rare-fail/m-p/934935#M37268</guid>
      <dc:creator>robertmorrison</dc:creator>
      <dc:date>2019-09-17T18:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4357 EMC long-long rare fail</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-EMC-long-long-rare-fail/m-p/934936#M37269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You mention that the error is present at 10000 more or less, there is an specific memory region where this module fail or this is a random location every time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know your findings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Alexis Andalon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 22:01:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-EMC-long-long-rare-fail/m-p/934936#M37269</guid>
      <dc:creator>Alexis_A</dc:creator>
      <dc:date>2019-09-18T22:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4357 EMC long-long rare fail</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-EMC-long-long-rare-fail/m-p/934937#M37270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexis,&lt;/P&gt;&lt;P&gt;   I've gotten quite a bit more data on the failure now,--at this point it&lt;/P&gt;&lt;P&gt;does look like the processor is definitely having problems doing long-long&lt;/P&gt;&lt;P&gt;writes (and possibly reads as well).  The address is fixed at 0x1c000xxx,&lt;/P&gt;&lt;P&gt;this is in a bank of 1024 adresses used as a portal into an FPGA.   I did&lt;/P&gt;&lt;P&gt;discover a pretty easy (if quite a bit slower) workaround--issuing two long&lt;/P&gt;&lt;P&gt;accesses in sequence with correctly shifted data never causes the failure,&lt;/P&gt;&lt;P&gt;I never see any extra writes with bad data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   The fail frequency is extremely variable even with no change to the&lt;/P&gt;&lt;P&gt;code--note for this test, no interrupts are enabled which should rule out&lt;/P&gt;&lt;P&gt;any interruptions to the test that might cause this fail.  Sometimes I will&lt;/P&gt;&lt;P&gt;get an extra access fail after 10 iterations, sometimes it's in the&lt;/P&gt;&lt;P&gt;millions of iterations.  The failure seems to be independent of the data&lt;/P&gt;&lt;P&gt;transferred.  The 4 layer board power/ground planes are heavily bypassed, I&lt;/P&gt;&lt;P&gt;see no indication of erratic operation for around 30000 lines of code with&lt;/P&gt;&lt;P&gt;extensive testing of all data types.  Only the long-long accesses seem to&lt;/P&gt;&lt;P&gt;somehow get confused.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Some more system data:  the chip is operating at 200Mhz core frequency&lt;/P&gt;&lt;P&gt;from an external oscillator running at 25Mhz.  The EMC bus talks to only&lt;/P&gt;&lt;P&gt;two devices, an SRAM and an FPGA, and I see no evidence of signal integrity&lt;/P&gt;&lt;P&gt;issues--other tests have run for hundreds of billions of iterations without&lt;/P&gt;&lt;P&gt;any failures.  The EMC configuration is set as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Speed up the FPGA reads and writes  (0x1c000000)&lt;/P&gt;&lt;P&gt;   LPC_EMC-&amp;gt;CONTROL  = 0x00000001;   // turn off EMC reset&lt;/P&gt;&lt;P&gt;   LPC_EMC-&amp;gt;STATICCONFIG0  = 0x00000088;   // set for 8 bit bus, enable&lt;/P&gt;&lt;P&gt;nwe, pagemode&lt;/P&gt;&lt;P&gt;   LPC_EMC-&amp;gt;STATICWAITRD0  = 0x00000004;   // UPDATE SET TO 4&lt;/P&gt;&lt;P&gt;   LPC_EMC-&amp;gt;STATICWAITPAG0 = 0x00000001;   // UPDATE SET TO 1&lt;/P&gt;&lt;P&gt;   LPC_EMC-&amp;gt;STATICWAITWR0 = 0x00000002;    // UPDATE SET TO 2&lt;/P&gt;&lt;P&gt;   LPC_EMC-&amp;gt;STATICWAITTURN0 = 0x00000003;   // 3 cycle turnaround&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2019 02:32:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-EMC-long-long-rare-fail/m-p/934937#M37270</guid>
      <dc:creator>robertmorrison</dc:creator>
      <dc:date>2019-09-19T02:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4357 EMC long-long rare fail</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-EMC-long-long-rare-fail/m-p/934938#M37271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexis,&lt;/P&gt;&lt;P&gt;   One more important data point I forgot to mention--the long-long data&lt;/P&gt;&lt;P&gt;writes and reads are aligned, address bits 2:0 are always zero for the&lt;/P&gt;&lt;P&gt;transfer.  I do see the low addresses change as expected while the transfer&lt;/P&gt;&lt;P&gt;is taking place.  The bogus 32-bit write goes to the same address as the&lt;/P&gt;&lt;P&gt;first half of the actual 64-bit write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Wed, Sep 18, 2019 at 8:22 PM Robert Morrison &amp;lt;morrisonpiano@gmail.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2019 02:37:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-EMC-long-long-rare-fail/m-p/934938#M37271</guid>
      <dc:creator>robertmorrison</dc:creator>
      <dc:date>2019-09-19T02:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4357 EMC long-long rare fail</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-EMC-long-long-rare-fail/m-p/934939#M37272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can't think of a systematic issue in the chip design, must be a rare race condition in my opinion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you shure that &lt;/P&gt;&lt;P&gt;LPC_EMC-&amp;gt;STATICCONFIG0&amp;nbsp; = 0x00000088;&lt;/P&gt;&lt;P&gt;is the right setting for the 8-bit wide FPGA access? The two bits which are set here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;PM &amp;nbsp; Page mode.&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;In page mode the EMC can burst up to four external accesses. Therefore devices with asynchronous page mode burst four or higher devices are supported. Asynchronous page mode burst two devices are not supported and must be accessed normally.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;0&amp;nbsp; Disabled (POR reset value).&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;1&amp;nbsp; Async page mode enabled (page length four).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;PB&amp;nbsp;&amp;nbsp; Byte lane state&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;The byte lane state bit, PB, enables different types of memory to be connected. For byte-wide static memories the BLSn[3:0] signal from the EMC is usually connected to WE (write enable). In this case for reads all the BLSn[3:0] bits must be HIGH. This means that the byte lane state (PB) bit must be LOW. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;16 bit wide static memory devices usually have the BLSn[3:0] signals connected to the UBn and LBn (upper byte and lower byte) signals in the static memory. In this case a write to a particular byte must assert the appropriate UBn or LBn signal LOW. For reads, all the UB and LB signals must be asserted LOW so that the bus is driven. In this case the byte lane state (PB) bit must be HIGH.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Remark: When PB is set to 0, the WE signal is undefined or 0. You must set PB to 1, to use the WE signal.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;0 &amp;nbsp; For reads all the bits in BLSn[3:0] are HIGH. For writes the respective active bits in BLSn[3:0] are LOW &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (POR reset value).&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;1&amp;nbsp;&amp;nbsp; For reads the respective active bits in BLSn[3:0] are LOW. For writes the respective active bits in BLSn[3:0] are LOW.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my opinion both bits should be 0 and not 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you be able to show the assembler code for this long-long write?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bernhard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2019 10:57:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-EMC-long-long-rare-fail/m-p/934939#M37272</guid>
      <dc:creator>bernhardfink</dc:creator>
      <dc:date>2019-09-20T10:57:54Z</dc:date>
    </item>
  </channel>
</rss>

