Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).
Hello How can I return from an interruption working in C Code? In other words: what's the equivalent to RTI or RETI (assembler) in C Code? I'm searching in the documentation and in forum but I don't find anything. Thanks you for all your help Eduardo Méndez ------------------------------------
Hello, You do not need to place an RTI instruction while in C code. When you decla= re a function with the "interrupt" pragma, the compiler will know that this= one is the ISR (Interrupt Servicing Routine) and will create all the addit= ional code to correclty handling the interrupt when it occurs, inlcuding th= e RTI at the end. Your question was like "How can I return from a subroutine working in C Cod= e? In other words: what's the equivalent to RTS (assembler) in C Code?" And I guess you= already understand that the C run time / compiler takes care of that, gene= rating for you the RTS where needed; you actually do not have to place manu= ally in your C code. Is equivalent in the interrupt case. Regards. =20 Jaime Andr=E9s Aranguren Cardona j...@ieee.org j...@computer.org ----- Original Message ---- From: "f...@yahoo.es" <f...@yahoo.es> To: a...@yahoogroups.com Sent: Thursday, May 15, 2008 4:02:43 AM Subject: [adsp] Return from interruption in C Code Hello How can I return from an interruption working in C Code? In other words: wh= at's the equivalent to RTI or RETI (assembler) in C Code? I'm searching in = the documentation and in forum but I don't find anything. Thanks you for all your help Eduardo M=E9ndez ------------------------------------
Hello Thanks you all of you for your help. It was very useful. As Jaime has said, the solution to indicate to the DSP that the ISR has finished (in C Code), is simply declare the function with "#pragma interrupt". Like this: #pragma interrupt void address(int dummy) Then the compiler will place an RETI instruction to return from this routine while generating the code. Not RETS. Thanks you Eduardo MÉNDEZ Hello > >How can I return from an interruption working in C Code? In other words: what's the equivalent to RTI or RETI (assembler) in C Code? I'm searching in the documentation and in forum but I don't find anything. > >Thanks you for all your help > >Eduardo Méndez > >------------------------------------ ------------------------------------
Hello, Eduardo, I am glad that you got it. Remember that you also need to use of of the interrupt() functions, in one = of its many flavors (normal, fast, super-fast, etc)=A0to hook up the ISR to= the interrupt source. Regards, =A0 Jaime Andr=E9s Aranguren Cardona j...@ieee.org j...@computer.org ----- Original Message ---- From: "f...@yahoo.es" <f...@yahoo.es> To: a...@yahoogroups.com Sent: Friday, May 16, 2008 4:13:27 AM Subject: [adsp] Re: Return from interruption in C Code Hello Thanks you all of you for your help. It was very useful. As Jaime has said, the solution to indicate to the DSP that the ISR has fin= ished (in C Code), is simply declare the function with "#pragma interrupt".= Like this: #pragma interrupt void address(int dummy) Then the compiler will place an RETI instruction to return from this routin= e while generating the code. Not RETS. Thanks you Eduardo M=C9NDEZ Hello > >How can I return from an interruption working in C Code? In other words: w= hat's the equivalent to RTI or RETI (assembler) in C Code? I'm searching in= the documentation and in forum but I don't find anything. > >Thanks you for all your help > >Eduardo M=E9ndez > >------------------------------------ ------------------------------------ NEW!=A0 You can now post a message or access and search the archives of thi= s group on DSPRelated.com: http://www.dsprelated.com/groups/adsp/1.php _____________________________________ =20=20=20=20=20=20 ------------------------------------