XON/XOFF hardcoded limits too high
XON/XOFF limits are currently set to 2048 bytes. This number is too high. The software flow control numbers are set from the ends of the buffer, and most UART buffers are much smaller than 2048. This causes poor performance in software flow control mode because the UART would send XON/XOFF constantly.
Recommend changing XON/XOFF hardcoded limits to 128/128.
Prefer adding user-setting for XON/XOFF limits to configuration window.
has details on Microsoft implementation.
Thank you for your report.
Where can we confirm that 128 is recommended bytes of these limits?
4.3.8 Software Handshaking
The CP2102N also supports software handshaking using the XON and XOFF event characters. The characters used for XON/XOFF is
set by the host software.
If the CP2102N receives an XOFF request, it will stop transmission, even if the CP2102N receiver needs to transmit an XOFF over
UART. This can potentially allow an overflow to occur or a deadlock condition if both the CP2102N and the connected UART device
transmit XOFF at the same time. The XOFF_CONTINUE setting allows the CP2102N transmitter to send XOFF/XON requests even if it
has received an XOFF request from the connected UART device. Once the connected UART device transmits XON, normal transmission from the CP2102N resumes.
Software handshaking uses the same watermark levels as hardware handshaking and can be configured dynamically by host software.
Watermark levels greater than 512 are converted to an XON limit of 192 bytes and an XOFF limit of 64 bytes. If the XON limit crosses
over the XOFF limit, the XON limit will automatically be modified to not cross over the XOFF limit. An XOFF limit of 0 is converted to 64
to guarantee buffer space is available until the UART end device stops transmission. When setting the XON and XOFF limits, it's recommended to use values where the XON limit added to the XOFF limit is less than 512 bytes, like 192/192 or 128/128. CP2102N
testing shows that the XON limit set to 192 and XOFF limit set to 192 provides optimal software flow control behavior.