我在使用一个ADSP21479的开发板,我在使用外部引脚中断时发现不能触发。
然后测量该引脚电压,发现是2.43v,是初始化引脚的配置不对还是芯片已经损坏了?
初始化程序如下:
void Init_Pin14_Interrupt(void)
{
adi_int_InstallHandler(ADI_CID_P0I, /*iid - high priority core timer */
(ADI_INT_HANDLER_PTR)DAI_H_Interrupt, /*handler*/
0, /*handler parameter*/
false /*do enable*/
);
adi_int_EnableInt(ADI_CID_P0I,true);
adi_int_InstallHandler(ADI_CID_P12I, /*iid - high priority core timer */
(ADI_INT_HANDLER_PTR)DAI_H_Interrupt, /*handler*/
0, /*handler parameter*/
true /*do enable*/
);
SRU(LOW,DAI_PBEN14_I)
SRU(LOW,DAI_PB14_I);
SRU(DAI_PB14_O,DAI_INT_22_I);//DAI PIN14 触发 DAI_INT22
/* unmask individual interrupts */
(*pDAI_IRPTL_PRI) |= DAI_INT_22;
(*((volatile unsigned int *)DAI_IRPTL_FE)) &= ~DAI_INT_22;
(*((volatile unsigned int *)DAI_IRPTL_RE))|= DAI_INT_22;
/* enable IRQ interrupts and make DAI interrupts high priority */
sysreg_bit_set(sysreg_IMASK, (DAIHI | DAILI) );
sysreg_bit_set(sysreg_MODE1, IRPTEN ); /* enable global interrupts */
//(*((volatile unsigned int *)PICR0)) &= 0xFFF07FFF;//映射到PIR优先级3
}