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.

问一个6678 GPIO中断问题



我看手册上写

Table 2-2 Interrupt Per-Bank Enable Register Field Descriptions
Bit Field Description
31-1 Reserved Reserved. The reserved bit location is always read as 0. A value written to this field has no effect.
0 EN Enables all GPIO pins as interrupt sources to the DSP CPU.
0 = Disables GPIO interrupts.
1 = Enables GPIO interrupts.

是不是只要配置

gpGPIO_regs->BINTEN=3

就配置了所有GPIO输入都为中断,就是说,配置所有输入的GPIO,只要有电平变化,就会产生中断,配置为输出的GPIO才不会产生中断。

另外顺便问一个问题,如果这样配置gpGPIO_regs->BANK_REGISTERS[0].DIR = 0x00055(二进制为01010101),表示GPIO0配置为输入,GPIO1配置为输出,GPIO2配置为输入,GPIO3配置为输出,GPIO4配置为输入,GPIO5配置为输出。

如果按照上面的配置,只要GPIO0,2,4的电平有变化,就有会进入中断服务函数。