DSPRelated.com
Forums

6416 External Interrupt

Started by snuzzbff October 8, 2008
I have a 6416 DSK that I'm trying to enable an interrupt to the
processor on one of the EXTINT pins. Right now I'm flipping bits in
the CPLD CTRL registers to cause an interrupt.

I've looked at the GPIO and Interrupt registers in CodeComposer and it
appears the interrupt is registering (bits that need to be 1 or 0 are
set appropriately). However when I set a break point in the actual ISR
I never reach it.

I've gathered from some of app notes, documentation, and posts that I
need to probably use functions from csl_irq.h but of course haven't had
any luck. Also have tried to use the vector.asm file from Chassaing's
book as a reference but I'm not sure whether I need that file in the
project or not (and if so how to alter it).

Any tips/hints/help is appreciated. Thanks.

- Eric
Eric,

On Wed, Oct 8, 2008 at 4:53 PM, snuzzbff wrote:
> I have a 6416 DSK that I'm trying to enable an interrupt to the
> processor on one of the EXTINT pins. Right now I'm flipping bits in
> the CPLD CTRL registers to cause an interrupt.
>
> I've looked at the GPIO and Interrupt registers in CodeComposer and it
> appears the interrupt is registering (bits that need to be 1 or 0 are
> set appropriately). However when I set a break point in the actual ISR
> I never reach it.
>
> I've gathered from some of app notes, documentation, and posts that I
> need to probably use functions from csl_irq.h but of course haven't had
> any luck. Also have tried to use the vector.asm file from Chassaing's
> book as a reference but I'm not sure whether I need that file in the
> project or not (and if so how to alter it).

Hmmm... this part sounds serious.
Do you know how interrupts work on the c6x??
You definitely need vector.asm or an equivalent file.
Have you ever wondered how an interrupt would find its ISR??
By default the int vectors begin at address 0.
The interrupt vector address [where execution begins after an int] int_number << 5. For example, if you are using int 10 [0x0A], the
address would be 0x0A << 5 or 0x140. You have 8 words to put a branch
to your ISR in assembly [there is probably an example in vectors.asm -
you just need to understand it].
Make sure that you get all of the mapping from the HW pin to the int
straight. If you saw the int in the IFR, you probably do.
Make sure that ints are enabled [GIE] and that your specific int is
enabled [IER].

mikedunn
>
> Any tips/hints/help is appreciated. Thanks.
>
> - Eric

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Eric ,
As Mike suggested , first you need to check whether ISR is properly
configured properly , mapping the GPIO event to HWI interrupt .

Step 1 - Configure GPIO pins for proper mode ( input mode ) & appropriate
interrupt mode - either rising edge or falling edge . Also enable the
register to trigger interrupt ( BINTEN )
Step 2. - Register interrupt handler .
every GPIO bit interrupt is mapped to particular event number
- eg Pin 0 to event number 45 , Pin - 46 ( in C6482 , check the appropriate
in 6416 )
Next , map this event to HWI interrupt required with ISR
funcion required and enable that HWI .

Above description is based on C6482 , hope its same for 6416 ...

- Jai

On Thu, Oct 9, 2008 at 1:29 PM, Michael Dunn wrote:

> Eric,
>
> On Wed, Oct 8, 2008 at 4:53 PM, snuzzbff >
> wrote:
> > I have a 6416 DSK that I'm trying to enable an interrupt to the
> > processor on one of the EXTINT pins. Right now I'm flipping bits in
> > the CPLD CTRL registers to cause an interrupt.
> >
> > I've looked at the GPIO and Interrupt registers in CodeComposer and it
> > appears the interrupt is registering (bits that need to be 1 or 0 are
> > set appropriately). However when I set a break point in the actual ISR
> > I never reach it.
> >
> > I've gathered from some of app notes, documentation, and posts that I
> > need to probably use functions from csl_irq.h but of course haven't had
> > any luck. Also have tried to use the vector.asm file from Chassaing's
> > book as a reference but I'm not sure whether I need that file in the
> > project or not (and if so how to alter it).
>
> Hmmm... this part sounds serious.
> Do you know how interrupts work on the c6x??
> You definitely need vector.asm or an equivalent file.
> Have you ever wondered how an interrupt would find its ISR??
> By default the int vectors begin at address 0.
> The interrupt vector address [where execution begins after an int] > int_number << 5. For example, if you are using int 10 [0x0A], the
> address would be 0x0A << 5 or 0x140. You have 8 words to put a branch
> to your ISR in assembly [there is probably an example in vectors.asm -
> you just need to understand it].
> Make sure that you get all of the mapping from the HW pin to the int
> straight. If you saw the int in the IFR, you probably do.
> Make sure that ints are enabled [GIE] and that your specific int is
> enabled [IER].
>
> mikedunn
> >
> > Any tips/hints/help is appreciated. Thanks.
> >
> > - Eric
> >
> > --
> www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
>
>