自己按照Tiva写的总会进入DefaultIntHandler
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
/* PE4 */
void exit_init(void)
{
/* problem unsolved */
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
GPIODMATriggerEnable(GPIO_PORTE_BASE,GPIO_PIN_4);
GPIOPinTypeGPIOInput(GPIO_PORTE_BASE, GPIO_PIN_4);
GPIOPadConfigSet(GPIO_PORTE_BASE, GPIO_PIN_4, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPD);
GPIOIntTypeSet(GPIO_PORTE_BASE, GPIO_PIN_4 , GPIO_RISING_EDGE);
GPIOIntRegister(GPIO_PORTE_BASE, uDMAIntHandler);
GPIOIntEnable(GPIO_PORTE_BASE, GPIO_PIN_4);
IntEnable(INT_GPIOE);
}
//***************************************************************************** // // This is the code that gets called when the processor receives an unexpected // interrupt. This simply enters an infinite loop, preserving the system state // for examination by a debugger. // //***************************************************************************** static void IntDefaultHandler(void) { // // Go into an infinite loop. // while(1) { } }
进入IntDefaultHandler是因为收到了意外中断
建议您加上IntMasterEnable();然后在中断服务程序内加断点调试一下,看能否进入中断