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.

TMDSLCDK6748: Implementing GPIO interrupt into MCASP project

Part Number: TMDSLCDK6748


I am currently trying to implement GPIO push button interrupts into my MCASP project. The MCASP project I am working on is based off of the MCASP example project. It also already interacts with the push buttons, but not through the use of interrupts. 

I managed to get the push buttons working as interrupts in the GPIO example project as a start, but when moving into the MCASP project I am unable to get them functioning. 

I reviewed the GPIO documentation and the methods used in the GPIO example project and I believe I have it set up correctly in my MCASP project. This includes calling the setup functions and modifying the gpioPinConfigs and gpioCallbackFunctions in GPIO_board.c.

My question is: Is there anything that is specific to the MCASP example project that would restrict GPIO interrupts from working? Are there any modifications that I need to make to the .cfg file other than loading the GPIO package?

Thank you

  • Hello Ryan,

    The problems was most likely caused by GPIO and MCASP using the same interrupt event combiner. In mcasp_soc.c, there is:

                Mcasp_deviceInstInfo[i].txIntNum = OSAL_REGINT_INTVEC_EVENT_COMBINER;
                Mcasp_deviceInstInfo[i].rxIntNum = OSAL_REGINT_INTVEC_EVENT_COMBINER;
    

    In GPIO_soc.c, there is:

    GPIO_IntCfg GPIO_defaultIntCfg[GPIO_NUM_BANKS_PER_PORT] =
    {
        /* GPIO port 0 bank 0 */
        {
    #ifdef _TMS320C6X
            OSAL_REGINT_INTVEC_EVENT_COMBINER, /* default DSP Interrupt vector number, can be set in GPIO_socSetInitCfg() API */
    

    Can you try a different event combiner for MCASP, for example:

                Mcasp_deviceInstInfo[i].txIntNum = 15;
                Mcasp_deviceInstInfo[i].rxIntNum = 15;

    Regards,

    Jianzhong