<?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: Reseting the K64 chip programatically in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Reseting-the-K64-chip-programatically/m-p/302603#M9712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;I tried your code and it worked using MQX4.1 with the MQX/examples/event project for TWR-K64F120M.&lt;/P&gt;&lt;P&gt;I did have to change the variable&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1396015873601673" jivemacro_uid="_1396015873601673"&gt;
&lt;P&gt;temp_AIRCR = (UINT)scb-&amp;gt;AIRCR;&amp;nbsp;&amp;nbsp; //Read AIRCR register&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as I didn't have UINT defined so made it uint32_t.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My terminal output looks like:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_13960158735777459 jive_text_macro jive_macro_code" jivemacro_uid="_13960158735777459"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Starting event examp&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;le:&lt;/SPAN&gt;&lt;/P&gt;
&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;
&lt;P&gt; Tick 0&lt;/P&gt;
&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;
&lt;P&gt; Tick 1&lt;/P&gt;
&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;
&lt;P&gt; Tick 2&lt;/P&gt;

&lt;P&gt; Tick 3&lt;/P&gt;

&lt;P&gt; Tick 4&lt;/P&gt;

&lt;P&gt; Tick 5&lt;/P&gt;

&lt;P&gt; Tick 6&lt;/P&gt;

&lt;P&gt; Tick 7&lt;/P&gt;

&lt;P&gt; Tick 8&lt;/P&gt;

&lt;P&gt; Tick 9&lt;/P&gt;

&lt;P&gt; Tick 10&lt;/P&gt;
&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Times New Roman;"&gt; &lt;/SPAN&gt;
&lt;P&gt;Starting event example:&lt;/P&gt;
&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;
&lt;P&gt; Tick 0&lt;/P&gt;

&lt;P&gt; Tick 1&lt;/P&gt;

&lt;P&gt; Tick 2&lt;/P&gt;

&lt;P&gt; Tick 3&lt;/P&gt;
&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;File attached (event.c).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Mar 2014 14:09:59 GMT</pubDate>
    <dc:creator>DavidS</dc:creator>
    <dc:date>2014-03-28T14:09:59Z</dc:date>
    <item>
      <title>Reseting the K64 chip programatically</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Reseting-the-K64-chip-programatically/m-p/302601#M9710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone&lt;/P&gt;&lt;P&gt;We were previously working on K60M512Z chip and the following code worked perfect for reseting the device programatically:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void deviceReset(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; VCORTEX_SCB_STRUCT_PTR scb = (VCORTEX_SCB_STRUCT_PTR)&amp;amp;(((CORTEX_SCS_STRUCT_PTR)CORTEX_PRI_PERIPH_IN_BASE)-&amp;gt;SCB);&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t temp_AIRCR=0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; temp_AIRCR = (UINT)scb-&amp;gt;AIRCR;&amp;nbsp;&amp;nbsp; //Read AIRCR register&lt;/P&gt;&lt;P&gt;&amp;nbsp; temp_AIRCR &amp;amp;= 0x0000ffff;&amp;nbsp;&amp;nbsp; //DES mask of the top 16-bits&lt;/P&gt;&lt;P&gt;&amp;nbsp; temp_AIRCR |= 0x05Fa0000;&amp;nbsp;&amp;nbsp; //DES When writing to AIRCR the update 16-bit must be "0x05FA" per ARMv7-M Architecture Reference Manual (must register on ARM.com to get)&lt;/P&gt;&lt;P&gt;&amp;nbsp; temp_AIRCR |= SCB_AIRCR_SYSRESETREQ_MASK;&amp;nbsp;&amp;nbsp; //DES set the SYSRESETREQ bit to generate software reset&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; // Reboot...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; _time_delay (50);&lt;/P&gt;&lt;P&gt;&amp;nbsp; scb-&amp;gt;AIRCR = temp_AIRCR;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for(;;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; return;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however im testing the same code with K64 chip (&lt;STRONG style="color: #51626f; font-family: arial, sans-serif; font-size: 12px; background-color: #f5f5f5;"&gt;MK64FN1M0VLQ12) and its not causing the reset anymore.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f; font-family: arial, sans-serif; font-size: 12px; background-color: #f5f5f5;"&gt;Both setups are using MQX 4.1.0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f; font-family: arial, sans-serif; font-size: 12px; background-color: #f5f5f5;"&gt;Can anyone shed any light on whats wrong?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f; font-family: arial, sans-serif; font-size: 12px; background-color: #f5f5f5;"&gt;thank you in advance&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 15:10:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Reseting-the-K64-chip-programatically/m-p/302601#M9710</guid>
      <dc:creator>igor-imx</dc:creator>
      <dc:date>2014-03-24T15:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reseting the K64 chip programatically</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Reseting-the-K64-chip-programatically/m-p/302602#M9711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try using next instruction:&lt;/P&gt;&lt;P&gt;SCB_AIRCR = 0x05FA0004;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 01:17:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Reseting-the-K64-chip-programatically/m-p/302602#M9711</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2014-03-28T01:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reseting the K64 chip programatically</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Reseting-the-K64-chip-programatically/m-p/302603#M9712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;I tried your code and it worked using MQX4.1 with the MQX/examples/event project for TWR-K64F120M.&lt;/P&gt;&lt;P&gt;I did have to change the variable&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1396015873601673" jivemacro_uid="_1396015873601673"&gt;
&lt;P&gt;temp_AIRCR = (UINT)scb-&amp;gt;AIRCR;&amp;nbsp;&amp;nbsp; //Read AIRCR register&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as I didn't have UINT defined so made it uint32_t.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My terminal output looks like:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_13960158735777459 jive_text_macro jive_macro_code" jivemacro_uid="_13960158735777459"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Starting event examp&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;le:&lt;/SPAN&gt;&lt;/P&gt;
&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;
&lt;P&gt; Tick 0&lt;/P&gt;
&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;
&lt;P&gt; Tick 1&lt;/P&gt;
&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;
&lt;P&gt; Tick 2&lt;/P&gt;

&lt;P&gt; Tick 3&lt;/P&gt;

&lt;P&gt; Tick 4&lt;/P&gt;

&lt;P&gt; Tick 5&lt;/P&gt;

&lt;P&gt; Tick 6&lt;/P&gt;

&lt;P&gt; Tick 7&lt;/P&gt;

&lt;P&gt; Tick 8&lt;/P&gt;

&lt;P&gt; Tick 9&lt;/P&gt;

&lt;P&gt; Tick 10&lt;/P&gt;
&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Times New Roman;"&gt; &lt;/SPAN&gt;
&lt;P&gt;Starting event example:&lt;/P&gt;
&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;
&lt;P&gt; Tick 0&lt;/P&gt;

&lt;P&gt; Tick 1&lt;/P&gt;

&lt;P&gt; Tick 2&lt;/P&gt;

&lt;P&gt; Tick 3&lt;/P&gt;
&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;File attached (event.c).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 14:09:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Reseting-the-K64-chip-programatically/m-p/302603#M9712</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2014-03-28T14:09:59Z</dc:date>
    </item>
  </channel>
</rss>

