Daniel Johansson

Interrupt and format error exception

Discussion created by Daniel Johansson on Nov 18, 2008
Latest reply on Dec 2, 2008 by Manjula devi
Hi,

I'm trying to write a ISR in C using the __declspec(interrupt). But it seems as first time through the interrupt I get a Format Error, exception 14. Disassembling shows the start code:
0x00000000  0x4E560000               link     a6,#0
0x00000004  0x518F                   subq.l   #8,a7
0x00000006  0xF317                   fsave    (a7)
0x00000008  0x2F08                   move.l   a0,-(a7)
0x0000000A  0x2F00                   move.l   d0,-(a7)
0x0000000C  0x518F                   subq.l   #8,a7

and end code:
0x00000072  0x508F                   addq.l   #8,a7
0x00000074  0x201F                   move.l   (a7)+,d0
0x00000076  0x205F                   movea.l  (a7)+,a0
0x00000078  0xF357                   frestore  (a7)
0x0000007A  0x4E5E                   unlk     a6
0x0000007C  0x4E73                   rte     
0x0000007E  0x4E71                   nop

First off this seems to be an unbalanced stack or??
Anyone seen this? Why am I getting a format error?

Thanks,
Daniel

Outcomes