<?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中的主题 Help, COP settings</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Help-COP-settings/m-p/497307#M12209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;hi&lt;BR /&gt;I'm using HCS12 (MC9S12E256) and do not understand how are the settings of the COP to use the interrupt and how are the setting for CPU reset&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;I have to&lt;/SPAN&gt; call the interrupt when overflow COP &lt;SPAN&gt;but the CPU&lt;/SPAN&gt; &lt;SPAN&gt;is reset&lt;/SPAN&gt;&lt;/SPAN&gt; ... where am I wrong&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Mar 2016 15:38:30 GMT</pubDate>
    <dc:creator>Molibdeno</dc:creator>
    <dc:date>2016-03-22T15:38:30Z</dc:date>
    <item>
      <title>Help, COP settings</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Help-COP-settings/m-p/497307#M12209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;hi&lt;BR /&gt;I'm using HCS12 (MC9S12E256) and do not understand how are the settings of the COP to use the interrupt and how are the setting for CPU reset&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;I have to&lt;/SPAN&gt; call the interrupt when overflow COP &lt;SPAN&gt;but the CPU&lt;/SPAN&gt; &lt;SPAN&gt;is reset&lt;/SPAN&gt;&lt;/SPAN&gt; ... where am I wrong&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 15:38:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Help-COP-settings/m-p/497307#M12209</guid>
      <dc:creator>Molibdeno</dc:creator>
      <dc:date>2016-03-22T15:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help, COP settings</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Help-COP-settings/m-p/497308#M12210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi marcobarison,&lt;/P&gt;&lt;P&gt;COP watchdog do not generate the interrupt. It directly reset MCU.&lt;/P&gt;&lt;P&gt;The COP reset vector could be the same as POR reset vector. In that case, we could simply define this reset vector in prm linker file. For example:&lt;/P&gt;&lt;PRE class="jive_macro_code _jivemacro_uid_14587265914386816 jive_text_macro" data-renderedposition="86_8_1192_64"&gt;&lt;P&gt;VECTOR 0 _Startup /* POR reset vector: this is the default entry point for a C/C++ application. */&lt;/P&gt;&lt;P&gt;VECTOR 1 _Startup /* CM reset vector: this is the default entry point for a C/C++ application. */&lt;/P&gt;&lt;P&gt;VECTOR 2 _Startup /* COP reset vector: this is the default entry point for a C/C++ application. */&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;If we want different startup code than startup for power on, we could define COP reset vector similar way how interrupt. For example:&lt;/P&gt;&lt;PRE class="jive_macro_code jive_text_macro _jivemacro_uid_14587266010905650" data-renderedposition="176_8_1192_288"&gt;&lt;P&gt;//******************************************************************************&lt;/P&gt;&lt;P&gt;// COP reset&lt;/P&gt;&lt;P&gt;//******************************************************************************&lt;/P&gt;&lt;P&gt;#pragma CODE_SEG NON_BANKED&lt;/P&gt;&lt;P&gt;interrupt 2 void COP_ISR(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DDRA = 0xff;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTA = 0x00;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //LEDs on - show we entered the COP_ISR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0; i&amp;lt;60000; i++)&amp;nbsp; //delay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm nop;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTA = 0xff;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm jmp _Startup;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //jump to power-on reset vector&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // !!! RTI instruction cannot be executed because this is not interrupt !!!&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;#pragma CODE_SEG DEFAULT&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Note: detection of COP reset depends also on capacitance on RESET pin. For more details please look at &lt;/SPAN&gt;&lt;A class="jive-link-wiki-small" data-containerid="11493" data-containertype="14" data-objectid="103737" data-objecttype="102" href="https://community.freescale.com/docs/DOC-103737" rel="nofollow noopener noreferrer" target="_blank"&gt;https://community.freescale.com/docs/DOC-103737&lt;/A&gt;&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>Wed, 23 Mar 2016 09:50:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Help-COP-settings/m-p/497308#M12210</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2016-03-23T09:50:37Z</dc:date>
    </item>
  </channel>
</rss>

