使用starterware中的OMAPL138_StarterWare_1_10_03_03\examples\evmOMAPL138\nand的 工程,编译没错误,下载后运行,到调用drivers中的uart.c中的 UARTCharPut
/**
* \brief This function checks indefinitely whether the Transmitter FIFO
* (THR regsiter in non-FIFO mode)is empty. If found empty, a byte
* is written into the THR register.
*
* \param baseAdd Memory address of the UART instance being used.
* \param byteTx Byte to be transmitted.
*
* \return None.
*
*/
void UARTCharPut(unsigned int baseAdd, unsigned char byteTx)
{
unsigned int txEmpty;
txEmpty = (UART_THR_TSR_EMPTY | UART_THR_EMPTY);
/*
** Here we check for the emptiness of both the Trasnsmitter Holding
** Register(THR) and Transmitter Shift Register(TSR) before writing
** data into the Transmitter FIFO(THR for non-FIFO mode).
*/
while (txEmpty != (HWREG(baseAdd + UART_LSR) & txEmpty));
/*
** Transmitter FIFO(THR register in non-FIFO mode) is empty.
** Write the byte onto the THR register.
*/
HWREG(baseAdd + UART_THR) = byteTx;
}
到这一句时候 while (txEmpty != (HWREG(baseAdd + UART_LSR) & txEmpty));
就停了,不知道什么原因,希望能帮我看看,谢谢