<?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: Set a watchpoint to break on interrupts enabled/disabled in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193676#M7050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On "Controlpoints Configuration" form, Watchpoints tab, there are few fields I need to specify to create a watchpoint:&lt;/P&gt;&lt;P&gt;1. "Address" - what do I specify as an address for status (SR or CCR) register? it is not mapped in memory.&lt;/P&gt;&lt;P&gt;2. "Condition" - I need something like "CCR &amp;amp; 0x08" to trigger the watchpoint on I (global interrupts mask) bit set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jun 2009 21:39:52 GMT</pubDate>
    <dc:creator>roman_g</dc:creator>
    <dc:date>2009-06-25T21:39:52Z</dc:date>
    <item>
      <title>Set a watchpoint to break on interrupts enabled/disabled</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193674#M7048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to stop debugging when global interrupts bit changes (HCS08).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I do that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 22:53:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193674#M7048</guid>
      <dc:creator>roman_g</dc:creator>
      <dc:date>2009-06-24T22:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set a watchpoint to break on interrupts enabled/disabled</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193675#M7049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set a watchpoint on the register.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 20:55:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193675#M7049</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2009-06-25T20:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set a watchpoint to break on interrupts enabled/disabled</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193676#M7050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On "Controlpoints Configuration" form, Watchpoints tab, there are few fields I need to specify to create a watchpoint:&lt;/P&gt;&lt;P&gt;1. "Address" - what do I specify as an address for status (SR or CCR) register? it is not mapped in memory.&lt;/P&gt;&lt;P&gt;2. "Condition" - I need something like "CCR &amp;amp; 0x08" to trigger the watchpoint on I (global interrupts mask) bit set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 21:39:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193676#M7050</guid>
      <dc:creator>roman_g</dc:creator>
      <dc:date>2009-06-25T21:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set a watchpoint to break on interrupts enabled/disabled</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193677#M7051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Watchpoinits on registers are not supported for efficiency reasons, so that wont work :smileysad:.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 22:20:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193677#M7051</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2009-06-25T22:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set a watchpoint to break on interrupts enabled/disabled</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193678#M7052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, so here's where I try to extract myself gracefully from giving a bogus answer. Poll the register's contents, placing a copy into memory. Set a watchpoint on that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 22:55:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193678#M7052</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2009-06-26T22:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set a watchpoint to break on interrupts enabled/disabled</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193679#M7053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to detect interrupts being disabled, so I can't use interrupts for polling.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you suggest using BDC?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 23:35:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193679#M7053</guid>
      <dc:creator>roman_g</dc:creator>
      <dc:date>2009-06-26T23:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set a watchpoint to break on interrupts enabled/disabled</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193680#M7054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I presume that the reason the I-bit becomes set is because you have commenced an interrupt process.&amp;nbsp; Otherwise, the flag would need to be explicitly set and cleared from within your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It might be possible to add some test code, as previously suggested, at the start of each ISR so that a break would occur when any ISR was entered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What sort of problem are you trying to debug?&amp;nbsp; Do you have normal functions that are setting the flag, and then not re-enabling interrupts?&amp;nbsp; Perhaps you are attempting to implement nested interrupts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jun 2009 04:07:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193680#M7054</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-06-27T04:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set a watchpoint to break on interrupts enabled/disabled</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193681#M7055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I got a load of spaghetti code, and I suspect somewhere in that code an interrupt gets enabled. Textual search came back empty, perhaps because there is more than one way to set I-bit (sei, tap, macros)&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jun 2009 04:28:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193681#M7055</guid>
      <dc:creator>roman_g</dc:creator>
      <dc:date>2009-06-27T04:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set a watchpoint to break on interrupts enabled/disabled</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193682#M7056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume that your "spaghetti code" is actually written in assembly language.&amp;nbsp; Is this correct?&amp;nbsp; It is not entirely clear whether your problem is that interrupts become globally enabled when they should not, or whether interrupts are being globally disabled and not re-enabled.&amp;nbsp; (Setting the I-bit disables interrupts.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A common cause for interrupts to become enabled when they should not might be due to interrupts being disabled within a sub-routine.&amp;nbsp; The software author then assumes that interrupts were previously enabled, so erroneously re-enables interrupts prior to exiting the sub-routine.&amp;nbsp; Be wary of the use of any CLI instructions within the code.&amp;nbsp; Apart from the enabling of interrupts during initialisation, I presume that there would be little need for use of the instruction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If interupts need to be temporarily disabled within a sub-routine, the method I would normally use would be -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; TPA&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; PSHA&amp;nbsp;&amp;nbsp; ; Status register value to stack&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; SEI&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Disable interrupts&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; ; Critical code here&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; PULA&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; TAP&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Restore prior state&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I guess that you will need to write the special test code for de-bugging as a macro, and then selectively incorporate the macro within each sub-routine, just prior to exiting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jun 2009 22:44:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Set-a-watchpoint-to-break-on-interrupts-enabled-disabled/m-p/193682#M7056</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-06-28T22:44:25Z</dc:date>
    </item>
  </channel>
</rss>

