Hi
I think the suggestion of using __declspec is a good one. I discovered recently that the default behaviour of the CodeWarrior compiler (for processors which support STRLDSR) is to start the interrupt service routine with the following ColdFire instruction:
STRLDSR #0x2700
This will raise the interrupt fence to level 7, thereby blocking any lower priority interrupts. The effect would be that you IRQ4 interrupt is blocked when the DMA ISR is executing - not what you want !
To check if this is the case, try disassembling the start of the DMA ISR, and look for the STRLDSR instruction.
Fortunately, you can change this behaviour. You'll probably find that you have the following declaration in your header files somewhere (e.g. mwerks.h):
#define __interrupt__ __declspec(interrupt)
To prevent the STRLDSR instruction from being generated at all, change this to read:
#define __interrupt__ __declspec(interrupt:0)
In fact you can also change the value used as the argument to STRLDSR by specifying e.g:
#define __interrupt__ __declspec(interrupt:0x2400)
This would cause all interrupt service routines to start with:
STRLDSR #0x2400
...which is dangerous but occasionally useful if you actually want to drop the interrupt fence from within a high priority ISR to re-enable lower priority interrupts.
Hope this helps
Simon