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.