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.

TM4C123GH6PM串口中断问题



当调用   IntEnable(UART1_BASE)   函数时,就会进入  FaultISR()  死循环。

FPUEnable();
FPULazyStackingEnable();
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_2);
 //设置时钟直接使用外部晶振     
SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL |SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);    
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);    
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
//配置PB0和PB1为串口1引脚    
GPIOPinTypeUART(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1);     
GPIOPinConfigure(GPIO_PB0_U1RX);    
 GPIOPinConfigure(GPIO_PB1_U1TX);    
 UARTEnable(UART1_BASE);    
 SysCtlPeripheralReset(SYSCTL_PERIPH_UART1);//复位UART1    
 //配置UART0为115200,8-N-1    
 UARTConfigSetExpClk(UART1_BASE, SysCtlClockGet(), 9600,(UART_CONFIG_WLEN_8 |UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));
  //使能中断    
IntMasterEnable();     
//使能串口中断    
 IntEnable(UART1_BASE);