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.

关于UART 发送的问题

ROM_UARTSpaceAvail(UART2_BASE)与ROM_UARTBusy(UART2_BASE)的作用是否一样!

为什么发送连续数据(超过16个)会丢数据用以下程序

while(ui32Count--)

{

    ROM_UARTCharPutNonBlocking(UART2_BASE, *pui8Buffer++);

    while(UARTBusy(UART2_BASE));     //等待发送完成

  }

 

要改为

while(ui32Count)

{

    if(ROM_UARTSpaceAvail(UART2_BASE))

    {

        ROM_UARTCharPutNonBlocking(UART2_BASE, *pui8Buffer++);

        ui32Count--;

     }

 }

 while(ROM_UARTBusy(UART2_BASE)); //等待发送完成