Hi,
For LM4F232H5QD controller on custom board, I am configuring the port A pin PA2 to handle 1PPS interrupt. Currently I am not getting any interrupt at PA2 with following setting. we confirm the voltage of the 1PPS signal and its 3.3volt.
Following is the code :
******************************************************************************************************************
#define GPIO_PA2_PIN3_GPIO 0x00000800
#define GPIO_PA2_PIN4_GPIO 0x00000C00
#define GPIO_PA2_PIN5_GPIO 0x00001000
#define GPIO_PA2_PIN6_GPIO 0x00001400
void InitGPS1PPSInterrupt(void)
{
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
SysCtlDelay(1);
HWREG(GPIO_PORTA_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY_DD;
HWREG(GPIO_PORTA_BASE + GPIO_O_CR) |= 0x3C;
/*
* Initialize the GPIO pin configuration.
* Set pins 2 as input, SW controlled.
*/
ROM_GPIOPinTypeGPIOInput(GPIO_PORTA_BASE, GPIO_PIN_2);
ROM_GPIOPinConfigure(GPIO_PA2_PIN3_GPIO);
ROM_GPIOPinConfigure(GPIO_PA2_PIN4_GPIO);
ROM_GPIOPinConfigure(GPIO_PA2_PIN5_GPIO);
ROM_GPIOPinConfigure(GPIO_PA2_PIN6_GPIO);
/*
* set the pins 2 as inputs
*/
GPIODirModeSet(GPIO_PORTA_BASE, GPIO_PIN_2, GPIO_DIR_MODE_IN);
/*
* Make pins 2 rising edge triggered interrupts.
*/
ROM_GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_2 , GPIO_RISING_EDGE);
HWREG(GPIO_PORTA_BASE + GPIO_O_LOCK) = 0;
/*
* Register the port-level interrupt handler. This handler is the first
* level interrupt handler for all the pin interrupts.
*/
GPIOPortIntRegister(GPIO_PORTA_BASE, GPS1PPSInterruptHandler);
/*
* Clear Any existing Interrupt
*/
ROM_GPIOPinIntClear(GPIO_PORTA_BASE,GPIO_PIN_2);
/*
* Enable the pin interrupts.
*/
ROM_GPIOPinIntEnable(GPIO_PORTA_BASE, GPIO_PIN_2);
/*
* Enable interrupts on port A
*/
/*
* Clear Any existing Interrupt
*/
ROM_GPIOPinIntClear(GPIO_PORTA_BASE,GPIO_PIN_2);
ROM_IntMasterEnable();
}
*************************************************************************************************************
Please could any one help me to achieve this task.
Thank you in advance.
Regards,
- Anand M