Basically, I cannot do continuous TX with nrf_libuarte_async:
Here is simple reproduce:
static uint8_t text[] = "===TICK===\r\n";
static uint8_t text_size = sizeof(text);
static uint8_t text2[] = "+++TOCK+++\r\n";
static uint8_t text2_size = sizeof(text2);
while (true)
{
err_code = nrf_libuarte_async_tx(&libuarte, text, text_size);
for (size_t i = 0; i < 1000000; i++)
{
}
err_code = nrf_libuarte_async_tx(&libuarte, text2, text2_size);
for (size_t i = 0; i < 10000000; i++)
{
}
}It only output ===TICK=== and no +++TOCK+++
Here is what I've tried:
1. I can confirm that NRF_LIBUARTE_ASYNC_EVT_TX_DONE event has been triggered during the for loop in between
2. If I increase the delay by for loop, both data got through
3. both calls returns 0x00 (SUCCESS)
4. If I put a breakpoint in between, of the NRF_LIBUARTE_ASYNC_EVT_TX_DONE event, it works
5. I've tried in another project with RTOS and use osDelay to test the gap needed for second transmission, it seems ~300 ms is needed.
help please....