<?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>8-bit MicrocontrollersのトピックRe: HCSO8 Skipping over important code for no reason</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCSO8-Skipping-over-important-code-for-no-reason/m-p/152967#M8442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I would recommend to have a look to the preprocessor output and to the disassembly listing at that code position.&lt;BR /&gt;Those two listings can be created with the context menu in the CW ide, I always check them first when I see some unexpected behavior.&lt;BR /&gt;With the current information the problem could be just about anywhere, so really not enough information. The code looks basically ok, but as it is only a non complete code snippet, there are many reasons why it would not work as expected.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 07 Oct 2007 20:37:54 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2007-10-07T20:37:54Z</dc:date>
    <item>
      <title>HCSO8 Skipping over important code for no reason</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCSO8-Skipping-over-important-code-for-no-reason/m-p/152964#M8439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;So I have a routine here to catch the start of a RS232 stream....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;&amp;nbsp; #ifdef USB_LOGGER&amp;nbsp; if(cSCI1rxFlag)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Rx Flag&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( !(cSystemFlag &amp;amp; GWF_SCIDP) )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If device not present&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USBFileOpen("test.txt");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Open File&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cSystemFlag |= GWF_SCIDP;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set Device Present&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; if( !(cSystemFlag &amp;amp; GWF_SCIRX) )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If we are not admist a burst&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iUSBSendCommand(MC_e,NULL);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cSystemFlag |= GWF_SCIRX;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set that we are in a burst&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; cSCI1rxFlag = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Clear the Rx Flag&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;SPAN&gt;the Routine iUSBSendCommand(MC_e,NULL); gets skipped.... its output does not show up on the logic analyzer and when I step through it in processor expert, skips over that line like it does not exist.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that the code is inside that if routine AND that the routine works because in a 1 second loop I put&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp; if(cSystemFlag &amp;amp; GWF_SCIRX)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If we are not admist a burst&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iUSBSendCommand(MC_e,NULL);&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;SPAN&gt;And the code works as expected, I have killed almost the whole day on this &lt;/SPAN&gt;&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;&lt;IMG alt=":smileysad:" class="emoticon emoticon-smileysad" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif" title="Smiley Sad" /&gt;&lt;/A&gt;&lt;SPAN&gt; WTF?&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:56:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HCSO8-Skipping-over-important-code-for-no-reason/m-p/152964#M8439</guid>
      <dc:creator>mjcoury</dc:creator>
      <dc:date>2020-10-29T08:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: HCSO8 Skipping over important code for no reason</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCSO8-Skipping-over-important-code-for-no-reason/m-p/152965#M8440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;You need to verify that this code is not being stripped out by the compiler due to it not being used.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I've&amp;nbsp;had routines that I thought should be there, but the compiler removed them because&amp;nbsp;that section of code&amp;nbsp;would always be skipped due to code errors.&amp;nbsp; It still shows up in the debugger, but gets skipped because it doesn't really exits in the executed code.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2007 01:33:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HCSO8-Skipping-over-important-code-for-no-reason/m-p/152965#M8440</guid>
      <dc:creator>Witztronics</dc:creator>
      <dc:date>2007-10-06T01:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: HCSO8 Skipping over important code for no reason</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCSO8-Skipping-over-important-code-for-no-reason/m-p/152966#M8441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I wonder if the GWF_SCIRX bit within cSystemFlag is already set when you reach that section of the code.&amp;nbsp;&amp;nbsp;Following execution of the function the flag bit becomes set,&amp;nbsp;and this&amp;nbsp;would prevent further execution until the flag was cleared.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2007 08:25:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HCSO8-Skipping-over-important-code-for-no-reason/m-p/152966#M8441</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-10-06T08:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: HCSO8 Skipping over important code for no reason</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCSO8-Skipping-over-important-code-for-no-reason/m-p/152967#M8442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I would recommend to have a look to the preprocessor output and to the disassembly listing at that code position.&lt;BR /&gt;Those two listings can be created with the context menu in the CW ide, I always check them first when I see some unexpected behavior.&lt;BR /&gt;With the current information the problem could be just about anywhere, so really not enough information. The code looks basically ok, but as it is only a non complete code snippet, there are many reasons why it would not work as expected.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2007 20:37:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HCSO8-Skipping-over-important-code-for-no-reason/m-p/152967#M8442</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-10-07T20:37:54Z</dc:date>
    </item>
  </channel>
</rss>

