I'm using a LCP 1549 and UART based off the uart_polling example, but it will not receive properly. I can send and can confirm data is sent back to me but an interrupt is not triggering.
<<code>>
static void getLineUART(unsigned char *receive_buffer, uint32_t length)
{
UART_PARAM_T param;
param.buffer = (uint8_t *) receive_buffer;
param.size = length;
param.transfer_mode = RX_MODE_BUF_FULL ;
param.driver_mode = DRIVER_MODE_POLLING;
if (LPC_UARTD_API->uart_get_line(uartHandle, ¶m)) { // it waits here forever
errorUART();
}
}
<</code>>
trying the other transfer modes and sending /r/n or /0 had no effect.
Hi Mark Duffett,
It seems you are using the lpcopen code for LP1549, which is downloaded from this link:
LPCOpen Software for LPC15XX|NXP
I also test the uart_polling_example, if you want to send back the data after you input each byte, please do a modification:
#define RECV_BUFF_SIZE 1
The orginal definition is 32, so the data just will echo back after it receives 32 Bytes, but if you modify the RECV_BUFF_SIZE to 1, then you will get each byte:
This is my test result:
Please test the polling example again.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------