<?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: [MPC5744P]how to use the debug registers to realize the &amp;quot;stack limit checking mechanism &amp;quot; in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648393#M6679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much! hope to hear good news from you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Dec 2016 04:25:07 GMT</pubDate>
    <dc:creator>fyw</dc:creator>
    <dc:date>2016-12-13T04:25:07Z</dc:date>
    <item>
      <title>[MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648388#M6674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The debug register configure code list below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="170875_170875.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122599iC970592523DE1EC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="170875_170875.png" alt="170875_170875.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9182iE6B6D4E3B94A6FA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i use the &lt;EM&gt;&lt;STRONG&gt;Generate_Stack_error()&lt;/STRONG&gt; &lt;/EM&gt;function to test this stack checking mechanism, but nothing happened!&amp;nbsp; i wonder what's wrong with my code?&amp;nbsp;&amp;nbsp; Thank you very much!&lt;/P&gt;&lt;P&gt;PS:(__STACK_SIZE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 4096 )&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="170882_170882.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122600iEF18E05861D4EC4E/image-size/large?v=v2&amp;amp;px=999" role="button" title="170882_170882.png" alt="170882_170882.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9269i244040258A8BA690/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2016 08:02:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648388#M6674</guid>
      <dc:creator>fyw</dc:creator>
      <dc:date>2016-12-05T08:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: [MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648389#M6675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anyone help that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 07:41:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648389#M6675</guid>
      <dc:creator>fyw</dc:creator>
      <dc:date>2016-12-06T07:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: [MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648390#M6676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have never tried this before, but I found, there is DAC1 and DAC2 settings in DBCR0 register. DAC1 and DAC2 should be set to 0x3, please look at the figures below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12295i13DAEC58D1D826BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12341iED0041B8284F1080/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try and let me know, if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 12:18:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648390#M6676</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2016-12-06T12:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: [MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648391#M6677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i tried, but it seems do not work. &lt;/P&gt;&lt;P&gt;PS: i expect when run&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Generate_Stack_error()&lt;/STRONG&gt;&amp;nbsp; &lt;/EM&gt;function, the machinecheck_handler will happen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 01:57:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648391#M6677</guid>
      <dc:creator>fyw</dc:creator>
      <dc:date>2016-12-07T01:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: [MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648392#M6678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for delay, I did not forget about this case, but I am little bit overloaded right now. I will try to create some simple example as soon as I have some time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 20:46:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648392#M6678</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2016-12-12T20:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: [MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648393#M6679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much! hope to hear good news from you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 04:25:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648393#M6679</guid>
      <dc:creator>fyw</dc:creator>
      <dc:date>2016-12-13T04:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: [MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648394#M6680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin, have you tried this ?&amp;nbsp; Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2017 00:52:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648394#M6680</guid>
      <dc:creator>fyw</dc:creator>
      <dc:date>2017-01-03T00:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: [MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648395#M6681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am really sorry, but I was working on different projects. I will try to focus on this problem today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2017 09:26:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648395#M6681</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-01-03T09:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: [MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648396#M6682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you use debugger probe while you run the code you shared above? If yes, which debug probe you use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found two important points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Implicitly, it is not possible to write to debug registers while debugger is attached.&lt;/P&gt;&lt;P&gt;2) The function Generate_Stack_error generates Machine check error by default, because you allocate more memory space than stack size is. The result of this allocation is Machine check exception before the first for loop is executed. Instruction stwux write to address 0x13fffff80 which is out of address range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check, if you have set ME bit in MSR register, if yes, you have to see machine check exception. If not, set ME in MSR register.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4286i562BDDB82D4A6353/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution for the point two:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must not allocate static array in the function and use pointer arithmetic instead of it. Check, if any machine check error does not occur while you have debug probe connected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the next step, add your assembler code and also DBCR0 settings. Disconnect the debug probe, and run the code. Then attach to micro via debugger and check, if you are in IVOR1 exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2017 13:42:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648396#M6682</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-01-03T13:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: [MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648397#M6683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6373i5A2C423C332BACD9/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp; Martin:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;The PIC above the the read value from register.&amp;nbsp; Is there &lt;EM&gt;&lt;STRONG&gt;any wrong for the register's configuration&lt;/STRONG&gt;&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;I didn't run my program&amp;nbsp;using the debugger. It is running in normal mode(Powerdown--&amp;gt;PowerUP----&amp;gt;RUN)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: in my program if the cpu enter IVOR1 interrupt. It will print something to the computer. But whatever i configure, the program run as Nothing happened.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2017 02:19:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648397#M6683</guid>
      <dc:creator>fyw</dc:creator>
      <dc:date>2017-01-06T02:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: [MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648398#M6684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Problem solved! It seems configure DBCR2 = 0xC0 0000 will work. Thank you very much!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 02:46:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648398#M6684</guid>
      <dc:creator>fyw</dc:creator>
      <dc:date>2017-01-10T02:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: [MPC5744P]how to use the debug registers to realize the "stack limit checking mechanism "</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648399#M6685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are implementing a stack limit check for our MPC5744P based system. We are following the example above and plan to test the functionality using a function like&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;Generate_Stack_error()&lt;/SPAN&gt; above. You mention that the function Generate_Stack_error() should be modified so that pointer arithmetic is used instead. Can you please show how the function would look like after such a modification?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Peder Rogö&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2018 14:07:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p/648399#M6685</guid>
      <dc:creator>pederrogo</dc:creator>
      <dc:date>2018-07-12T14:07:54Z</dc:date>
    </item>
  </channel>
</rss>

