Part Number: TM4C1294NCPDT
Tool/software: TI-RTOS
Hi,
I am using an EK_TM4C1294XL development board and I want to create an interrupt handler on pin PP3 (Port P, pin 3). For this, I adjusted the EK_TM4C1294XL.c and EK_TM4C1294XL.h files and added the pin using the following code for the .c file:
GPIO_PinConfig gpioPinConfigs[] = {
/* Input pins */
/* EK_TM4C1294XL_USR_SW1 */
GPIOTiva_PJ_0 | GPIO_CFG_IN_PD | GPIO_CFG_IN_INT_RISING,
/* EK_TM4C1294XL_USR_SW2 */
GPIOTiva_PJ_1 | GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_RISING,
/* EK_TM4C1294XL_PP3 */
GPIOTiva_PP_3 | GPIO_CFG_IN_PD | GPIO_CFG_IN_INT_RISING,
/* Output pins */
/* EK_TM4C1294XL_USR_D1 */
GPIOTiva_PN_1 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,
/* EK_TM4C1294XL_USR_D2 */
GPIOTiva_PN_0 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,
};
and for the .h file:
typedef enum EK_TM4C1294XL_GPIOName {
EK_TM4C1294XL_USR_SW1 = 0,
EK_TM4C1294XL_USR_SW2,
EK_TM4C1294XL_PP3,
EK_TM4C1294XL_D1,
EK_TM4C1294XL_D2,
EK_TM4C1294XL_GPIOCOUNT
} EK_TM4C1294XL_GPIOName;
I attach the interrupt in the main file using this code:
int main(void)
{
/* Call board init functions */
Board_initGeneral();
Board_initGPIO();
Board_initEMAC();
System_printf("Starting the TCP Echo example\nSystem provider is set to "
"SysMin. Halt the target to view any SysMin contents in"
" ROV.\n");
/* SysMin will only print to the console when you call flush or exit */
System_flush();
setUpPool();
GPIO_write(Board_LED0, Board_LED_ON);
GPIO_setCallback(EK_TM4C1294XL_PP3, gpioButtonFxn0);
GPIO_enableInt(EK_TM4C1294XL_PP3);
/* Start BIOS */
BIOS_start();
return (0);
}
However, when I connect pin PP3 to 3.3V for the rising edge, I get an error and it goes to exit.
Can someone help me?
Thanks,
Jonas.