<?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>S12 / MagniV Microcontrollers中的主题 S12x256 - ILLEGAL_BP error</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12x256-ILLEGAL-BP-error/m-p/174895#M6087</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pretty new to S12x. Seeing ILLEGAL_BP error pop up on my debug window (CodeWarrior). At that point, the Assebmly window shows reads&amp;nbsp;FF13 DEY where FF13 is the address, and DEY? I don't know...&lt;/P&gt;&lt;P&gt;When I looked into other posts that talk abou ILLEGAL_BP error, it says&lt;/P&gt;&lt;P&gt;(a) step through code until you bump into this - and I tried doing this, but it appears that it may be triggered by an interrupt which has not happened yet!&lt;/P&gt;&lt;P&gt;(b) other reason could be unhandled vector. i looked into my vector table. nothing out-of-place. In fact, the memory location FF13 is not even set to contain any vector. Its either FF12 or FF14. FF12 is set to SystemCall. I guess the exception occured at FF12 and the IP got incremented by 1, and froze at that point - right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyways, would be glad if any of you could tell me the steps to proceed to resolve the issue.&lt;/P&gt;&lt;P&gt;Oh yes, by the way, the SP (stack pointer) reads 0 (and IP=FF13). So, it is a stack corruption? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanking you all a lot for your time and &amp;nbsp;efforts to read and possibly reply to my post...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Feb 2010 10:21:47 GMT</pubDate>
    <dc:creator>DRAM</dc:creator>
    <dc:date>2010-02-11T10:21:47Z</dc:date>
    <item>
      <title>S12x256 - ILLEGAL_BP error</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12x256-ILLEGAL-BP-error/m-p/174895#M6087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pretty new to S12x. Seeing ILLEGAL_BP error pop up on my debug window (CodeWarrior). At that point, the Assebmly window shows reads&amp;nbsp;FF13 DEY where FF13 is the address, and DEY? I don't know...&lt;/P&gt;&lt;P&gt;When I looked into other posts that talk abou ILLEGAL_BP error, it says&lt;/P&gt;&lt;P&gt;(a) step through code until you bump into this - and I tried doing this, but it appears that it may be triggered by an interrupt which has not happened yet!&lt;/P&gt;&lt;P&gt;(b) other reason could be unhandled vector. i looked into my vector table. nothing out-of-place. In fact, the memory location FF13 is not even set to contain any vector. Its either FF12 or FF14. FF12 is set to SystemCall. I guess the exception occured at FF12 and the IP got incremented by 1, and froze at that point - right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyways, would be glad if any of you could tell me the steps to proceed to resolve the issue.&lt;/P&gt;&lt;P&gt;Oh yes, by the way, the SP (stack pointer) reads 0 (and IP=FF13). So, it is a stack corruption? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanking you all a lot for your time and &amp;nbsp;efforts to read and possibly reply to my post...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 10:21:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12x256-ILLEGAL-BP-error/m-p/174895#M6087</guid>
      <dc:creator>DRAM</dc:creator>
      <dc:date>2010-02-11T10:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: S12x256 - ILLEGAL_BP error</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12x256-ILLEGAL-BP-error/m-p/174896#M6088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DRAM wrote: the Assebmly window shows reads&amp;nbsp;FF13 DEY where FF13 is the address, and DEY? I don't know...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DEY is an assembly instruction that decrements the Y register.&amp;nbsp; The assembly window interprets everything as assembly instructions.&amp;nbsp; However, FF13 is an address in the vector table and usually contains an address to an interrupt service routine, not stuff that is supposed to be interpreted as code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;DRAM wrote: I guess the exception occured at FF12 and the IP got incremented by 1, and froze at that point - right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's not how interrupts on the S12X work.&amp;nbsp; I will give a very simplified example.&amp;nbsp; Let's say the TimerChannel0 interrupt is requested.&amp;nbsp; The TimerChannel0 interrupt vector is at 0xFFEE, so the S12X grabs the two-byte big-endian word starting at 0xFFEE and interprets that word (let's say 0x5000) as an address.&amp;nbsp; The PC is then set to that address (0x5000) so that the interrupt service routine (at 0x5000) starts executing.&amp;nbsp; I've left out a lot of details, but the basic point is that the interrupt vector table contains addresses, not code.&amp;nbsp; Your IP should only point to code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something else is messing with your IP value, which could be caused by tons of things, for instance mismanaging the stack and then doing a return from a subroutine or interrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, you should provide information on exactly what microcontroller you are using and if your code is written in C or assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DRAM wrote: step through code until you bump into this - and I tried doing this, but it appears that it may be triggered by an interrupt which has not happened yet!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could put breakpoints in your interrupts and single-step through your code from there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Feb 2010 22:38:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12x256-ILLEGAL-BP-error/m-p/174896#M6088</guid>
      <dc:creator>isionous</dc:creator>
      <dc:date>2010-02-16T22:38:05Z</dc:date>
    </item>
  </channel>
</rss>

