Hello,
In some quick testing I’ve done, it appears that when using methods in the Serial class the program waits for each byte to be clocked out before continuing with code execution. For example, if I set the baudrate at 115200 and write 10 putchars in a row, the code takes 10*8*(1/115200) seconds to run.
But from what I understand, the LPC1768 has FIFO buffers on the serial ports that should allow several bytes to be written very quickly in sequence without waiting for each to be clocked out of the port. Then the program could go on to do some other time-sensitive task while the bytes are pushed out automatically.
Does the mbed Serial class not take advantage of these FIFOs? Is there a way to enable them by writing to some configuration register? Might it be possible to use the FIFOs while still taking advantage of the (rather nice) Serial class?
I will continue to look into the issue on my own but any wisdom anyone might have would be very appreciated!
Thanks!
Hello,
In some quick testing I’ve done, it appears that when using methods in the Serial class the program waits for each byte to be clocked out before continuing with code execution. For example, if I set the baudrate at 115200 and write 10 putchars in a row, the code takes 10*8*(1/115200) seconds to run.
But from what I understand, the LPC1768 has FIFO buffers on the serial ports that should allow several bytes to be written very quickly in sequence without waiting for each to be clocked out of the port. Then the program could go on to do some other time-sensitive task while the bytes are pushed out automatically.
Does the mbed Serial class not take advantage of these FIFOs? Is there a way to enable them by writing to some configuration register? Might it be possible to use the FIFOs while still taking advantage of the (rather nice) Serial class?
I will continue to look into the issue on my own but any wisdom anyone might have would be very appreciated!
Thanks!