Hi,
I am trying to synchronously change the baud rate of one of the ports on the FT4232 chip. What I am trying to do is send out a string of bytes over the UART at baud rate 115200 and
then immediately after the string has finished sending change the baud rate to 921600 and start listening. However, the first string of bytes isn't getting sent all the
way... What it seems like is happening is the baud rate is changing before the first string is sent all of the way. How do I guarantee the string has been sent fully before the baud
rate changes?
Here is some sample code of what I am trying to do:
ftdi_set_baudrate(ftdi, 115200);
ftdi_write_data(ftdi, outBuf, size); // fails to send fully before baud rate changes to 921600.
ftdi_set_baudrate(ftdi, 921600);
numBytesRead = ftdi_read_data(ftdi, inBuf, size);
Any ideas on how to fix this?