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.

How to use custom gpio as interrupt?

Hi, I wanna change the default gpio interrupt from p0.0 and p0.1 to p1.2 and p1.3  I am using custom board with c2541, p1.2 and p1.3 pins are for two buttons. The project is based on the simpleBLEperipheral provided by TI. According to the datasheet, I modify the code like this. But I got a warning when I press the button.

Possible IDATA stack overflow detected. So what's wrong?My code has mistakes?Anybody could help?Thanks a lot.

#define HAL_KEY_SW_1_PORT P1
#define HAL_KEY_SW_1_BIT BV(2)
#define HAL_KEY_SW_1_SEL P1SEL
#define HAL_KEY_SW_1_DIR P1DIR

/* SW_2 is at P1.3 */
#define HAL_KEY_SW_2_PORT P1
#define HAL_KEY_SW_2_BIT BV(3)
#define HAL_KEY_SW_2_SEL P1SEL
#define HAL_KEY_SW_2_DIR P1DIR

#define HAL_KEY_SW_1_IEN IEN2 /* CPU interrupt mask register */
#define HAL_KEY_SW_1_ICTL P1IEN /* Port Interrupt Control register */
#define HAL_KEY_SW_1_ICTLBIT BV(2) /* P1IEN - P1.2 enable/disable bit */
#define HAL_KEY_SW_1_IENBIT BV(4) /* Mask bit for all of Port_0??? */

#define HAL_KEY_SW_1_PXIFG P1IFG /* Interrupt flag at source */
#define HAL_KEY_SW_2_IEN IEN2 /* CPU interrupt mask register */
#define HAL_KEY_SW_2_ICTL P1IEN /* Port Interrupt Control register */
#define HAL_KEY_SW_2_ICTLBIT BV(3) /* P0IEN - P1.3 enable/disable bit */
#define HAL_KEY_SW_2_IENBIT BV(4) /* Mask bit for all of Port_1 */
#define HAL_KEY_SW_2_PXIFG P1IFG /* Interrupt flag at source */

#define HAL_KEY_SW_1_EDGEBIT BV(0)