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.

MSP430FR2355: If statement doesn't trap???

Part Number: MSP430FR2355


Can anyone see what may be wrong here.  variable is uint8_t.  with values of 0x40 and 0x08.  I never get into the assignment for Button??

                    if (currentP1Value & 0x78)
                        Button = PAIR;

  • I suspect there's more to it. Can you show some more context?

    How do you tell that you don't get to the assignment? (Breakpoint? Button value?)

  • I had a breakpoint on the Button statement....When I moved the breakpoint to further down the code (which I had the luxury to do and still troubleshoot) the code seemed to have no problem picking up the Button assignment....Guessing it was something with the disassembled code or something since I have no optimizations ??? (maybe) ....I'm chalking it off to that.

**Attention** This is a public forum