I have a problem with ARM LPC2378 revision B, configured with CPU clock frequency at 72 MHZ. I have the following configuration: - an IRQ interrupt function linked to CPU timer 0 (vectored interrupt). It is invoked with a period of 1 ms - an FIQ interrupt function linked to the half-empty flag of RX queue of MCI bus controller (the bus used to communicate with SD-MMC cards).
During the reading of a file from an SD card CPU switches to "Data Abort" or "Prefetch Abort". While CPU is in this error condition I very often see that IRQ stack pointer is corrupted, i.e. it points to an invalid address. However this doesn't happens every time, but only very often.
I've controlled that stack dimension of each mode is well sized.
Inside the IRQ function some other functions are invoked. If I rewrite the code of these inner functions as "inline code" inside the IRQ function the system doesn't crash! It seems the problem to be the call of a function inside the IRQ function but I'm not sure of this conclusion.
The problem happens both with MAM fully enabled and MAM partially enabled.
Any suggestions?
Thanks and have a nice day!
Demis
I understand your observation but function duration is not the cause of the problem. The loop is only a dummy loop. I mean that I've written that loop only to waste time inside IRQ function. I've measured the duration of that function with my oscilloscope and I've found that it lasts 100 microseconds, while it's period is 1 millisecond.
There are no nested calls of that routine...
Do you have many interrupt source firing at the same time? Do you support nested interupts? I think your stack is 15 levels deep.