Part Number: PROCESSOR-SDK-AM335X
Tool/software: Code Composer Studio
Hi.,
I am doing gpio interrupt. it is not entering to ISR function
i configured switch(external(in board)) as a gpio input, when i pressed switch interrupt register are updating but is not entering to ISR.
i did as below code flow ...please any one help me
int main(void)
{
Board_initCfg boardCfg;
boardCfg = BOARD_INIT_MODULE_CLOCK |
BOARD_INIT_PINMUX_CONFIG | BOARD_INIT_UART_STDIO;
// Initialize Board
status = Board_init(boardCfg);
// interrupt Initialize
INTCInit(0);
INTCEnableCpuIntr(INTC_ARM_IRQ_MASK);
INTCEnableIntr(interrupt_num);
INTCConfigIntr(interrupt_num, (IntrFuncPtr) gpioIsr, 0);
// GPIO Initialize
GPIO0ModuleClkConfig();
GPIO0Pin30PinMuxSetup();
GPIOModuleEnable(SOC_GPIO_0_REGS);
GPIOModuleReset(SOC_GPIO_0_REGS);
GPIODirModeSet(SOC_GPIO_0_REGS, GPIO_SW_PIN_NUMBER, 1);
// gpio interrupt Initialize
GPIOPinIntWakeUpEnable(SOC_GPIO_0_REGS, GPIO_INT_LINE_1, GPIO_SW_PIN_NUMBER);
GPIOIntTypeSet(SOC_GPIO_0_REGS,GPIO_SW_PIN_NUMBER, GPIO_INT_TYPE_RISE_EDGE);
GPIOPinIntEnable(SOC_GPIO_0_REGS, GPIO_INT_LINE_1, GPIO_SW_PIN_NUMBER);
void gpioIsr()
{
volatile uint32_t gpio_pin_value = 0;
appPrint("\n Interrupt occered\n\r");
/* Read pin*/
gpio_pin_value = GPIOPinRead(SOC_GPIO_0_REGS, GPIO_SW_PIN_NUMBER);
GPIOPinIntClear(SOC_GPIO_0_REGS, GPIO_INT_LINE_1, GPIO_SW_PIN_NUMBER);
appPrint("\n Interrupt is generated \n\r");
}
thanks in advance
Regards
chandana