A #![no_std]
Rust driver library for interacting with MCP2518FD CAN FD controller chips. Platform agnostic, specifically tested using the MCP251863 chip (MCP2518FD controller with integrated CAN FD transceiver).
This driver attempts to improve on previous such crates and strives to expose as much functionality as possible while making it easy to use for the majority of common use cases.
All features are disabled by default.
defmt
- Implementsdefmt::Format
for most public types so they can be printed usingdefmt::info!()
and relatives
Examples for the Raspberry Pi Pico (rp2040
microcontroller) are available in the examples/
folder.
- Raspberry Pi Pico
- Basic example usage to send a receive messages
- Raspberry Pi Pico with Interrupts
- More advanced example using interrupts instead of polling
The driver does not currently have full support for the usage of the RRS bit in CAN FD standard frames as SID11. This is not a priority since it deviates from the ISO 11898-1:2015 specification. Not supporting this also lets us use the Id
enum from the embedded-can
crate instead of implementing one ourselves.
The driver does not currently support graceful abortion of message transmission or resetting FIFOs.
The driver does not currently support a nice way to configure bit timing which is important in order to support a larger amount of use cases. Registers can still be configured manually if this is desired.
The driver does not currently support a convenient way to configure the various types of interrupts. Registers can still be configured manually if this is desired.
This driver is loosely based on a previous driver crate for the MCP2517FD which can be found here, but has been significantly reworked, extended, and updated for embedded-hal
v1.0.