Sign in

username:

password:



Not a member?

Search adsp



Search tips

Subscribe to adsp



adsp by Keywords

AD1819 | AD7332 | ADSP-2106 | ADSP-21060 | ADSP-21065L | ADSP-2116 | ADSP-21160M | ADSP-2181 | ADSP-218x | ADSP-219 | ADSP-2199 | ADSP219 | BF531 | BF532 | BF533 | BF535 | Blackfin | FFT | JTAG | LDF | SDRAM | SHARC | SPORT | UART | VDSP++ | VisualDSP

Discussion Groups

Discussion Groups | Analog Devices DSPs | Return from interruption in C Code

Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).

  

Post a new Thread

Return from interruption in C Code - fire...@yahoo.es - May 15 7:13:43 2008



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

------------------------------------



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: Return from interruption in C Code - Jaime Andres Aranguren Cardona - May 15 8:07:52 2008

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

------------------------------------



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: Return from interruption in C Code - fire...@yahoo.es - May 16 8:56:10 2008

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
>
>------------------------------------

------------------------------------



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: Re: Return from interruption in C Code - Jaime Andres Aranguren Cardona - May 16 13:29:40 2008

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

------------------------------------



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )