Part Number: DK-TM4C129X
Hello,
I am using the TIVA TI-RTOS and DK-TM4C129X board.
I've been having an issue with GPIO falling edge HWI at start-up. I am using GPIOG pin 1 and GPIOG pin 0. both are connected to square wave sources but different frequencies.
I have a square wave present at the pins soon as the board starts but I don't want an interrupt triggered at start up. I unchecked the box "enable at start up" in the config file. And below is my initialize code for the GPIO.
GPIOPinTypeGPIOInput(GPIO_PORTG_BASE, GPIO_PIN_0); GPIOIntTypeSet(GPIO_PORTG_BASE, GPIO_PIN_0, GPIO_FALLING_EDGE); GPIOPadConfigSet(GPIO_PORTG_BASE, GPIO_PIN_0, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); GPIOPinTypeGPIOInput(GPIO_PORTG_BASE, GPIO_PIN_1); GPIOIntTypeSet(GPIO_PORTG_BASE, GPIO_PIN_1, GPIO_FALLING_EDGE); GPIOPadConfigSet(GPIO_PORTG_BASE, GPIO_PIN_1, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); unsigned int status; status = GPIOIntStatus(GPIO_PORTG_BASE, true); GPIOIntClear(GPIO_PORTG_BASE, status); GPIOIntEnable(GPIO_PORTG_BASE, GPIO_INT_PIN_0); GPIOIntEnable(GPIO_PORTG_BASE, GPIO_PIN_1); IntDisable(INT_GPIOG);
Checking or unchecking the box to enable at start up doesn't seem to do anything.
I even tried initializing with
GPIOIntDisable(GPIO_PORTG_BASE, GPIO_INT_PIN_0); GPIOIntDisable(GPIO_PORTG_BASE, GPIO_PIN_1); IntDisable(INT_GPIOG);
but interrupt still triggers once at start up. The IntDisbale does have an effect because after the first trigger, the interrupt is disabled. I would have to call IntEnable in order for the interrupt to work again. But still, no matter what I do, the interrupt is triggered at start up. What should I do to prevent it from happening? Any thoughts is appreciated.
Here is my ISR
void app_portg_isr(void) { volatile unsigned int status; status = GPIOIntStatus(GPIO_PORTG_BASE, true); GPIOIntClear(GPIO_PORTG_BASE, status); if(status == GPIO_PIN_0) { Semaphore_post(run_capture_frame1_task_semaphore); }//end if(status == GPIO_PIN_0) else if(status == GPIO_PIN_1) { Semaphore_post(run_capture_frame2_task_semaphore); }//end else if(status == GPIO_PIN_1) }//end void app_portg_isr(void)
Thanks.
AJ