引用 2 楼 veabol 的回复:
这段中断的初始化没错,但是这个中断只能处理USB DEVICE中断,
你的中断没成功吗?是不是中断的MASK位设置问题?或者是USB模块初始化不对?
没有成功哦,就是不进那个中断,跳不到IsrHandler函数里
void Isr_Init(void)
{
volatile S3C2440A_INTR_REG *s2440INT = (S3C2440A_INTR_REG *)OALPAtoVA(S3C2440A_BASE_REG_PA_INTR, FALSE);
s2440INT->INTMOD=0x0; // All=IRQ mode
s2440INT->INTMSK=BIT_ALLMSK; // All interrupt is masked.
EdbgOutputDebugString("INFO: (unsigned)IsrUsbd : 0x%x\r\n", (unsigned)IsrUsbd);
EdbgOutputDebugString("INFO: (unsigned)IsrHandler : 0x%x\r\n", (unsigned)IsrHandler);
// make value to assemble code "b IsrHandler"
pISR =(unsigned)(0xEA000000)+(((unsigned)IsrHandler - (0x80038000 + 0x18 + 0x8) )>>2);
// pISR = (unsigned)IsrHandler;
// pISRUSBD = (unsigned)IsrUsbd;
EdbgOutputDebugString("INFO: (unsigned)pISR : 0x%x\r\n", (unsigned)pISR);
s2440INT->SRCPND = BIT_USBD;
if (s2440INT->INTPND & BIT_USBD)
s2440INT->INTPND = BIT_USBD;
s2440INT->INTMSK &= ~BIT_USBD; // USB Interrupt enable.
s2440INT->SRCPND = BIT_DMA2;
if (s2440INT->INTPND & BIT_DMA2)
s2440INT->INTPND = BIT_DMA2;
s2440INT->INTMSK &= ~BIT_DMA2; // DMA Interrupt enable.
}