UART TX exact timing
Posted: Fri Aug 19, 2022 2:31 pm
Hi,
Is it possible to control the exact timing of a UART transmit?
I'm looking to do the following:
- Transmit one byte over UART eg. 0x35
- Wait 25ms
- Transmit the same byte again eg. 0x35
The result of
is the two bytes send right after each other. Changing the delay to 50 makes the wait time somewhat variable either 16ms or 24ms.
I suspect that the exact timing of the UART peripheral is outside our control? Or?
Thanks,
Kasper Nyhus
Is it possible to control the exact timing of a UART transmit?
I'm looking to do the following:
- Transmit one byte over UART eg. 0x35
- Wait 25ms
- Transmit the same byte again eg. 0x35
The result of
Code: Select all
uint8_t data = 0x35;
uart_write_bytes(uart_num, &data, sizeof(data));
vTaskDelay(pdMS_TO_TICKS(25));
uart_write_bytes(uart_num, &data, sizeof(data));
I suspect that the exact timing of the UART peripheral is outside our control? Or?
Thanks,
Kasper Nyhus