pub struct TimingBoundaries {
pub prescaler_min: u16,
pub prescaler_max: u16,
pub sjw_min: u8,
pub sjw_max: u8,
pub tseg1_min: u8,
pub tseg1_max: u8,
pub tseg2_min: u8,
pub tseg2_max: u8,
}Expand description
Hardware-specific timing parameter boundaries for classical CAN 2.0 bit timing.
These boundaries define the valid ranges for CAN bit timing parameters and are hardware-specific to PEAK-System CAN devices. The values constrain the configuration of the CAN controller’s bit timing to ensure it operates within hardware capabilities.
§Timing Parameters
- prescaler: Clock prescaler that divides the CAN controller’s base clock
- sjw (Synchronization Jump Width): Maximum time by which the bit sampling point can be shifted to resynchronize with the bus
- tseg1 (Time Segment 1): Duration before the sample point, includes propagation delay and phase segment 1
- tseg2 (Time Segment 2): Duration after the sample point (phase segment 2)
§Usage
These boundaries are used internally by CanBitTiming::new() to validate timing
parameters. Users should reference CAN_TIMING_BOUNDARIES to ensure their custom
timing configurations fall within acceptable ranges.
Fields§
§prescaler_min: u16§prescaler_max: u16§sjw_min: u8§sjw_max: u8§tseg1_min: u8§tseg1_max: u8§tseg2_min: u8§tseg2_max: u8