TI E2E™ 设计支持论坛将于 5 月 30 日至 6 月 1 日进行维护。如果您在此期间需要技术支持,请联系 TI 的客户支持中心寻求帮助。

NMI interrupt (PD7)能否改成低电平触发中断

void
PortFunctionInit(void)
{
//
// Enable Peripheral Clocks
//
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);

//
// Enable pin PD7 for NMI0 NMI
// First open the lock and select the bits we want to modify in the GPIO commit register.
//
HWREG(GPIO_PORTD_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY;
HWREG(GPIO_PORTD_BASE + GPIO_O_CR) = 0x80;

//
// Now modify the configuration of the pins that we unlocked.
//
MAP_GPIOPinConfigure(GPIO_PD7_NMI);

//
// Make the pin(s) be peripheral controlled
//
MAP_GPIODirModeSet(GPIO_PORTD_BASE, GPIO_PIN_7, GPIO_DIR_MODE_HW);

//
// Set the pad(s) for standard push-pull operation.
//
MAP_GPIOPadConfigSet(GPIO_PORTD_BASE, GPIO_PIN_7, GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD);
}