Skip to content

CAN FD Interface #35

@JoelHer

Description

@JoelHer

Integration for the CAN FD protocol, the hardware has separate GitHub issues: #5, #4.

The interface should implement the Object Layer.

  • Message filtering (mailboxes)
  • Message and status handling

The Transfer Layer of CAN is handled by the transceiver module, see: #5

Scope

This issue covers the software-side CAN & CAN FD interface abstraction used by Vigilant Engine.
It should provide a generic API for sending, receiving, filtering, and monitoring CAN FD frames, without embedding hardware-specific transceiver logic.

Responsibilities

The CAN FD interface should provide:

  • Initialization and deinitialization
  • Bus state tracking
  • RX/TX message handling
  • Mailbox / filter configuration
  • Status and error reporting
  • Callback or event-based receive handling

Requirements

Message handling

  • Send frames
  • Receive frames
  • Support standard and extended identifiers
  • Support DLC handling for FD frames
  • Expose frame flags:
    • IDE
    • RTR (if supported)
    • FDF
    • BRS
    • ESI

Filtering

  • Configure acceptance filters / mailboxes
  • Allow multiple mailbox definitions
  • Match by identifier and mask
  • Allow enabling / disabling individual filters

Status handling

  • Expose controller state:
    • stopped
    • ready
    • bus-off
    • error-passive
    • error-warning
  • Expose TX/RX error counters if available
  • Report overflow, arbitration, acknowledgement, and framing-related errors where supported by the backend

Proposed API surface

Example responsibilities for the interface:

  • init(...)
  • start()
  • stop()
  • send(frame)
  • receive()
  • configureMailbox(...)
  • getStatus()
  • onFrameReceived(...)
  • onStatusChanged(...)

Notes

  • The physical / transfer layer is not part of this issue.
  • Hardware-specific transceiver handling belongs in the transceiver integration issue.
  • The interface should remain portable so different CAN controller / transceiver backends can be attached later.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions