<?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: Can't disable COP properly on SPYDER in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Can-t-disable-COP-properly-on-SPYDER/m-p/179955#M12972</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;Unfortunately, your code has been pared down to the extent that the main() function can exit.&amp;nbsp; This is not allowed. You will need to add the following infinite loop code within the function to ensure the function does not exit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;f&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;or ( ; ; ) {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 Feb 2010 07:59:54 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2010-02-28T07:59:54Z</dc:date>
    <item>
      <title>Can't disable COP properly on SPYDER</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Can-t-disable-COP-properly-on-SPYDER/m-p/179952#M12969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of the SPYDER demo programs has this line of code to disable the COP:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SOPT1 &amp;amp;= 0x7F;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That demo program runs fine. &amp;nbsp;But when I try that same line of code in my program, I keep getting the error "Lost communication with the target device". &amp;nbsp;I don't see anything else in the demo program that pertains to disabling the COP. &amp;nbsp;Why isn't my program working? &amp;nbsp;I have pared down the program to simply disable the COP and then turn on the LED, but it still doesn't work. &amp;nbsp;Here is the entire program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;#include &amp;lt;hidef.h&amp;gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;#include "derivative.h"&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;void main(void) {&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;EnableInterrupts;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;SOPT1 &amp;amp;= 0x7F;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;PTADD = 0x01;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;PTAD = 0x01;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Feb 2010 23:55:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Can-t-disable-COP-properly-on-SPYDER/m-p/179952#M12969</guid>
      <dc:creator>Johnnymysto</dc:creator>
      <dc:date>2010-02-27T23:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can't disable COP properly on SPYDER</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Can-t-disable-COP-properly-on-SPYDER/m-p/179953#M12970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello and welcome to the fora,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Generally the problem here is that SOPT is a "write once" register. It only accepts the first attempt to write to it and ignores all others. The problem probably is that it is being written to before you get to it and your write is ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Feb 2010 03:00:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Can-t-disable-COP-properly-on-SPYDER/m-p/179953#M12970</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2010-02-28T03:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can't disable COP properly on SPYDER</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Can-t-disable-COP-properly-on-SPYDER/m-p/179954#M12971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Peg! &amp;nbsp;Where would be a better place to put the SOPT write command?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Feb 2010 03:18:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Can-t-disable-COP-properly-on-SPYDER/m-p/179954#M12971</guid>
      <dc:creator>Johnnymysto</dc:creator>
      <dc:date>2010-02-28T03:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can't disable COP properly on SPYDER</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Can-t-disable-COP-properly-on-SPYDER/m-p/179955#M12972</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;Unfortunately, your code has been pared down to the extent that the main() function can exit.&amp;nbsp; This is not allowed. You will need to add the following infinite loop code within the function to ensure the function does not exit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;f&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;or ( ; ; ) {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Feb 2010 07:59:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Can-t-disable-COP-properly-on-SPYDER/m-p/179955#M12972</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-02-28T07:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can't disable COP properly on SPYDER</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Can-t-disable-COP-properly-on-SPYDER/m-p/179956#M12973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did it - thanks bigmac!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 01:42:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Can-t-disable-COP-properly-on-SPYDER/m-p/179956#M12973</guid>
      <dc:creator>Johnnymysto</dc:creator>
      <dc:date>2010-03-02T01:42:33Z</dc:date>
    </item>
  </channel>
</rss>

