<?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>LPC MicrocontrollersのトピックRe: LPC824 MTB (Micro Trace Buffer) in standalone mode</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569525#M17956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by vtw.433e on Wed Apr 20 10:15:23 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you reserved 256 words for the trace buffer? i.e. it is not used by anything else, so avoids the possibility of it being overwritten.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:11:52 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:11:52Z</dc:date>
    <item>
      <title>LPC824 MTB (Micro Trace Buffer) in standalone mode</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569524#M17955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mariusz.mpicosys on Tue Apr 19 22:44:27 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to use MTB on LPC824 in standalone mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The idea is to activate MTB on power up and then output the buffer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;using UART when some unexpected event happens like hard fault.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The initialization looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#if !defined (__MTB_DISABLE)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_MTB);
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_MTB-&amp;gt;MASTER = 0x00000000UL;
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_MTB-&amp;gt;POSITION = 0x00000000UL;
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_MTB-&amp;gt;FLOW = 0x00000000UL;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // __MTB_BUFFER_SIZE == 256
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_MTB-&amp;gt;MASTER = MTB_MASTER_EN | (8UL - 4UL);
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_SYSCON-&amp;gt;EXTTRACECMD = (1 &amp;lt;&amp;lt; 0)
#endif
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All seems okay. I can see the POSITION register increment and some values&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;written at addresses 0x10000000-0x100000FF. The problem is that there are gaps&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the branching history. Running the code in debug mode or just attaching via SWD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fixes the situation until next power off. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this expected behavior?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can fix this problem without attaching a programmer via SWD?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mariusz&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:11:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569524#M17955</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: LPC824 MTB (Micro Trace Buffer) in standalone mode</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569525#M17956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by vtw.433e on Wed Apr 20 10:15:23 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you reserved 256 words for the trace buffer? i.e. it is not used by anything else, so avoids the possibility of it being overwritten.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:11:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569525#M17956</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: LPC824 MTB (Micro Trace Buffer) in standalone mode</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569526#M17957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mariusz.mpicosys on Wed Apr 20 21:57:07 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I'm sure that the buffer has proper size and it's not used by anything else. As I wrote, the problem does not occur after an SWD attach. It also looks like the values that are wrong, are the values from a previous sweep i.e. they are valid addresses that match the program execution order.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:11:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569526#M17957</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: LPC824 MTB (Micro Trace Buffer) in standalone mode</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569527#M17958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Thu Apr 21 09:54:07 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Mariusz,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm afraid that this is expected behavior. The MTB is designed to be used in debug mode. When running standalone the SRAM clocking is optimized to be turned off where there is no activity detected to save power. MTB activity is not included in this consideration, therefore you get dropped packets when the MTB tries to write to unclocked SRAM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By entering debug mode by attaching or running in debug this power optimization is disabled and so no packets get dropped.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately you can't enable debug mode from software, it can only be enabled via the Debug Access Port (eg the SWD connection). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try and find out is there is any other way to prevent the SRAM from getting unclocked (although this will increase the power usage).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ciao,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso Support.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:11:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569527#M17958</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: LPC824 MTB (Micro Trace Buffer) in standalone mode</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569528#M17959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mariusz.mpicosys on Thu Apr 21 15:22:08 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the confirmation. This is somewhat inconvenient. On some boards the SWD pins are not available (their function changed) and MTB is very useful in investigating unexpected software behavior. The CoreSight MTB document describes four signals - DBGEN, NIDEN, HSELSFR and HSELRAM - that potentially could influence the MTB block activation/functioning. Specially the two last ones:&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;The memory regions are selected by the&lt;BR /&gt;HSELSFR and HSELRAM inputs respectively. Only one of these select inputs can be HIGH&lt;BR /&gt;at a time. If they are both HIGH at the same time the behavior is UNPREDICTABLE.&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enabling proper MTB activation from software would be very nice feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Help regarding this topic is greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mariusz&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:11:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569528#M17959</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: LPC824 MTB (Micro Trace Buffer) in standalone mode</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569529#M17960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 01:08:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-MTB-Micro-Trace-Buffer-in-standalone-mode/m-p/569529#M17960</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-19T01:08:53Z</dc:date>
    </item>
  </channel>
</rss>

