Crate emcyphal_stm32_native

Crate emcyphal_stm32_native 

Source
Expand description

Native STM32 FDCAN driver for the Emcyphal stack

This implementation uses direct register access for better integration with the hardware.

§Features

  • 14 subject filters
  • 1 destination (node address) filter
  • Software and hardware timestamps
  • Loop-back frames for TX timestamping
  • Full TX timeout support
  • Transmitter delay compensation for data bit rates up to 8 Mbps

§Limitations

  • Anonymous frame transmission is not supported
  • System timestamps are measured in the runner task
  • Discontinuous transmission: a runner task wakes up to initial transmission of each frame
  • An 8-frame buffer is allocated even in Classic mode

§Feature flags

To use this crate:

  • Include the embassy-stm32 crate with appropriate flags for your target chip
  • Choose an STM32 chip family flag: stm32g4 (the same code should work on G0 and L5 families, but has not been tested)
  • Enable bindings for available peripherals: fdcan1, fdcan2, fdcan3. Multiple instances are supported.

§Examples

See the pubsub_native example in the nucleo-g431rb crate.

Modules§

config

Structs§

Driver
IT0InterruptHandler
FDCAN Interrupt line 0 handler.
IT1InterruptHandler
FDCAN Interrupt line 1 handler.
RxFilterRunner
RX filter configuration task.
RxRunner
Frame receiving task.
TxRunner
Frame transmitting task.

Constants§

SUBJECT_SLOT_COUNT
Maximum number of message subjects the driver can simultaneously subscribe to.