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

Optimize CPX communication on UART2 #1065

Closed
evoggy opened this issue Jun 20, 2022 · 0 comments · Fixed by #1068
Closed

Optimize CPX communication on UART2 #1065

evoggy opened this issue Jun 20, 2022 · 0 comments · Fixed by #1068
Milestone

Comments

@evoggy
Copy link
Member

evoggy commented Jun 20, 2022

The AI deck uses UART2 to communicate with the STM32 when using CPX. Unfortunately the current implementation of reading/writing the UART is too slow and this causes issues (like asserting in syslink).

In the current implementation we're busy sending (i.e we're looping until TXE) and when receiving we're queuing one byte at a time. Ideally this would be moved to DMA instead, but since this conflicts with both the LED-ring and DSHOT on the Bolt/BL this is not a good option. Instead we should rewrite it to use interrupts for sending data buffers and assemble full CPX packets in the ISR before queuing them and switch task to CPX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants