Skip to content

Conversation

@b-atteryacid
Copy link

Header and source file for FDCAN driver. Supports sending and receiving byte data over FDCAN. Can pre-register log types before sending and receiving.
Also includes an example main file for testing via loopback. To verify, set a breakpoint in the final if statement in the main loop.

Integration Instructions (full instructions in the working documentation)

  1. Properly initialize the FDCAN peripheral in the IOC file.
  2. Create an array of LogInitStructs. Each element takes the size in bytes of the log, along with its starting message ID. Must make sure that messages longer than 64 bytes do not overlap- every 64 bytes takes one additional message ID.
  3. Instantiate the controller with the init array and FDCAN handle.
  4. Use SendByLogIndex to send data as a registered log, or use SendByMsgID to manually send a custom-length message. Use either ReceiveFirstLogFromRXBuf or ReceiveLogTypeFromRXBuf to read received logs.

-uses dedicated RX buffers (must configure in ioc file)
-send/receive functionality
-Added documentation
-renamed some things
-Automatically initializes filter and buffer parameters in the peripheral
-Added log index support, so message IDs are only required on setup
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

Successfully merging this pull request may close these issues.

2 participants