Expand description

CAN and FD-CAN support.

The module implements CAN and CAN-FD support using the fdcan crate.

Message RAM

The Message RAM allocation is fixed as follows

SectionSize
Standard 11-bit filters28
Extended 29-bit filters8
Rx FIFO 03 elements
Rx FIFO 13 elements
Tx Buffers3 elements

Usage

In Cargo.toml

fdcan = "^0.1"

Initialisation

use stm32h7xx_hal::prelude::*;
use fdcan::{
   config::NominalBitTiming,
   filter::{StandardFilter, StandardFilterSlot},
   id::StandardId,
   FdCan,
};

let mut can: FdCan<_, fdcan::ConfigMode> = dp.FDCAN1.fdcan(tx, rx, fdcan_prec);

Structs

Storage type for the CAN controller

Traits

Extension trait for CAN controller