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.

DM6437 GPIO interrupt not working

I need help in generating an interrupt on DM6437 pin GPIO4 - GP[4]

I set my TConf as

bios.HWI.instance("HWI_INT13").interruptSelectNumber = 68;

bios.HWI.instance("HWI_INT13").fxn = prog.extern("SWC_carrier_freq");

bios.HWI.instance("HWI_INT13").useDispatcher = 1;

I also configured the register GPIO BINTEN

but still my IRQ is not triggered

 

 

Here is the code for my register configuration

 

CSL_SysctlRegsOvly sysRegs = (CSL_SysctlRegsOvly)CSL_SYS_0_REGS;

CSL_FINST(sysRegs-> PINMUX1, SYS_PINMUX1_PWM1BK, RESETVAL);

but still my SwC_Carrier_freq function is not being triggered

 

CSL_GpioRegsOvly gpioRegs = (CSL_GpioRegsOvly)CSL_GPIO_0_REGS;

CSL_FINST(gpioRegs-> BINTEN, GPIO_BINTEN_EN0,ENABLE);

CSL_FINST(gpioRegs->BINTEN,GPIO_BINTEN_EN1,ENABLE);

CSL_FINST(gpioRegs-> SET_RIS_TRIG01, GPIO_SET_RIS_TRIG01_SETRIS4,RESETVAL);

 

I also set the pin to input:

  • binyam kah said:
    bios.HWI.instance("HWI_INT13").fxn = prog.extern("SWC_carrier_freq");

    Perhaps there needs to be _ inserted before SWC_carrier_freq so the argument is ("_SWC_carrier_freq"). The _ is required to match the label used for the C function. I am assuming many things, but this is a common thing I have missed before.

    The second common problem is not enabling interrupt 13. You have to do this manually, usually in main().

    There are a large range of other things that could be wrong, so if these are not the problem you should try a small CPU test that reads the GPIO pin to verify that it is toggling at the register bit as expected. Then start looking at all the registers in the logic path from the GPIO to the IFR/IER and then use breakpoints to see if HWI_INT13 is starting or not, etc.

    Regards,
    RandyP

  • I have tried everything you said but still GP interrupt could not be executed. Bascially I am using DM6437 EVM, and trying to detect Switch 4 (SW 4) when it pressed and the switch that was detected. I also setup I2C_DATA to read a byte so it can know which switch was pressed.

    Will you please e-mail me a simple code that is able to do this at bineyamk@hotmail.com. I really need your help, thanks again for the co-operation

    regards,

    bineyam

  • bineyam,

    In your register configuration, you use RESETVAL in two places. Is this based on an example or is this parameter unused? This may be correct, but it does not seem like the value you would want to use. If this was chosen deliberately, then I am sure you chose correctly, but it raised the question when I saw it.

    After initialization, what hex value do you read at SET_RIS_TRIG01? CLR_RIS_TRIG01? SET_FAL_TRIG01? CLR_FAL_TRIG01?

    While pressing SW4, what hex value do you read at IN_DATA01?

    After toggling SW4, what hex value do you read at INTSTAT01?

    After toggling SW4, what hex value do you read at Core Registers IER and IFR?

    Regards,
    RandyP

  • Hi ,RandyP

     

    there is a demo code about I2C without using interrupt in the pspdriver,but I want to read and write data on I2C bus using interrupt on dm6437.

    would you offer me a demo code about that?

    thank you