LCP 1549 UART will not receive properly.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LCP 1549 UART will not receive properly.

449 Views
markduffett
Contributor I

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, &param)) {              //  it waits here forever
errorUART();
}

}

<</code>>

trying the other transfer modes and sending /r/n or /0 had no effect.

0 Kudos
1 Reply

335 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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:

pastedImage_2.png

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos