I'm struggling with the UART communication. I need to change the baud rate on a single UART to implement a specific protocol. So my goal is to have two baud rates right after each other at a transmission with a minimum of change delay.
I tried to do that on low level, so I used something like the following code:
Code: Select all
//Setup
uartBegin(...);
//Loop
while(1){
uart_set_baudrate(BAUDRATE1);
uartWrite(Data1)
uart_set_baudrate(BAUDRATE2);
uartWrite(Data2)
}
So I think the problem consists of timing problems.
Has anyone an idea how to fix that or had the same issue
Thanks!