Clear Uarte Rx Buffer

Hi, I am using libuartes to comunicate with gps and I get the Rx buffer
like a problem already asked in this thread

when I send a text "abc"

the first 3 times : everything is fine (9 bytes)
on the 4th time : my application call 2 NRF_LIBUARTE_ASYNC_EVT_RX_DATA event

- the first event show it receive "a" (10th byte => full)

- the second event show it receive "bc"
because in uarte define I define _rx_buf_size = 10
I think nrf_libuarte_async_rx_free() function will free each NRF_LIBUARTE_ASYNC_EVT_RX_DATA was called. And the next time nRF receive data from GPS, data I received will be put at the start of rx_buffer
So how can I solve this problem ? I want each time I receive data from GPS, the received data buffer will be put at the start of uarte's rx_buffer

Here is my uarte define, and uarte handle, debug terminal

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
NRF_LIBUARTE_ASYNC_DEFINE(libuarte1, 0, 0, 0, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 10, 3);
void send_Uart1(char *sdata, int len)
{
ret_code_t ret;
ret = nrf_libuarte_async_tx(&libuarte1, sdata, len);
// Fixing issue text was sent too fast
if (ret == NRF_ERROR_BUSY)
{
buffer_t buf = {
.p_data = sdata,
.length = len,
};
ret = nrf_queue_push(&m_buf_queue, &buf);
APP_ERROR_CHECK(ret);
}
else
{
APP_ERROR_CHECK(ret);
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX