您好、E2E、
在 MSP430f5252的 GPIO 端口6引脚3上设置中断时遇到问题。
我的 GPIO 配置为:
GPIO_PinConfig gpioPinConfigs[]={ //... GPIOMSP430_P2_1 | GPIO_CFG_INPUT_IN_INT_FALLING、/*按钮*/ GPIOMSP430_P6_3 | GPIO_CFG_IN_INT_INT_FALLING、/* IR_RX * //... }
在 init 中,我设置回调并启用中断:
GPIO_setCallback (Button、buttonInterruptFxn); GPIO_setCallback (IR_RX、irrxInterruptFxn); GPIO_enableInt (Button); GPIO_enableInt (IR_RX);
我在 Project.cfg 上提供了:
hwiParams.arg = 2; hwi.create (38、"&GPIO_hwiIntFxn"、hwiParams);//端口2 hwiParams.arg = 1; hwi.create (36、'&GPIO_hwiIntFxn'、hwiParams);//端口6
按钮引脚的中断工作正常、但 IR_RX 引脚的中断不能按预期工作。
它永远不会进入 irrxInterruptFxn、它甚至看起来与时钟等其他内容混乱。
(如果可以在没有 cfg 文件的情况下设置中断、则更容易维护)
我在这里错过了什么? 感谢您的帮助!
Clement
