michael coury

HCSO8 Skipping over important code for no reason

Discussion created by michael coury on Oct 5, 2007
Latest reply on Oct 7, 2007 by CompilerGuru
So I have a routine here to catch the start of a RS232 stream....

  #ifdef USB_LOGGER  if(cSCI1rxFlag)                   // Rx Flag  {                        if( !(cSystemFlag & GWF_SCIDP) )            // If device not present    {      USBFileOpen("test.txt");                  // Open File      cSystemFlag |= GWF_SCIDP;                 // Set Device Present    }    if( !(cSystemFlag & GWF_SCIRX) )            // If we are not admist a burst    {      iUSBSendCommand(MC_e,NULL);      cSystemFlag |= GWF_SCIRX;                 // Set that we are in a burst    }    cSCI1rxFlag = 0;                            // Clear the Rx Flag    }

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.

I know that the code is inside that if routine AND that the routine works because in a 1 second loop I put

   if(cSystemFlag & GWF_SCIRX)            // If we are not admist a burst    {      iUSBSendCommand(MC_e,NULL);    }

And the code works as expected, I have killed almost the whole day on this :smileysad: WTF?