This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/DK-TM4C123G: If statement not processing

Part Number: DK-TM4C123G


Tool/software: Code Composer Studio

Hello,

I'm experiencing a strange issue in that one of my if() statements does not seem to be processing.  My code is as follows:

    while(1)
    {
    	if(!lednext)
    	{
    		pvalue ^= 0x08;
    		GPIOPinWrite(GPIO_PORTG_BASE, GPIO_PIN_3, pvalue);
    		lednext = 1;
    	}

    }

This infinite while loop is within my main{} function and I have a timer-based interrupt running every 30ms to clear "lednext".
For some reason, the statements within the if{} block never execute. If I pause the program execution, the lednext variable is indeed cleared.

Any thoughts on what might be going on?

I'm using CCS V6 on Windows 7 with the XDS 100V2 debugger.

Thanks,

Eric