Hi,
I use serial port example to do out UART exchange data function. But I get a problem, I don't know why? Below is my source code.
static void serial_event_handler(struct nrf_serial_s const *p_serial, nrf_serial_event_t event)
{
static uint8_t buffer[MAX_RX_BUFFER_SIZE] = {0};
static uint8_t length = 0;
switch (event)
{
case NRF_SERIAL_EVENT_TX_DONE:
break;
case NRF_SERIAL_EVENT_RX_DATA:
{
nrf_serial_read(&serial_uart, &buffer, 2, NULL, 100);
When I send 2 bytes data to our device from PC terminal. I can get a return and real data as i sent. But if I only send one data in from PC. I think I will get timeout return after 100ms. But I never get. Why?
Thank you.
John.