I use the c2541 and simpleBLEperipheral as the peripheral device. I modify the default button interrupts,P0.0 and p0.1 to p1.2 and p1.3. Also the vector HAL_ISR_FUNCTION( halKeyPort0Isr, P1INT_VECTOR ). When I press the button, it actually enters the halProcessKeyInterrupt function to deal with interrupts, but the connection is broken immediately. What's going on? I would appreciate it veru much if somebody could help. Here is my code about defination
#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
#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)