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.

MSP430 interrupts



Good morning:

 

Can I use a pin that has been configured as an interrupt and as a general purpose I/O ?

My application uses a pushbutton that triggers an interrupt on the rising edge. Then the software takes a decision based on the time the button has been pushed (1, 5 or 10 seconds). So I need to be able detect the irq request but also to continue reading the logic status of the pin, without losing the irq capabilities.

Thanks.

 

  • Hi,

    I am not familiar with the MSP. But in general you could after, a rising edgle is recognized, configure the port's interrupt to falling edge. Then you are not forced to poll the port's state end the complete button handlng is interrupt driven and the MSP has time to do other things while a button keeps pressed.

    regards

    spachner

  • madelgi said:

    Good morning:

     

    Can I use a pin that has been configured as an interrupt and as a general purpose I/O ?

    My application uses a pushbutton that triggers an interrupt on the rising edge. Then the software takes a decision based on the time the button has been pushed (1, 5 or 10 seconds). So I need to be able detect the irq request but also to continue reading the logic status of the pin, without losing the irq capabilities.

    Thanks.

     

     

    Are you wanting to use a GPIO configured as an input (triggering an interrupt) then switch it to be used as an input that will not trigger an interrupt? If so, yes. GPIOs can be reconfigured using a few basic registers. See the following article: http://wiki.msp430.com/index.php/Digital_I/O_%28MSP430%29

    In your case you will be simply disabling the interrupt enable bit for that particular pin after you've received the initial interrupt.

     

**Attention** This is a public forum