I‘m using KEA128 SDK to build UART application on KEA8.however when I use this function void UART_ReceiveWait(UART_MemMapPtr pUART, uint8_t *pReceiveBuff, uint32_t u32Length)
{
uint8_t u8RxChar;
uint32_t i;
for (i = 0; i < u32Length; i++)
{
while (!UART_IsRxBuffFull(pUART))
{
}
u8RxChar = UART_ReadDataReg(pUART);
pReceiveBuff[i] = u8RxChar;
}
}
when I debug ,it loops in this fuction and cannot quit this function.
static inline uint8_t UART_IsRxBuffFull(UART_MemMapPtr pUART)
{
return (pUART->S1 & UART_S1_RDRF_MASK);
}
Hi aida,
that means UART doesn't receive data. KEA128 has 3 UART peripherals. The KEA128 uart demo use UART2. KEA8 has only one UART0. Please check the UART config and pin config. There is another TRK-KEA demo package which contain KEA8 uart example. You can refer to it.
https://community.nxp.com/docs/DOC-100915
Regards,
Jing