Lars Fruekilde

ISR priority problem on MCF5213 (C.W. 6.3)

Discussion created by Lars Fruekilde on Mar 6, 2007
Latest reply on Mar 10, 2007 by CompilerGuru
I have an application where I need especially one ISR to have priority. I need to emulate a codec (TDM) interface using the QSPI. From irqdetect to execution of code, minimum of time is reqiured, so this ISR have the highest priority. Due to H.W. interface I must trig QSPI from GPT ch3 irq handler.
Using a scope I can see GPT3 pin toggle (H.W. func), but time from edge to start of SPI data clk can take arbitray amount of time, but is normally fixed and short. From inspecting list file (see below) I can see IRQ level i forced to 7 as the first instruct in this (and in all other) ISR, WHY ????
This means if another ISR with a lower priority is executed right before GPT ch3 triggers, irq is locked and GPT irq will not service until end of first ISR. This explains why my time from pin toggle to QSPI data clk is delayed (GPT ch3 toggle is done by hw counter match, no SW latency)
From what I know 'strldsr' is used in a common ISR for multilevel interrupts....????
list dump:
 __interrupt__ void irqGPT_CH3_Handler ( void ) 
0x00000000                    _irqGPT_CH3_Handler:
;                                         irqGPT_CH3_Handler:
0x00000000  0x40E746FC2700           strldsr  #0x2700
0x00000006  0x4E560000                    link     a6,#0
0x0000000A  0x4FEFFFE8                  lea      -24(a7),a7
0x0000000E  0x48EF03070004           movem.l  d0-d2/a0-a1,4(a7)
;  560:   MCF_GPT_GPTC3 += LRCLK_TIME;                                                 // Reload timer for next event
0x00000014  0x41F900000000            lea      ___IPSBAR,a0
0x0000001A  0x2248                            movea.l  a0,a1
0x0000001C  0xD3FC001A0016          adda.l   #1703958,a1
In the stationary for the 5213EVB, functions are provided for changing irq level, but they will have no effect unless level is hard coded into each ISR instead of reading current level from SR, save info on stack and modify SR.
Is there som setting in C.W. to change this behaivour or. . . . .
In C.W. help there is very little help to get on ISR...In fact, in general help in C.W. may just as well be omitted, it sucks
Best regards