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.

MSP430G2231 - Interrupt Flag problem.

Dear All,

We found the interrupt flag P1ILG will be set to "1" even the P1IE doesn't set.

It seems follow the P1IES set to change the status in P1ILG.

example.

P1ILES = 0x00; // set the interrupt is falling trigger.

P1DIR = 0xFF; // set all pin are output.

P1OUT=0xFF; // set all pin output "high"

P1OUT=0x00; // set all pin output "low" <-- The P1ILG will be set to 0xFF automatic when the code go to the section.

 

Does it normal phenomenon? Please help clarify it.

 

Thanks,

Dennis

  • Hi Dennis,

    (Sorry for the mistaken posts and tests before.  I think I have successfully deleted them.)

    The edge detection logic is always active in P1, and the input buffers are always on too.  (See the pseudo schematics of the port-pin logic in the device-specific data sheet.)  So it is quite normal that causing an edge on the output pin would cause the edge-detection logic to see the edge if it was the right polarity (high-to-low in your case).

    What's important though is that it won't interrupt you unless you want it to.  P1IE gives you that control.

    Jeff

  • Dear Jeff,

    Thank you very much. Your mean is we can don't care the P1IFG which P1IE disable.

    Dennis

  • Yes, the P1IFG bits can be considered "don't care" if you don't want them to provide interrupts.  This is because you can prevent them from causing interrupts using P1IE.

    Jeff

**Attention** This is a public forum