我的Str7x芯片,串口配置如下
GPIO_Config(GPIO0,0x0800,GPIO_AF_PP); //ÅäÖÃUART1_Tx¹¦ÄÜÒý½Å
GPIO_Config(GPIO0,0x0400,GPIO_IN_TRI_CMOS); //ÅäÖÃUART1_Rx¹¦ÄÜÒý½Å
UART_OnOffConfig(UART1,ENABLE);
UART_FifoConfig(UART1,DISABLE);
UART_FifoReset(UART1,UART_RxFIFO);
UART_FifoReset(UART1,UART_TxFIFO);
UART_LoopBackConfig(UART1,DISABLE);
UART_Config(UART1,9600,UART_NO_PARITY,UART_1_StopBits,UARTM_8D); //²¨ÌØÂÊ 9600bps 8bitÊý¾Ý룬1bitֹͣ룬ÎÞУÑé
UART_RxConfig(UART1,ENABLE); //ʹÄÜUART1½ÓÊÕ
// EIC_Init();
EIC_IRQChannelPriorityConfig(UART1_IRQChannel,1);
EIC_IRQChannelConfig(UART1_IRQChannel,ENABLE);
EIC_IRQConfig(ENABLE);
UART_ItConfig(UART1,UART_RxBufNotEmpty|UART_TxEmpty|UART_TxHalfEmpty,ENABLE);
}
接收发送始终进不到中断里面去,,用轮询发送接收都没问题,,请问这是怎么回事 |