DSPRelated.com
Forums

Re: Using ADSP21061 interrupt

Started by Bhaskar Das May 20, 2003
Hi Vikas,

> I want to use irq1 interrupt of 21060. How to initilize the interrupt
>vector table? I having some trouble doing this. I am putting interrupt
>code inot the SEG_RTH which starts from 0x020000 which is nothing >but
interrupt vector table.

Incase your are attempting to initialise the interrupt from C file, you may
use either interrupt(..,...) or interrupts(...,...) or interruptf(...,...)
library function calls to initialize the interrupt vector table with the
appropriate interrupt handler function address. You have to include the
header files signal.h along with def2106x.h too.
In case you are coding in assembly language, then you can initilize the
interrupt vector table by using the assembly instruction as given
below,where I attempt to initialise the IRQ1 interrupt handler.

px = pm(_IRQ1Handler);
pm(0x2001c) = px;
px = pm(_IRQ1Handler+1);
pm(0x2001d) = px;
px = pm(_IRQ1Handler+2);
pm(0x2001e) = px;
px = pm(_IRQ1Handler+3);
pm(0x2001f) = px;

To adapt the above method for other interrupts, you may have to change the
interrupt vector location in the above assembly instructions.
Something like

pm(Required Interrupt Vector Location) = px

The adsp manual would get you the exact interrupt vector address for the
hardware and software interrupts made available by the processor.
Are you a student of CAT training school, Indore?

Regards,
Bhaskar Das ______________________________________
Scanned and protected by Email scanner


Hi everybody

I want to use irq1 interrupt of 21060. How to initilize the interrupt vector
table? I having some trouble doing this. I am putting interrupt code inot
the SEG_RTH which starts from 0x020000 which is nothing but interrupt vector
table.
Thanks. Vikas Meshram



On Tue, 20 May 2003 wrote:

> I want to use irq1 interrupt of 21060. How to initilize the interrupt vector
> table? I having some trouble doing this. I am putting interrupt code inot
> the SEG_RTH which starts from 0x020000 which is nothing but interrupt vector
> table.

Howdy Vikas,

irq1 is located at 0x1c, 0x1d, 0x1e, and 0x1f. If your interrupt
routine is longer than 4 instructions, you need to put a jump in there to
some other place.

I have a segment which fills the entire vector table, mostly with rti
instructions. But when I need to use an interrupt I just put in a few
lines of assembler to jump to my routine (or to read a location and stuff
it into ram with fixed registers and pointers).

If you are using C, you need to tell the compiler that your interrupt
routine is for a specific interrupt. It should put the jump instruction
in the right place for you. I only use assembler, so I'm not sure what
that command sequence is.

Patience, persistence, truth,
Dr. mike


Please note that the ISR entry code wrapped
around a C-routine eats a lot of cycles.
Tryed it earlyer but had to change all to asm later.

----- Original Message -----
From: "Mike Rosing" <>
To: <>
Cc: <>
Sent: Tuesday, May 20, 2003 3:34 PM
Subject: Re: [adsp] Using ADSP21061 interrupt > On Tue, 20 May 2003 wrote:
>
> > I want to use irq1 interrupt of 21060. How to initilize the interrupt
vector
> > table? I having some trouble doing this. I am putting interrupt code
inot
> > the SEG_RTH which starts from 0x020000 which is nothing but interrupt
vector
> > table.
>
> Howdy Vikas,
>
> irq1 is located at 0x1c, 0x1d, 0x1e, and 0x1f. If your interrupt
> routine is longer than 4 instructions, you need to put a jump in there to
> some other place.
>
> I have a segment which fills the entire vector table, mostly with rti
> instructions. But when I need to use an interrupt I just put in a few
> lines of assembler to jump to my routine (or to read a location and stuff
> it into ram with fixed registers and pointers).
>
> If you are using C, you need to tell the compiler that your interrupt
> routine is for a specific interrupt. It should put the jump instruction
> in the right place for you. I only use assembler, so I'm not sure what
> that command sequence is.
>
> Patience, persistence, truth,
> Dr. mike >
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the author
of this message will receive your answer. You need to do a "reply all" if
you want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to
>
> To Post: Send an email to
>
> To Leave: Send an email to
>
> Archives: http://groups.yahoo.com/group/adsp
>
> Other Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/



--On Friday, May 23, 2003 9:02 AM +0200 Jens Michaelsen
<> wrote:

> Please note that the ISR entry code wrapped
> around a C-routine eats a lot of cycles.
> Tryed it earlyer but had to change all to asm later.

That depends on the dispatcher used. If you use the new pragma dispatcher,
the wrapper code is very minimal. The smaller the dispatcher you use, the
more contraints are placed on what you can do in C, as the faster
dispatchers save less state.



Since when is the faster dispatcher available?

----- Original Message -----
From: "Kenneth Porter" <>
To: <>
Sent: Saturday, May 24, 2003 12:50 AM
Subject: Re: [adsp] Using ADSP21061 interrupt > --On Friday, May 23, 2003 9:02 AM +0200 Jens Michaelsen
> <> wrote:
>
> > Please note that the ISR entry code wrapped
> > around a C-routine eats a lot of cycles.
> > Tryed it earlyer but had to change all to asm later.
>
> That depends on the dispatcher used. If you use the new pragma dispatcher,
> the wrapper code is very minimal. The smaller the dispatcher you use, the
> more contraints are placed on what you can do in C, as the faster
> dispatchers save less state.
>
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the author
of this message will receive your answer. You need to do a "reply all" if
you want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to
>
> To Post: Send an email to
>
> To Leave: Send an email to
>
> Archives: http://groups.yahoo.com/group/adsp
>
> Other Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/



--On Saturday, May 24, 2003 9:16 AM +0200 Jens Michaelsen
<> wrote:

> Since when is the faster dispatcher available?

I downloaded the document (pragma_interrupt.doc) about it in May of 2002,
which looks like it came with cc21k 6.1.6. (Interim release 6 of VDSP 2.0).


Kenneth,

I'm not able to find this...can you point to it or share it?

Tom Hartnett

----- Original Message -----
From: "Kenneth Porter" <>
To: <>
Sent: Monday, May 26, 2003 1:48 AM
Subject: Re: [adsp] Using ADSP21061 interrupt > --On Saturday, May 24, 2003 9:16 AM +0200 Jens Michaelsen
> <> wrote:
>
> > Since when is the faster dispatcher available?
>
> I downloaded the document (pragma_interrupt.doc) about it in May of 2002,
> which looks like it came with cc21k 6.1.6. (Interim release 6 of VDSP
2.0).




--On Tuesday, May 27, 2003 10:07 AM -0400 Tom Hartnett <>
wrote:

> I'm not able to find this...can you point to it or share it?

Ok, I copied it here:

<ftp://ftp.kensingtonlabs.com/pub/Analog/pragma_interrupt.doc>