<?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のトピックRe: how to debug illegal_bp</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-debug-illegal-bp/m-p/509173#M12409</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &amp;amp;#23815;&amp;amp;#38160; &amp;amp;#21346;,&lt;/P&gt;&lt;P&gt;In fact, the illegal_bp means that debugger gets lost. A typical case is unexpected interrupt or reset of MCU.&lt;/P&gt;&lt;P&gt;1. Please disconnect external watchdog RESET and disable internal watchdog if any used.&lt;/P&gt;&lt;P&gt;2. Please check voltage levels at IRQ, XIRQ pins. There should be logical 1 (e.g. 5V).&lt;/P&gt;&lt;P&gt;3. Use attached interrupt catcher example code for detection of unexpected interrupts.&lt;/P&gt;&lt;P&gt;Interrupt catcher you can use for debugging or directly in your software. Few general notes:&lt;/P&gt;&lt;P&gt;a) You should replace lines for expected interrupt by your interrupts routines as in an example of SCI0 interrupt routine.&lt;/P&gt;&lt;P&gt;b) All interrupt vectors are only 16bit addresses, therefore, all your interrupt routines must be placed in non banked memory (for example by #pragma commands)&lt;/P&gt;&lt;P&gt;c) Interrupt number 0 presents POR reset vector, 1 is CM reset, 2 is COP reset, … , 119 is Spurious Interrupt. Interrupt number = (0xFE-Vector Address)/2. See Table Interrupt Vector Locations at RM. For Example: Interrupt number of SCI0 = (0xFE-D6)/2 = 0x14 = 20.&lt;/P&gt;&lt;P&gt;4. Please check the stability of your bus clock (ECLK pin) and stability of power supply voltage(s).&lt;/P&gt;&lt;P&gt;5. Please check stack usage for stack overflow – this is my personal tip for a potential root cause. You could simply try increase stack (in prm file) or use watermark technique - reset MCU, fill RAM at the stack by some known pattern, let the code run and check how big part of the stack was used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Apr 2016 11:12:51 GMT</pubDate>
    <dc:creator>RadekS</dc:creator>
    <dc:date>2016-04-18T11:12:51Z</dc:date>
    <item>
      <title>how to debug illegal_bp</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-debug-illegal-bp/m-p/509172#M12408</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="146054_146054.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121388i449351DDE7F39BDB/image-size/large?v=v2&amp;amp;px=999" role="button" title="146054_146054.png" alt="146054_146054.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/32609i15E4EE683130DE29/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;when the file"MY_ADC.TXT"is not exist,the program run normal. but when than file is exist,illegal_bp come out and my 128 reset.&lt;/P&gt;&lt;P&gt;but when I only do CH376FileCreate(/*a Name*/),this program run regular,so I think there is nothing wrong with this function.&lt;/P&gt;&lt;P&gt;follow is the code of Openfile&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="146055_146055.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121389iA6241D39341407CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="146055_146055.png" alt="146055_146055.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/32615i8B2B00249D812DB8/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="146056_146056.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121390i7081566C8712A2F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="146056_146056.png" alt="146056_146056.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/32335i5E561FDEBB3A62A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="146057_146057.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121391i707D7B5D586BEDC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="146057_146057.png" alt="146057_146057.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/32617iF6A3F0DC4B6BB6B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="146058_146058.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121392i112D9AD348028C33/image-size/large?v=v2&amp;amp;px=999" role="button" title="146058_146058.png" alt="146058_146058.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/32351i9BBDE430949A0675/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="146059_146059.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121393i9EF7AF6BAB7DA5E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="146059_146059.png" alt="146059_146059.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/32408iE9BADCAD965BC714/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="146060_146060.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121394i44CF6B91498A7CD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="146060_146060.png" alt="146060_146060.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/32435i51F8F08BB10E3ACD/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_6.png" alt="pastedImage_6.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="146061_146061.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121395iBFD87C0A7D323325/image-size/large?v=v2&amp;amp;px=999" role="button" title="146061_146061.png" alt="146061_146061.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/32484iDA5A61CBC31BE4B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;those functions dosent have interrupt. I dont know why do the file create after file open the program will illegal_bp.&lt;/P&gt;&lt;P&gt;and Can I send some commands in Command window to find where is wrong?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="146062_146062.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121396iAEE91EC560481957/image-size/large?v=v2&amp;amp;px=999" role="button" title="146062_146062.png" alt="146062_146062.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_8.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/32509i2864D218B5B168D8/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_8.png" alt="pastedImage_8.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338695"&gt;xs128_ch376s.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2016 15:42:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-debug-illegal-bp/m-p/509172#M12408</guid>
      <dc:creator>xianyu</dc:creator>
      <dc:date>2016-04-15T15:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to debug illegal_bp</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-debug-illegal-bp/m-p/509173#M12409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &amp;amp;#23815;&amp;amp;#38160; &amp;amp;#21346;,&lt;/P&gt;&lt;P&gt;In fact, the illegal_bp means that debugger gets lost. A typical case is unexpected interrupt or reset of MCU.&lt;/P&gt;&lt;P&gt;1. Please disconnect external watchdog RESET and disable internal watchdog if any used.&lt;/P&gt;&lt;P&gt;2. Please check voltage levels at IRQ, XIRQ pins. There should be logical 1 (e.g. 5V).&lt;/P&gt;&lt;P&gt;3. Use attached interrupt catcher example code for detection of unexpected interrupts.&lt;/P&gt;&lt;P&gt;Interrupt catcher you can use for debugging or directly in your software. Few general notes:&lt;/P&gt;&lt;P&gt;a) You should replace lines for expected interrupt by your interrupts routines as in an example of SCI0 interrupt routine.&lt;/P&gt;&lt;P&gt;b) All interrupt vectors are only 16bit addresses, therefore, all your interrupt routines must be placed in non banked memory (for example by #pragma commands)&lt;/P&gt;&lt;P&gt;c) Interrupt number 0 presents POR reset vector, 1 is CM reset, 2 is COP reset, … , 119 is Spurious Interrupt. Interrupt number = (0xFE-Vector Address)/2. See Table Interrupt Vector Locations at RM. For Example: Interrupt number of SCI0 = (0xFE-D6)/2 = 0x14 = 20.&lt;/P&gt;&lt;P&gt;4. Please check the stability of your bus clock (ECLK pin) and stability of power supply voltage(s).&lt;/P&gt;&lt;P&gt;5. Please check stack usage for stack overflow – this is my personal tip for a potential root cause. You could simply try increase stack (in prm file) or use watermark technique - reset MCU, fill RAM at the stack by some known pattern, let the code run and check how big part of the stack was used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2016 11:12:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-debug-illegal-bp/m-p/509173#M12409</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2016-04-18T11:12:51Z</dc:date>
    </item>
  </channel>
</rss>

