你好,
我测试C:\ti\TivaWare_C_Series-2.1.0.12573\examples\boards\ek-tm4c1294xl\uart_echo下的例子,使用串口调试助手可以正常收发,但是将中断作如下修改后无法再次进入中断,另外发现只有调用发送相关的函数才能再次进入中断,请问如果我只在中断中接受数据应该怎么样做?谢谢
uint8_t temp = 0;
void
UARTIntHandler(void)
{
uint32_t ui32Status;
//
// Get the interrrupt status.
//
ui32Status = ROM_UARTIntStatus(UART0_BASE, true);
//
// Clear the asserted interrupts.
//
ROM_UARTIntClear(UART0_BASE, ui32Status);
//
// Loop while there are characters in the receive FIFO.
//
while(ROM_UARTCharsAvail(UART0_BASE))
{
//
// Read the next character from the UART and write it back to the UART.
//
// ROM_UARTCharPutNonBlocking(UART0_BASE,
// UARTCharGetNonBlocking(UART0_BASE));
temp = UARTCharGetNonBlocking(UART0_BASE);//将接收到的数据放入一个变量
}
}