This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Enabling a (simple) GPIO interrupt....??

Guru 15580 points
Other Parts Discussed in Thread: OMAP-L138

/rant

Arrrggghh!

/rant

Ok, I've spent most of the day trying to do what I would consider a "simple" task: enable one of my GPIO lines to be used as an interrupt from an external chip to call a DSPBIOS function in my code. However (as you can probably tell) the interrupt does not make it through to my DSPBIOS HWI.

I want to use GP2[14] as my incoming interrupt. Here's what I've done:

1. Set PINMUX5_7_4 to 0x08 (OMAP-L138 Application Processor System Reference Guide sprugm7d, p187, table 11-27, Selects Function GP2[14])

2. Set GPIO->BINTEN = 0x04 (TMS320C674X-OMAP-L1X GPOI User Guide -sprufl8b, p20, table 4, Enables Bank23 interrupts)

3. Set GPIO->SET_RIS_TRIG = 0x00004000 (set bit 14) ((TMS320C674X-OMAP-L1X GPIO User Guide -sprufl8b, p31, Fig 30, Set GP2P14 = 0x1)

4. Configured HWI_INT4 in DSP/BIOS to watch interrupt selection number 49 (OMAP-L138 Low-Power Applications Processor - SPRS586B , pg 104, table 6-8) and call an interrupt service routine in my code.

HOWEVER, the ISR is never called. 

I have checked the following registers;

1. IINTMUX1_INTSEL4 = 49 which is correct (TMS320C674xDSP Megamodule Ref Guide - sprufk5a, p178, Fig 7-35)

2. EVTFLG1_BIT17(EF49) = 0x1 which is correct (TMS320C674xDSP Megamodule Ref Guide - sprufk5a, p 170, Fig 7-16)

3. GPIO_INTSTAT23_GP2P14 = 0x1(PEND), which is correct ((TMS320C674X-OMAP-L1X GPIO User Guide -sprufl8b, p39, Fig 50)

...again, all of the config bits seem correct, all of the registers are showing correct values, but my ISR is never called.

Can anyone see a problem with what I am doing? Any guidance would be appreciated.

Thx,

MikeH

 

  • Mike,

    It looks like you were very thorough.  Do any other interrupts work on DSP?

    If not, the C674x ISA doc also includes some other core registers that can be viewed for debug purposes.

    I would try setting a breakpoint on the interrupt vector table for INT4.  In case the ISR was not properly dispatched, the DSP hardware interrupt should at the very least end up at the INT4 vector if the interrupt is reaching the DSP.  If it does not go there, check the IFR status for IF4, and the IER register to make sure that IE4 and NMIE bits are both enabled.

    -Tommy

  • Hi Mike

    I hope you have also looked at the DSP interrupt examples (NON BIOS) in the quickStartOMAPL1xrCSL

    http://processors.wiki.ti.com/index.php/QuickStartOMAPL1x_rCSL

    These have some DSPINT examples that should help you ramp up on the DSP interrupt controller rather then just looking at the user guides.

    Regards

    Mukul

     

  • Where do I download the CSL for the OMAP-L138?

  • Since you are working with BIOS, there are some rCSL examples already available in the software package.  Incase it is needed, here is the download link to the BIOS software download, http://focus.ti.com/docs/toolsw/folders/print/biossw-c6748.html.

    If you installed using default settings, please navigate to C:\Program Files\Texas Instruments\pspdrivers_01_30_01\packages\ti\pspiom\cslr.  From there, you can select the device you are working on (either OMAP-L138 or C6748). In both device folder, there is a stand-alone GPIO interrupt rCSL example that you can use as reference.

    Hope this helps.

    --Christina

     

  • Thanks Christina. The GPIO example is exactly what I was looking for.

     

  • Christina,

    clam said:
    Since you are working with BIOS, there are some rCSL examples already available in the software package

    I have been working with this example and am a bit confused as to how this is a "bios" example? It does not use bios. In fact, it includes an .asm interrupt vector table.

    Thx,

    MikeH

  • Since you mentioned that you are working with BIOS, I know there are some low-level (non-BIOS) rCSL code that is provided in the BIOS software package.  You could use the low-level rCSL code as a reference code in setting up the GPIO for your BIOS application.  It is also helpful to run the stand-alone rCSL code on your custom board to confirm that the GPIO is working properly before integrating it to your BIOS application.

    --Christina

  • Got it!

    So, I am assuming that I can use this same code in my bios application by merely deleting the interrupt vector table and configuring my interrupts in my .tcf file....?

    Thx,

    Mike

     

  • Mike,

    You should be able to re-use most of the rCSL GPIO code and add in your BIOS interrupt related software to the code.

    --Christina