Struct hal::can::settings
ClassList > hal > can > settings
Generic settings for a can peripheral. More...
#include <can.hpp>
Public Attributes
Type | Name |
---|---|
hertz | baud_rate = = 100.0_kHz Bus clock rate in hertz. |
std::uint8_t | phase_segment1 = = 3 Length of Phase Segment 1 (1qt ... 8qt) |
std::uint8_t | phase_segment2 = = 3 Length of Phase Segment 2 (1qt ... 8qt) |
std::uint8_t | propagation_delay = = 3 Propagation Delay (1qt ... 8qt) |
std::uint8_t | synchronization_jump_width = = 1 Synchronization jump width (1qt ... 4qt) |
Public Static Attributes
Type | Name |
---|---|
constexpr std::uint8_t | sync_segment = = 1 Sync Segment (always 1qt) |
Detailed Description
CAN Bit Quanta Timing Diagram of:
Public Attributes Documentation
variable baud_rate
hertz hal::can::settings::baud_rate;
variable phase_segment1
Length of Phase Segment 1 (1qt ... 8qt)
std::uint8_t hal::can::settings::phase_segment1;
Determines the bit rate, phase segment 1 acts as a buffer that can be lengthened to resynchronize with the bit stream via the synchronization_jump_width. Includes propagation delay
variable phase_segment2
Length of Phase Segment 2 (1qt ... 8qt)
std::uint8_t hal::can::settings::phase_segment2;
Determines the bit rate and is like phase segment 1 and occurs after the sampling point. Phase segment 2 can be shortened to resynchronize with the bit stream via the synchronization_jump_width.
variable propagation_delay
Propagation Delay (1qt ... 8qt)
std::uint8_t hal::can::settings::propagation_delay;
Propagation time It is used to compensate for signal delays across the network.
variable synchronization_jump_width
Synchronization jump width (1qt ... 4qt)
std::uint8_t hal::can::settings::synchronization_jump_width;
This is the maximum time by which the bit sampling period may be lengthened or shortened during each cycle to adjust for oscillator mismatch between nodes.
This value must be smaller than phase_segment1 and phase_segment2
Public Static Attributes Documentation
variable sync_segment
Sync Segment (always 1qt)
constexpr std::uint8_t hal::can::settings::sync_segment;
Initial sync transition, the start of a CAN bit
The documentation for this class was generated from the following file libraries/include/libhal/can.hpp