I am integrating a new system which will have a custom board but in the meantime I am using the eInfoChips C6657 EVM. I have two interrupt sources connected to GPIO15 and GPIO14 via the Debug Header pins 78 and 80. Individually either GPIO will work as an interrupt as desired, but when programmed together only the first GPIO works. In a previous thread I already discovered that by default the GPIO_soc.c file sets up for a dedicated interrupt (#10 I believe) but that is in conflict with NDK so, I changed the GPIO_soc file to use Event Combiner interrupts instead. See below.
/* GPIO port 0 pin 14 */
{
16,
CSL_GEM_GPINT14, /* DSP corePac GPIO pin 14 interrupt event*/
INVALID_INTC_MUX_NUM,
},
/* GPIO port 0 pin 15 */
{
16,
CSL_GEM_GPINT15, /* DSP corePac GPIO pin 15 interrupt event*/
INVALID_INTC_MUX_NUM,
},
Again, this works, when programming only 1 GPIO at a time.
I traced the issue to the following code in GPIO_v0.c
/* If Hwi has not already been created, do so */
if ((portHwiCreatedBitMask & gpioPortIntBitMask) == 0U) {
if (intCfg->intcMuxNum != INVALID_INTC_MUX_NUM)
{
/* Setup intc mux */
muxInParams.arg = (uintptr_t)(portNum);
muxInParams.muxNum = intCfg->intcMuxNum;
muxInParams.muxInEvent = intCfg->intcMuxInEvent;
muxInParams.muxOutEvent = intCfg->intcMuxOutEvent;
muxInParams.muxIntcFxn = (MuxIntcFxn)(&GPIO_v0_hwiFxn);
GPIO_osalMuxIntcSetup(&muxInParams, &muxOutParams);
interruptRegParams.corepacConfig.isrRoutine = muxOutParams.muxIntcFxn;
interruptRegParams.corepacConfig.arg = muxOutParams.arg;
}
else
{
interruptRegParams.corepacConfig.isrRoutine = (&GPIO_v0_hwiFxn);
interruptRegParams.corepacConfig.arg = (uintptr_t)(portNum);
}
The problem is the statement
if ((portHwiCreatedBitMask & gpioPortIntBitMask) == 0U)
This is treating the GPIO as is there is only one interrupt per "port" whereas the C6657 is capable if one interrupt per pin I believe.
I commented out the portHwiCreatedBitMask and now both GPIO can be programmed as interrupts and works as desired.
If this is thought to be desired operation by TI, please explain how to use 2 GPIO pins as interrupts at the same time. I don't mean the same instant in time, just two interrupts functional.
