<?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: MC1322x: How to get memory dumps to analyze at failure state... and other tips &amp; tricks in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/MC1322x-How-to-get-memory-dumps-to-analyze-at-failure-state-and/m-p/384207#M297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of the important variables to monitor is the "MsgTrackingArray" which keeps monitoring of the internal message system. To enable this array in your code, you need to define MsgTracking_d, prior compilation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See below the information you can get from the various messages used by the system:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;typedef PACKED_STRUCT MsgTracking_tag&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t MsgAddr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Addr of Msg, not that this pointer is 4 byte bigger than&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the addr in the pool has the header of the msg is 4 bytes */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t AllocAddr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Return address of last Alloc made */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t FreeAddr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Return address of last Free made */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint16_t&amp;nbsp; AllocCounter;&amp;nbsp;&amp;nbsp; /*No of time this msg has been allocated */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint16_t&amp;nbsp; FreeCounter;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*No of time this msg has been freed */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t&amp;nbsp; AllocStatus;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*1 if currently allocated, 0 if currently free */&lt;/P&gt;&lt;P&gt;&amp;nbsp; } MsgTracking_t;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if you hav ea problem becuase of memory allocation, you can understand exactly which fucntion is injecting the problem. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Feb 2015 17:17:20 GMT</pubDate>
    <dc:creator>AlanCollins</dc:creator>
    <dc:date>2015-02-18T17:17:20Z</dc:date>
    <item>
      <title>MC1322x: How to get memory dumps to analyze at failure state... and other tips &amp; tricks</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/MC1322x-How-to-get-memory-dumps-to-analyze-at-failure-state-and/m-p/384206#M296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is possible to understand the Software state at the moment the node stops working. For this, you need to follow the next steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;Identify which node is the one that stopped.&lt;/LI&gt;&lt;LI&gt;Connect the JTAG to that node. Make sure you connect the JTAG in a way the Vdd pin is connected first, so the device won’t RESET in the process.&lt;/LI&gt;&lt;LI&gt;Open IAR 5.50 and start debugging without downloading.&lt;/LI&gt;&lt;LI&gt;Once you are in the debugger window, you need to extract/dump the memory state into a .s file. à Right click in the “Memory” window. Then choose “memory save” option.&lt;/LI&gt;&lt;LI&gt;Choose Motorola or Motorola S19 as file format. Choose the memory address window you want to save: from 0x400000 to 0x417D00, you are including all RAM memory.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now using the “.map” file, you may understand how the functions and variables were placed in the memory. This will be great help to understand what is going on within the sw stack.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 17:12:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/MC1322x-How-to-get-memory-dumps-to-analyze-at-failure-state-and/m-p/384206#M296</guid>
      <dc:creator>AlanCollins</dc:creator>
      <dc:date>2015-02-18T17:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: MC1322x: How to get memory dumps to analyze at failure state... and other tips &amp; tricks</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/MC1322x-How-to-get-memory-dumps-to-analyze-at-failure-state-and/m-p/384207#M297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of the important variables to monitor is the "MsgTrackingArray" which keeps monitoring of the internal message system. To enable this array in your code, you need to define MsgTracking_d, prior compilation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See below the information you can get from the various messages used by the system:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;typedef PACKED_STRUCT MsgTracking_tag&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t MsgAddr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Addr of Msg, not that this pointer is 4 byte bigger than&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the addr in the pool has the header of the msg is 4 bytes */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t AllocAddr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Return address of last Alloc made */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t FreeAddr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Return address of last Free made */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint16_t&amp;nbsp; AllocCounter;&amp;nbsp;&amp;nbsp; /*No of time this msg has been allocated */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint16_t&amp;nbsp; FreeCounter;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*No of time this msg has been freed */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t&amp;nbsp; AllocStatus;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*1 if currently allocated, 0 if currently free */&lt;/P&gt;&lt;P&gt;&amp;nbsp; } MsgTracking_t;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if you hav ea problem becuase of memory allocation, you can understand exactly which fucntion is injecting the problem. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 17:17:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/MC1322x-How-to-get-memory-dumps-to-analyze-at-failure-state-and/m-p/384207#M297</guid>
      <dc:creator>AlanCollins</dc:creator>
      <dc:date>2015-02-18T17:17:20Z</dc:date>
    </item>
  </channel>
</rss>

