<?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>Classic/Legacy CodeWarrior中的主题 Re: Problem Debugging a sin function code</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-Debugging-a-sin-function-code/m-p/133522#M665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I solved the problem. Thanks for reading!haha... The problem is actually caused by the watchdog timeout. The watchdog timed out before my sin function can complete its computation. Just set the watchdog timeout to a longer period. &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt; Maybe someone have a better solution can share.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Apr 2006 15:36:27 GMT</pubDate>
    <dc:creator>krude</dc:creator>
    <dc:date>2006-04-25T15:36:27Z</dc:date>
    <item>
      <title>Problem Debugging a sin function code</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-Debugging-a-sin-function-code/m-p/133521#M664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I am currently trying to run a program with the follow code but my watchdog always reset. I tried to turn off the COP by changing SOPT_COPE to 1 at main.cpp but I still don't get it to stop at the breakpoints I set. But anyway, can somone take a look at my code and tell me what's wrong, can? Thank you. I tried to isolate the problem and apparantly, it's got to do with the sin function I used. Thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;int iNsample,in;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;float fsine,fsinCoM,fFreq,fdT,fsinCo;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;iNsample = 32;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;fFreq = 440.0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;////----Maths function----\\\\\&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;fdT = 1/(fFreq * iNsample);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;fsinCo = 2.0 * _M_PI * fFreq * fdT;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for(in=0; in&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fsinCoM = fsinCo * in;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fsine = (sin(fsinCoM) + 1) * 100;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sinearray[in] = (int) fsine;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;};//end for&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 13:47:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-Debugging-a-sin-function-code/m-p/133521#M664</guid>
      <dc:creator>krude</dc:creator>
      <dc:date>2006-04-25T13:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Debugging a sin function code</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-Debugging-a-sin-function-code/m-p/133522#M665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I solved the problem. Thanks for reading!haha... The problem is actually caused by the watchdog timeout. The watchdog timed out before my sin function can complete its computation. Just set the watchdog timeout to a longer period. &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt; Maybe someone have a better solution can share.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 15:36:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-Debugging-a-sin-function-code/m-p/133522#M665</guid>
      <dc:creator>krude</dc:creator>
      <dc:date>2006-04-25T15:36:27Z</dc:date>
    </item>
  </channel>
</rss>

