MCU: TM4C1294NCPDT
CCS: v6.0.1.0040
-
Hi,
I am trying to enable the NMI functionality of the TM4C1294NCPDT MCU using the following code, but due to some reason (which I am unable to figure out), its NOT working.
-
// Enable NMI
HWREG(GPIO_PORTD_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY;//0x4C4F434B
HWREG(GPIO_PORTD_BASE + GPIO_O_CR) |= 0x80;
HWREG(GPIO_PORTD_BASE + GPIO_O_AFSEL) |= 0x80;
HWREG(GPIO_PORTD_BASE + GPIO_O_DEN) |= 0x80;
HWREG(GPIO_PORTD_BASE + GPIO_O_LOCK) = 0;
//
GPIOPinTypeGPIOInput(GPIO_PORTD_BASE, GPIO_PIN_7);//PWR_FAIL_DETECT_IN,
GPIOPadConfigSet(GPIO_PORTD_BASE, GPIO_PIN_7, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPD);
-
I have connected a switch externally with the PD7 pin of the MCU & verified that normally (when the switch is NOT pressed) the voltage at pin PD7 is 0 volts & upon switch press the voltage at the pin PD7 becomes 3.3 volts. Now, when the MCU is running the firmware, the switch press is having NO effect.
Can anyone help me in figuring out what is going wrong? Or am I missing something somewhere?
I read through a few other posts, but it didn't help!!
-
Thanks
-
Regards
Soumyajit