I tried regular way and tried with the rom function, did not work, can anyone give me a idea?
#include <stdint.h> #include <stdbool.h> #include "inc/hw_ints.h" #include "inc/hw_memmap.h" #include "inc/hw_nvic.h" #include "inc/hw_types.h" #include "driverlib/gpio.h" #include "driverlib/interrupt.h" #include "driverlib/pin_map.h" #include "driverlib/systick.h" #include "driverlib/sysctl.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "drivers/pinout.h" #include "utils/uartstdio.h" #include "inc/tm4c129encpdt.h" uint32_t g_ui32SysClock; void InitializeSensor(void) { ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOJ); //PORT J ROM_SysCtlDelay(3); GPIOPinTypeGPIOInput(GPIO_PORTJ_BASE, GPIO_PIN_1); //PJ1 // GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_1, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPD); ROM_GPIOIntTypeSet(GPIO_PORTJ_BASE, GPIO_PIN_1, GPIO_RISING_EDGE); GPIOIntEnable(GPIO_PORTJ_BASE, GPIO_PIN_1); ROM_IntEnable(INT_GPIOJ); } void GPIOjIntHandler(void) { LEDWrite(CLP_D1, 1); LEDWrite(CLP_D1, 0); } int main(void) { // // Run from the PLL at 120 MHz. // g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000); // // Configure the device pins. // PinoutSet(false, false); //define the input for the switch GPIOPinTypeGPIOInput(GPIO_PORTJ_BASE,GPIO_PIN_0); GPIOPinTypeGPIOInput(GPIO_PORTJ_BASE,GPIO_PIN_1); //define the input for the switch GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE,GPIO_PIN_0); GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE,GPIO_PIN_1); InitializeSensor(); //HWREG(NVIC_SW_TRIG) = INT_GPIOJ - 16; /* GPIO_PORTJ_AHB_IS_R &= ~0x10; GPIO_PORTJ_AHB_IBE_R &= ~0x10; GPIO_PORTJ_AHB_IEV_R &= ~0x10; GPIO_PORTJ_AHB_ICR_R = 0x10; GPIO_PORTJ_AHB_IM_R |= 0x10; ROM_IntEnable(INT_GPIOJ); ROM_IntMasterEnable(); ROM_IntPrioritySet(INT_GPIOJ, 0x00); ROM_IntMasterDisable(); */ while (1) { } return 0; }