Open ed-xmos opened 2 years ago
I have started a PR to look at optimisations here - https://github.com/xmos/fwk_io/pull/25
The changes so far:
has resulted in the HIL Rx component now passing at 1152000 baud in the regression. It also passes the bare metal test at 1267200 baud. HOWEVER, the RTOS test only passes at 921600 baud for 128 bytes. It passes at 1000000baud for 4 bytes.
I have previously checked timing in the RTOS driver and am satisfied it is good (no back pressure on the HIL thread) so am unsure what is causing this.
See also https://github.com/xmos/xcore_sdk/issues/491 which may answer the last question.
Note that the work in https://github.com/xmos/fwk_io/pull/25 managed to yield more than 40% higher bit rate but https://github.com/xmos/xcore_sdk/issues/491 has since pegged that back. So we now verify at 700kbps Rx rate (assuming 75MHz threads) and there isn't much headroom. Tx is well in excess of 1Mbps. Leaving issue open for now since we still can't make 1Mbps Rx without using a 100MHz HIL Rx thread.
This was found when using FTDI to test. It was not seen during loopback where we achieve almost 1.5Mbps. I strongly suspect that the turnaround time between sampling the last stop bit and waiting for the falling edge of the next start bit is the issue since we can receive a 1.5Mbps byte with stop->start gaps.
See https://xmosjira.atlassian.net/wiki/spaces/~870418189/pages/3572039681/RTOS+UART+interoperability+HW+test for evidence