Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UART Rx starts to slip when baud rate is above 700000 and no inter-frame gap #18

Open
ed-xmos opened this issue Jun 16, 2022 · 4 comments
Labels
size:S small type:enhancement New feature or request

Comments

@ed-xmos
Copy link
Contributor

ed-xmos commented Jun 16, 2022

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

@ed-xmos ed-xmos added the type:enhancement New feature or request label Jun 17, 2022
@ed-xmos ed-xmos self-assigned this Jun 29, 2022
@ed-xmos
Copy link
Contributor Author

ed-xmos commented Jun 29, 2022

I have started a PR to look at optimisations here - #25

@ed-xmos ed-xmos added the size:S small label Jun 29, 2022
@ed-xmos
Copy link
Contributor Author

ed-xmos commented Jun 30, 2022

The changes so far:

  • inlined state machine
  • Removed third start bit check
  • Use get_ref_time always
  • if buffer case simplified
  • Retune latency hiding parameters

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.

@ed-xmos
Copy link
Contributor Author

ed-xmos commented Jul 5, 2022

See also xmos/xcore_iot#491 which may answer the last question.

@ed-xmos
Copy link
Contributor Author

ed-xmos commented Jul 6, 2022

Note that the work in #25 managed to yield more than 40% higher bit rate but xmos/xcore_iot#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.

@ed-xmos ed-xmos changed the title UART Rx starts to slip when baud rate is above 806400 and no inter-frame gap UART Rx starts to slip when baud rate is above 700000 and no inter-frame gap Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S small type:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant