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.

[参考译文] MSP430F5252:TI-RTOS GPIO 6.3中断不能按预期工作

Guru**** 2502205 points
Other Parts Discussed in Thread: MSP430F5252

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/841083/msp430f5252-ti-rtos-gpio-6-3-interrupt-not-working-as-intended

器件型号:MSP430F5252

您好、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