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

Switch to CAN_FD on the Teensy's and Pi #6

Open
Levi-Lesches opened this issue Nov 2, 2022 · 1 comment
Open

Switch to CAN_FD on the Teensy's and Pi #6

Levi-Lesches opened this issue Nov 2, 2022 · 1 comment
Assignees

Comments

@Levi-Lesches
Copy link
Member

Levi-Lesches commented Nov 2, 2022

A CAN frame can only fit 8 bytes of data, which is extremely limiting. Using a complex function we were able to carefully bring down some floats to 2 bytes. But a much simpler implementation would need 4 bytes for an accuracy of <0.01. With this implementation, we can only fit 2 floats per frame, resulting in many more frames needing to be sent.

A CAN_FD frame can contain 64 bytes of data, raising our data cap from 2 floats to 16, which should solve our issues. We've had compatibility issues getting CAN_FD to work on the Teensy boards and the Pi, so let's take this slow and work on a separate branch:

  1. Convert the CAN library to CAN_FD and test on a Teensy (this issue)
  2. Convert the Pi code to CAN_FD and test Switch to CAN_FD Subsystems-Computer#7

When both work, we can switch.

@Levi-Lesches
Copy link
Member Author

Update:

  • Raspberry Pi is currently using an MCP2510 chip, we need the MCP2518fd chip
  • All Teensy boards need to use CAN3

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

No branches or pull requests

2 participants