Quantcast
Channel: MSP 低功耗微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 3634

MSP432gpio PORT1中断问题,如何设置中断

$
0
0

在做GPIO端口 PORT1中断实验的时候,设置中断的代码如下

GPIO_setAsInputPinWithPullUpResistor(GPIO_PORT_P1, GPIO_PIN1);

GPIO_clearInterruptFlag(GPIO_PORT_P1, GPIO_PIN1);

GPIO_enableInterrupt(GPIO_PORT_P1, GPIO_PIN1);

GPIO_interruptEdgeSelect(GPIO_PORT_P1, GPIO_PIN1, GPIO_HIGH_TO_LOW_TRANSITION);

Interrupt_enableInterrupt(PORT1_IRQn);

并且已经在startup启动文件中中断向量表里加入了中断处理函数,但是PORT1中断就是不能用,按键按下以后没反应,什么问题?我这个中断的设置程序是官方例程中的,但是还是不行,可能是什么原因?


Viewing all articles
Browse latest Browse all 3634

Trending Articles