[uClinux-dev] mach-atmel (Atmel AT91) interrupt controller

Shaun Jackman sjackman at gmail.com
Fri Oct 14 12:53:22 EDT 2005


Something pretty wacky is going on here. After I've run uClinux
2.6.11.8-hsc0 even once, my non-Linux firmware, which has been quite
reliable, gets stuck in the same way with the interrupt controller
being entirely locked up.

Here's the normal state, where a TC2 interrupt is pending and the NIRQ
line is asserted.

(gdb) ipr
AIC_IPR: 0x40 TC2
(gdb) imr
AIC_IMR: 0x40 TC2
(gdb) isr
AIC_ISR: 0
(gdb) cpsr
CPSR: 0x5f FIQ MODE_SYS
(gdb) cisr
AIC_CISR: 0x2 NIRQ

Here's the state when running uClinux. A TC1 interrupt is pending, but
the NIRQ line is not asserted!

(gdb) ipr
AIC_IPR: 0x20 TC1
(gdb) imr
AIC_IMR: 0x20 TC1
(gdb) isr
AIC_ISR: 0
(gdb) cpsr
CPSR: 0x53 FIQ MODE_SVC
(gdb) cisr
AIC_CISR: 0x0

The only difference I can see is that uClinux is running in MODE_SVC
using TC1, whereas I am running in MODE_SYS using TC2, but I don't
believe either of those details is important.

If I now try to run my non-Linux firmware, after having run uClinux,
it's equally buggered!

(gdb) ipr
AIC_IPR: 0x40 TC2
(gdb) imr
AIC_IMR: 0x40 TC2
(gdb) isr
AIC_ISR: 0
(gdb) cpsr
CPSR: 0x5f FIQ MODE_SYS
(gdb) cisr
AIC_CISR: 0x0

Same thing now: the TC2 interrupts is pending, but no NIRQ assertion!

I cannot figure out what crazy mode uClinux is putting the interrupt
controller into that is causing this masking of the NIRQ. I'm going to
try to get in touch with an Atmel field application engineer (FAE) and
see if she has any insight.

Cheers,
Shaun



More information about the uClinux-dev mailing list