DSPRelated.com
Forums

How to add a GPIO pin signal as HWI

Started by flor...@yahoo.com September 28, 2007
Hi all,
I was searching all the tutorial given by TI-DSP, but no where it is given clearly how to add a GPIO pin as a HWI. I am working with EVM-DM6437 board. In this board there is IO expander which gives a interrupt signal to the DM6437 GPIO pin:GP[4]. I want to detect this interrupt as a HWI and run a ISR.

Is any one who has done this before can help to configure a gpio (say GP[4]) as a HWI using DSP/BIOS.

Materials I have read:
1. DSP/bios tutorial
2. DSP/BIOS user guide
3. DM6437 GPIO user guide.

thanks
Reny
Reny-

> I was searching all the tutorial given by TI-DSP, but no where it is
> given clearly how to add a GPIO pin as a HWI. I am working with EVM-DM6437
> board. In this board there is IO expander which gives a interrupt signal to
> the DM6437 GPIO pin:GP[4]. I want to detect this interrupt as a HWI and run
> a ISR.
>
> Is any one who has done this before can help to configure a gpio (say GP[4])
> as a HWI using DSP/BIOS.
>
> Materials I have read:
> 1. DSP/bios tutorial
> 2. DSP/BIOS user guide
> 3. DM6437 GPIO user guide.

On TI DSP devices GPIO pins typically cannot function as edge or level-triggered
interrupts. If you want your code to "know" a change on a GPIO pin, there has to be
polling. At least, this has been the case for many different TI devices, which is
probably why you're not finding references in the TI docs.

If the DM6437 chip data sheet specifically says that GPIO4 can cause an interrupt,
but you can't see this option when you configure HWIs in DSP/BIOS, then it may be a
relatively new feature, and you may need a CCS software update.

-Jeff
At 02:37 28.09.2007 -0400, f...@yahoo.com wrote:

>Hi all,
>I was searching all the tutorial given by TI-DSP, but no where it is given
>clearly how to add a GPIO pin as a HWI. I am working with EVM-DM6437
>board. In this board there is IO expander which gives a interrupt signal
>to the DM6437 GPIO pin:GP[4]. I want to detect this interrupt as a HWI and
>run a ISR.
>
>Is any one who has done this before can help to configure a gpio (say
>GP[4]) as a HWI using DSP/BIOS.
>
>Materials I have read:
>1. DSP/bios tutorial
>2. DSP/BIOS user guide
>3. DM6437 GPIO user guide.

Reny,

I am not familiar with the 6437, but on all other C6000 family devices
GPO[7..4] are by default used as external interrupt inputs EXT_INT[7..4],
and mapped to interrupt vectors 7..4. A rising edge triggers an interrupt -
this can be changed to falling edge in the INTPOL register if required.

Also you can setup any GPIO pin to generate interrupts with the GPXEN,
GPXDIR and GPXPOL registers - again, I am not sure if this is supported on
the 6437.

Regards,
Adolf Klemenz, D.SignT
Hi Jeff/ Clemenz,
Thanks for your support, but still we are not able to get the interrupt call the ISR. what happens is when we give External Interrupt through GPIO, the Interrupt status register is updated, but the ISR is not called?

Any clue would be very much appreciated.

thanks in advance
Reny

Hi all,
> I was searching all the tutorial given by TI-DSP, but no where it is given clearly how to add a GPIO pin as a HWI. I am working with EVM-DM6437 board. In this board there is IO expander which gives a interrupt signal to the DM6437 GPIO pin:GP[4]. I want to detect this interrupt as a HWI and run a ISR.
>
>Is any one who has done this before can help to configure a gpio (say GP[4]) as a HWI using DSP/BIOS.
>
>Materials I have read:
>1. DSP/bios tutorial
>2. DSP/BIOS user guide
>3. DM6437 GPIO user guide.
>
>thanks
>Reny
Hi Reny,

if the interrupt event is latched in the IFR, but the interrupt is not
executed, the problem is typically caused by
- GIE bit not set in CSR register
- interrupt disabled in the IER register
- interrupt vector table not correct

Best Regards,
Adolf Klemenz, D.SignT
At 06:10 10.10.2007 -0400, f...@yahoo.com wrote:

>Hi Jeff/ Clemenz,
>Thanks for your support, but still we are not able to get the interrupt
>call the ISR. what happens is when we give External Interrupt through
>GPIO, the Interrupt status register is updated, but the ISR is not called?
>
>Any clue would be very much appreciated.
>
>thanks in advance
>Reny