Hello,
I am unable to configure my F28379D to generate ISR at rising edge of GPIO23, please review code snippets below, thanks:
CPU01_main.c
/* GPIO23 Interrupt from Altera */ GPIO_setDirectionMode(23 ,GPIO_DIR_MODE_IN); GPIO_setQualificationMode(23, GPIO_QUAL_SYNC); GPIO_setMasterCore(23, GPIO_CORE_CPU2);
CPU02_main.c
/* * Configure ALTERA(FPGA) to DSP interrupt line */ void AlteraInerruptCfg() { /* Enable X-INT interrupt in the PIE: Group 1 interrupt 4 */ Interrupt_enable(INT_XINT1); /* Set Interrupt GPIO */ GPIO_setInterruptPin(23, GPIO_INT_XINT1); /* Edge type interrupt */ GPIO_setInterruptType(GPIO_INT_XINT1, GPIO_INT_TYPE_RISING_EDGE); /* Enable XINT1 */ GPIO_enableInterrupt(GPIO_INT_XINT1); }
my cfg file:
/* ================ Hwi configuration ================ */ //var Hwi = xdc.useModule('ti.sysbios.hal.Hwi'); var c28Hwi = xdc.useModule('ti.sysbios.family.c28.Hwi'); /* * Create Hwi instances for PIE. * * Using the mappings found in the table "PIE MUXed Peripheral Interrupt Vector * Table" (found in the SYS/BIOS API Documentation), the following mappings for * interrupt number can be found: * * PIE group 1, interrupt 4 -> interrupt number 35 -> XINT1 interrupt * * * Both PIE interrupts are also configured to run the interrupt service routine * 'myIsr()' when triggered. */ /* PIE group 1, interrupt 4 */ var interruptNum = 35; var hwiParams = new c28Hwi.Params(); hwiParams.arg = interruptNum; hwiParams.enableAck = true; hwiParams.maskSetting = c28Hwi.MaskingOption_BITMASK; hwiParams.disableMask = 0x0; hwiParams.restoreMask = 0x0; c28Hwi.create(interruptNum, "&xint1_isr", hwiParams);