interrupt error for SH4

Hello,

We’re trying to test interrupt function for our own SH7750 B/D
on QNX6.1. it has support for level encoded external interrupt.
We’ve already modified the interrupt callout routines from Solution Engine
BSP
for it and also written the simple interrupt handler as attached
(“int-key.c”).

After we started interrupt handler for an interrupt source
we enforced the interrupt to be generated manually in h/w
using the method as attached (“int-test.pdf”).

For example,
For interrupt vector 14 when we set the IRL0 to be low during a few seconds
the handler was never called.
But when we reset the IRL0 to be high the interrupt handler was called only
once.

If IRL0 is still low, we think as the interrupt may occur once every 3 cpu
clock
continuously so the handler should be called continuously.

Please let me know why the interrupt handler is not called even when
the IRL is low.

Thanks in advance.
Sangwoon
swchung@rtsolutions.co.kr


begin 666 int-key.c
M(VEN8VQU9&4@/’-T9&EO+F@^( T*(VEN8VQU9&4@/‘5N:7-T9"YH/@T*(VEN
M8VQU9&4@/’-T9&EN=“YH/@T*(VEN8VQU9&4@/&AW+VEN;W5T+F@^#0HC:6YC
M;‘5D92 <WES+VUM86XN:#X-"B-I;F-L=61E(#QS>7,O;F5U=’)I;F\N:#X-
M”@T*+R]F;W(@<VQO9PT*(VEN8VQU9&4@/’-Y<R]S;&]G+F@^#0HC:6YC;‘5D
M92 <WES+W-L;V=C;V1E<RYH/@T*#0HC9&5F:6YE($E!0TL),’@P-# P,# P
M90T*(V1E9FEN92!)34%32PDP># U,# P,# T#0HC9&5F:6YE($M%60D),’@P
M-# P,# P. T*#0H-“G-T<G5C=”!S:6=E=F5N="!E=F5N=#L-"@T*:6YT(&UA
M:6XH:6YT(&%R9V,L(&-H87(@F%R9W9;72D@#0I[( T"6EN="!I+"!V86PL
M(&EI9#L-"@T*“6EF*%1H<F5A9$-T;“A?3E1/7U1#5$Q?24\L($Y53$PI(#T]
M(“TQ2![#0H)“69P<FEN=&8H<W1D97)R+” B56YA8FQE(‘1O(&]B=&%I;B!)
M+T@<’)I=FET>2X@66]U(&UU<W0@8F4@=7-E<FED(’)O;W0N7&XB
3L-”@D)
M97AI=”@P2 [#0H)?0T"0EI/2!A=&]I(“AA<F=V6S%=3L-"@EF<’)I;G1F
M(“AS=&1E<G(L(D=E=”!I;G1R('9E8W1O<B E9"!F<F]M(&-O;6UA;F1<;B(L
M(&DI.PT
#0H)“65V96YT+G-I9V5V7VYO=&EF>3T@4TE’159?24Y44CL-”@T*
M"7!R:6YT9B@B4F5A9&EN9RXN+B!)34%32SH@,’@E>“P@(&)E9F]R92!);G1E
M<G)U<'1!='1A8VA%=F5N=%QN(BP@:6XX*”!M;6%P7V1E=FEC95]I;R H,BQ)
M34%32RDI(“D[#0H)9&5L87D@#$I.PT"0EI:60]($EN=&5R<G5P=$%T=&%C
M:$5V96YT*&DL(“9E=F5N=“P@7TY43U])3E127T9,04=37U122U]-4TLI.PT*
M"61E;&%Y*#$I.PT*“69P<FEN=&8H<W1D97)R+” B26YT97)R=7!T071T86-H
M(”@E9"D@<F5T=7)N960N+BYI9#T@)61<;B(L(&DL(&EI9"D[(&9F;‘5S:"AS
M=&1O=70I.PT*“69P<FEN=&8H<W1D97)R+” B4F5A9&EN9RXN+B!)34%32SH@
M,’@E>“P@(&%F=&5R($EN=&5R<G5P=$%T=&%C:$5V96YT7&XB+”!I;C@H(&UM
M87!?9&5V:6-E7VEO(”@R+$E-05-+2D@3L-"@EF<’)I;G1F("AS=&1E<G(L
M(DYO=R!W86ET(&9O<B!I;G1E<G)U<'0N+BY<;B(I.R!F9FQU<V@H<W1D;W5T
M
3L-"@EW:&EL92 H,2D-"@E[#0H)"4EN=&5R<G5P=%=A:70@
# L($Y53$PI
M.PT*“69P<FEN=&8@’-T9&5R<BP@(DEN=’(@;V-C=7)R960N+BY<;B(I.R!F
M9FQU<V@H<W1D;W5T
3L-”@EF<’)I;G1F*’-T9&5R<BP@(E)E861I;F<N+BX@
M24U!4TLZ(#!X)7@L(”!A9G1E<B!O8V-U<FEN9UQN(BP@:6XX*”!M;6%P7V1E
M=FEC95]I;R H,BQ)34%32RDI(“D[#0H)9&5L87DH,2D[#0H)“79A;#T@26YT
M97)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=%1Y<&4R#0HO0F%S949O;G0@+R-",2-“0R-”
M."-",@T*+U=I;D-H87)3970@,3(Y+T9O;G1$97-C<FEP=&]R(#<@,"!2#0HO
M0TE$4WES=&5M26YF;PT*/#P-“B]296=I2A!9&]B92D-“B]/<F1E<FEN
M9RA+;W)E83$I#0HO4W5P<&QE;65N=” Q#0H^/@T*+T17(#$P,# -“B]7(%L-
M"C$@6R S,S,@,S,S(#,W-2 W-3 @-3DX(#@W-2 V.#@@,C@S(#,W-2 S-S4@
M-3 P(#8R-2 S,S0@-C(U(#,S-” T,3<@-3<T(#4W-” U-S0@-3<T(#4W-" U
M-S0@-3<T(#4W-" U-S0@-3<T(#,S-" S,S0@-C(U(#8R-2 V,C4@-30R(#$P
M,# @-C0V(#8W-R W,3@@-S(R(#8R-2 U.38@-S<P(#<S," R-S @-3 P(#8S
M-2 U-#,@.#$S(#8Y.2 W-S @-C,W(#<W,R V-C8@-C,S(#4X,B W,3$@-C P
M(#@Y-2 V,C4@-C(U(#8R-2 U,# @.3$W(#4P," U-#(@-3 P(#,S,R U-C,@
M-C U(#4W,B V,#4@-38W(#,T,B V,#4@-3<Q(#(T,2 R-#$@-3 P(#(S,2 X
M-C$@-3@P(#8P-2 V,#4@-C U(#,S,R U,C4@,S$S(#4W," U,# @-S4P(#4P
M," U,# @-3 P(#4P," U,# @-3 P(#<Y,B!=#0I=#0H^/@T96YD;V)J#0HW
M(# @;V)J#0H/ T
+U1Y<&4@+T9O;G1$97-C<FEP=&]R#0HO1F]N=$YA;64@
M+R-",2-“0R-”."-",@T*+T9L86=S(#,X#0HO1F]N=$)";W@@6R M,34P(“TQ
M-38@,3$P,” X-#0@70T*+TUI<W-I;F=7:61T:" U,# -“B]3=&5M5B Y,0T*
M+U-T96U((#DQ#0HO271A;&EC06YG;&4@, T*+T-A<$AE:6=H=” X-#0-“B]8
M2&5I9VAT(#4Y, T*+T%S8V5N=” X-#0-"B]$97-C96YT("TQ-38-"B],96%D
M:6YG(#$U-@T*+T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30@,S(W(#4Q-2 S,#@@-34Y
M(#0Y,2 W,S8@-#DQ(#0Y,2 T.3$@-#DQ(#0Y,2 T.3$@-S<W(%T-“ET-“CX^
M#0IE;F1O8FH-“C$Q(# @;V)J#0H/ T*+U1Y<&4@+T9O;G1$97-C<FEP=&]R
M#0HO1F]N=$YA;64@+R-”,2-“0R-”.”-”,BQ";VQD#0HO1FQA9W,@,38T,C(-
M"B]&;VYT0D)O>"!;(“TQ-3 @+3$U-” Y-#8@.#0V(%T-“B]-:7-S:6YG5VED
M=&@@-#8R#0HO4W1E;58@,3<R#0HO4W1E;4@@,3<R#0HO271A;&EC06YG;&4@
M, T*+T-A<$AE:6=H=” X-#8-“B]82&5I9VAT(#4Y,@T*+T%S8V5N=” X-#8-
M"B]$97-C96YT(“TQ-30-“B],96%D:6YG(#$U- T*+TUA>%=I9’1H(#@T-@T*
M+T%V9U=I9’1H(#4S. T*+U-T>6QE#0H/” O4&%N;W-E(#PP.# U,#(P0C V
M,# P,# P,# P,# P,# ^(#X^#0H^/@T96YD;V)J#0HQ,B P(&]B:@T/#P-
M"B]4>7!E(”]&;VYT#0HO4W5B=‘EP92 O5’)U951Y<&4-“B].86UE(”]&,@T*
M+T)A<V5&;VYT("]4:6UE<TYE=U)O;6%N#0HO1FER<W1#:&%R(#,Q#0HO3&%S
M=$-H87(@,C4U#0HO5VED=&AS(%L@-S<X(#(U," S,S,@-# X(#4P," U,# @
M.#,S(#<W." Q.# @,S,S(#,S,R U,# @-38T(#(U," S,S,@,C4P( T*,C<X
M(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," R-S@@
M,C<X(#4V-" U-C0@-38T( T*-#0T(#DR,2 W,C(@-C8W(#8V-R W,C(@-C$Q
M(#4U-B W,C(@-S(R(#,S,R S.#D@-S(R(#8Q,2 X.#D@-S(R( T*-S(R(#4U
M-B W,C(@-C8W(#4U-B V,3$@-S(R(#<R,B Y-#0@-S(R(#<R,B V,3$@,S,S
M(#(W." S,S,@-#8Y( T*-3 P(#,S,R T-#0@-3 P(#0T-" U,# @-#0T(#,S
M,R U,# @-3 P(#(W." R-S@@-3 P(#(W." W-S@@-3 P( T*-3 P(#4P," U
M,# @,S,S(#,X.2 R-S@@-3 P(#4P," W,C(@-3 P(#4P," T-#0@-#@P(#(P
M," T.# @-30Q( T*-S<X(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," U
M,# @-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P( T*-3 P(#4P," U,# @
M-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," U
M,# @-3 P( T*-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," U,# @
M-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P( T*-3 P(#4P," U,# @-3 P
M(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," U,# @
M-3 P( T*-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P
M(#4P," U,# @-3 P(#4P," U,# @-3 P( T*-3 P(#4P," U,# @-3 P(#4P
M," U,# @-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P
M( T*-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P
M," U,# @-3 P(#4P," U,# @-3 P( T*-3 P(#4P," U,# @-3 P(#4P," U
M,# @-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P(#4P," U,# @-3 P( T*
M-S<X(%T-“B]%;F-O9&EN9R O5VEN06YS:45N8V]D:6YG#0HO1F]N=$1E<V-R
M:7!T;W(@,3,@,”!2#0H^/@T96YD;V)J#0HQ,R P(&]B:@T/#P-“B]4>7!E
M(”]&;VYT1&5S8W)I<‘1O<@T*+T9O;G1.86UE("]4:6UE<TYE=U)O;6%N#0HO
M1FQA9W,@,S0-“B]&;VYT0D)O>”!;(“TR-3 @+3(U,” Q,3(V(#DS."!=#0HO
M36ES<VEN9U=I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” -"CX^#0I=#0IE;F1O8FH-"C$W(# @;V)J#0I;+T-A;%)'0@T*/#P-"B]7
M:&ET95!O:6YT(%LP+CDU,#4@,2 Q+C X.3$@70T*+T=A;6UA(%LP+C(T-C@@
M,“XR-#8X(# N,C0V.”!=#0HO36%T<FEX(%LP+C0S-C$@,"XR,C(U(# N,#$S
M.2 P+C,X-3$@,“XW,38Y(# N,#DW,2 P+C$T,S$@,“XP-C V(# N-S$T,2!=
M#0H^/@T70T96YD;V)J#0IX<F5F#0HP(#$X#0HP,# P,# P,# P(#8U-3,U
M(&8-“C P,# P,#0X.#8@,# P,# @;@T*,# P,# P-#<V,” P,# P,”!N#0HP
M,# P,# U,C,T(# P,# P(&X-“C P,# P,#$P,C0@,# P,# @;@T*,# P,# P
M-#<Y-” P,# P,”!N#0HP,# P,# Q,3@Q(# P,# P(&X-“C P,# P,#$Y,S0@
M,# P,# @;@T*,# P,# P,# R,2 P,# P,”!N#0HP,# P,# Q,# R(# P,# P
M(&X-“C P,# P,#(R-C(@,# P,# @;@T*,# P,# P,S R-2 P,# P,”!N#0HP
M,# P,# S,S8R(# P,# P(&X-“C P,# P,#0T.#$@,# P,# @;@T*,# P,# P
M,3,R-2 P,# P,”!N#0HP,# P,# R-#$R(# P,# P(&X-“C P,# P,#4S,S$@
M,# P,# @;@T*,# P,# P-30Q.2 P,# P,”!N#0IT<F%I;&5R#0H/ T*+U-I
M>F4@,3@-“B]2;V]T(#,@,”!2#0HO26YF;R Q(# @4@T*+TE$(%L\939E8S5B
M.&4V-SDV8V,P.31B,V8S-C1A.#<Y8C$Y9C8^/&4V96,U8CAE-C<Y-F-C,#DT
M8C-F,S8T83@W.6(Q.68V/ET-"CX^#0IS=&%R='AR968-"C4U.3<-"B4E14]&
"#0H
end