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.

am335中断优先级及中断嵌套

Other Parts Discussed in Thread: SYSCONFIG

测试发现,网络程序在执行中断的时候,导致了其余中断丢失,于是,想通过设置中断优先级来处理。

 tmp = intc_bank_read_reg(bank, INTC_REVISION) & 0xff;
 printk(KERN_INFO "IRQ: Found an INTC at 0x%p "
    "(revision %ld.%ld) with %d interrupts\n",
    bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs);
 tmp = intc_bank_read_reg(bank, INTC_SYSCONFIG);
 tmp |= 1 << 1; /* soft reset */
 intc_bank_write_reg(tmp, bank, INTC_SYSCONFIG);
 while (!(intc_bank_read_reg(bank, INTC_SYSSTATUS) & 0x1))
  /* Wait for reset to complete */;
 /* Enable autoidle */
 intc_bank_write_reg(1 << 0, bank, INTC_SYSCONFIG);

 intc_bank_write_reg((0 << 2), bank, INTC_ILR0 + 62*4);  //gpio3
 intc_bank_write_reg((0 << 2), bank, INTC_ILR0 + 63*4);  //gpio3
 intc_bank_write_reg(40 << 2, bank, INTC_ILR0 + 40*4);  //eth
 intc_bank_write_reg(40 << 2, bank, INTC_ILR0 + 41*4);  //eth
 intc_bank_write_reg(40 << 2, bank, INTC_ILR0 + 42*4);  //eth
 intc_bank_write_reg(40 << 2, bank, INTC_ILR0 + 43*4);  //eth
将现在使用的gpio3_21作为中断的优先级设置成0。网络优先级设置成40
测试后,发现,没有解决问题,不知道这样设置对不对?
还需要设置别的地方吗?
还有就是中断嵌套的问题,正在执行的中断可以被新的中断抢占吗?如何设置?