<?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: Code get reset when i tried to run small application please help me to solve this issue in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209989#M17954</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Is COP reset enabled? If yes, then could it timeout?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Could&amp;nbsp;you somehow&amp;nbsp;read&amp;nbsp;contents&amp;nbsp;of&amp;nbsp;SRS after reset? Enetering BDM mode can alter SRS, so maybe send SRS over SCI, show it on MCU pins. Or just copy to not used RAM locations, then read copy in RAM via&amp;nbsp;BDM.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Dec 2008 15:41:13 GMT</pubDate>
    <dc:creator>kef</dc:creator>
    <dc:date>2008-12-16T15:41:13Z</dc:date>
    <item>
      <title>Code get reset when i tried to run small application please help me to solve this issue - MC9S08AC128</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209986#M17951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Dear All,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am using the MC9S08AC128 Simulator. I am using the Special edition Code warrior&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have created a project with IEEE32 Floating support enabled.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have small piece of code which will calculate the distunce between two coardinates of the Earth.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am using library functions like sinf, cosf, atan2f.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;..............&lt;/DIV&gt;&lt;DIV&gt;................. &lt;SPAN style="color: #ff0000;"&gt;some Declarations here all are float values&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;....................&amp;nbsp;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;line1.&lt;/SPAN&gt; &amp;nbsp; sin2lat = sinf(Dlat2Rad/2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;....................&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;line2.&lt;/SPAN&gt;&amp;nbsp; sin2lng = sinf(DLng2Rad/2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;......................................&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;line3&lt;/SPAN&gt;.&amp;nbsp; a = sin2lat + cosf(Lat1Rad) * cosf(Lat2Rad) * sin2lng;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;A_sqrt = sqrtf(a);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; A_sqrt1 = sqrtf(1-a);&lt;/DIV&gt;&lt;DIV&gt;............................................ &lt;SPAN style="color: #ff0000;"&gt;Till here it works fine .&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;c = 2 * atan2f(A_sqrt,A_sqrt1); &lt;SPAN style="color: #ff0000;"&gt;When i press f9 here it resets the CPU andgoes to 0x000 PC..&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;Here i noticed that i can call only four library functions ex. sinf,cosf&amp;nbsp;......which i have done in code...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If i Remove any 2 calls of library function() (Remove line1 &amp;amp; line2 ) then my code will work fine(i am able to call atan2f and CPU doesn't reset executes normally ).... I don't understand what might be the probelm ...........&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;please anybody can give some suggestions....&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Warm Regards,&lt;/DIV&gt;&lt;DIV&gt;Harsha S&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Added p/n to subject.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by NLFSJ on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2008-12-17&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;07:48 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2008 17:10:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209986#M17951</guid>
      <dc:creator>sbharsha</dc:creator>
      <dc:date>2008-12-15T17:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Code get reset when i tried to run small application please help me to solve this issue</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209987#M17952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Sounds like the stack is overflowing.&lt;BR /&gt;&lt;BR /&gt;---Tom&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2008 22:26:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209987#M17952</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2008-12-15T22:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Code get reset when i tried to run small application please help me to solve this issue</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209988#M17953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I cross checked the stack. stack is not over flowing..&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I allocated stack to 1.7KB And checkd the Stack memory for any over flow.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;But Max stack used is around 100 bytes..&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Its not a stack problem .......&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;any other guesses please ...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Harsha S&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 12:39:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209988#M17953</guid>
      <dc:creator>sbharsha</dc:creator>
      <dc:date>2008-12-16T12:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Code get reset when i tried to run small application please help me to solve this issue</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209989#M17954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Is COP reset enabled? If yes, then could it timeout?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Could&amp;nbsp;you somehow&amp;nbsp;read&amp;nbsp;contents&amp;nbsp;of&amp;nbsp;SRS after reset? Enetering BDM mode can alter SRS, so maybe send SRS over SCI, show it on MCU pins. Or just copy to not used RAM locations, then read copy in RAM via&amp;nbsp;BDM.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 15:41:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209989#M17954</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-12-16T15:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Code get reset when i tried to run small application please help me to solve this issue</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209990#M17955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Iam getting message "COP watchdog caoused Reset".&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Just attached the screen shot of the reset mode.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have checked the SRS its COP reset bit is enable SRS = 0x20.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;whats the necessary steps needs to be taken.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please suggest me.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Harsha S&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="http://www.freescale.com/files/community_files/8BITCOMM/12775_reset_screenshot.jpg" rel="nofollow" target="_self"&gt;Reset_Screenshot.jpg&lt;/A&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-27&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;11:57 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 16:49:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209990#M17955</guid>
      <dc:creator>sbharsha</dc:creator>
      <dc:date>2008-12-16T16:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Code get reset when i tried to run small application please help me to solve this issue</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209991#M17956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Strange how you failed to mention this (the COP reset) in your previous two posts.&lt;BR /&gt;I'm no expert on the AC, but...&lt;BR /&gt;&lt;BR /&gt;To prevent it, either:&lt;BR /&gt;1. Extend the COP reset time.&lt;BR /&gt;2. Reset it before the time expires.&lt;BR /&gt;3. Disable it altogether.&lt;BR /&gt;&lt;BR /&gt;and above all else, RTFM!&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 17:42:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209991#M17956</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2008-12-16T17:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Code get reset when i tried to run small application please help me to solve this issue</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209992#M17957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;gt;&amp;gt;Strange how you failed to mention this (the COP reset) in your previous two posts.&lt;BR /&gt;&amp;gt;&amp;gt;I'm no expert on the AC, but...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Sorry about that i couldn't notince that earlier as you mentionsomethng about SRS a hat time i could able to check out properly ...&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;gt;&amp;gt;To prevent it, either:&lt;BR /&gt;&amp;gt;&amp;gt;1. Extend the COP reset time.&lt;/DIV&gt;&lt;DIV&gt;Could you mentioen where/how i can do it ?&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;gt;&amp;gt;2. Reset it before the time expires.&lt;/DIV&gt;&lt;DIV&gt;Thats fine...&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;gt;&amp;gt;3. Disable it altogether.&lt;BR /&gt;Thats right&amp;nbsp; ......... Mean tme i tried dissabling it It worked for me&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;gt;&amp;gt;and above all else, RTFM&lt;/DIV&gt;&lt;DIV&gt;RTFM ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Harsha S&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 17:51:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209992#M17957</guid>
      <dc:creator>sbharsha</dc:creator>
      <dc:date>2008-12-16T17:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Code get reset when i tried to run small application please help me to solve this issue</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209993#M17958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi again,&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;sbharsha wrote:&lt;BR /&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;gt;&amp;gt;Strange how you failed to mention this (the COP reset) in your previous two posts.&lt;BR /&gt;&amp;gt;&amp;gt;I'm no expert on the AC, but...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Sorry about that i couldn't notince that earlier as you mentionsomethng about SRS a hat time i could able to check out properly ...&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;gt;&amp;gt;To prevent it, either:&lt;BR /&gt;&amp;gt;&amp;gt;1. Extend the COP reset time.&lt;/DIV&gt;&lt;DIV&gt;Could you mentioen where/how i can do it ?&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;gt;&amp;gt;2. Reset it before the time expires.&lt;/DIV&gt;&lt;DIV&gt;Thats fine...&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;gt;&amp;gt;3. Disable it altogether.&lt;BR /&gt;Thats right&amp;nbsp; ......... Mean tme i tried dissabling it It worked for me&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;gt;&amp;gt;and above all else, RTFM&lt;/DIV&gt;&lt;DIV&gt;RTFM ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Harsha S&lt;/DIV&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;RTFM loosely translates to "read the manual"&lt;BR /&gt;&lt;BR /&gt;This is how you will discover the answer to your question at my point one.&lt;BR /&gt;look for COPCLKS in SOPT2 and COPT in SOPT.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 17:56:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209993#M17958</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2008-12-16T17:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Code get reset when i tried to run small application please help me to solve this issue</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209994#M17959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks buddy .....&amp;nbsp; I hope my issue is resolved fully ...&lt;/DIV&gt;&lt;DIV&gt;Thanks or your valuable suggestions..&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Harsha S&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 17:59:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-get-reset-when-i-tried-to-run-small-application-please-help/m-p/209994#M17959</guid>
      <dc:creator>sbharsha</dc:creator>
      <dc:date>2008-12-16T17:59:36Z</dc:date>
    </item>
  </channel>
</rss>

