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/MSP430F2272: Debug issue. State machine variable changes randomly at each cycle

Part Number: MSP430F2272

Tool/software: Code Composer Studio

Hi all,

I'm using a Lauchpad as a debugger with CCS 7.1.0.

The main code is a state machine as follows:

At each step, GPIO operations are done and the result is captured by the ADC10.

The state machine variable is declared as follows:

in .h file:

typedef enum
{
    IDLE,
    CHECK_INSERTION,
    INVALID_INSERTION,
    VALID_INSERTION,
}Status_t;

in .c

static Status_t state = IDLE;

The problem is that at each loop of the state machine, the state variable changes to another state without any reason. It exits the state machine in the correct state and re-enters the state machine with another state.

I would really appreciate help on this.

Thanks a lot

Salim.

**Attention** This is a public forum