kvBusParamsTq Struct Reference

#include <canlib.h>

Data Fields

int tq
 
int phase1
 
int phase2
 
int sjw
 
int prop
 
int prescaler
 

Detailed Description

Constraints

Constraints that must be fulfilled when opening channel in classic CAN Mode:

  tq         = 1 + prop + phase1 + phase2
  tq        >= 3
  sjw       <= min(phase1, phase2)
  prescaler >= 1
  Constraints that must be fulfilled when opening channel in CAN FD Mode:

  arbitration.tq         = 1 + arbitration.prop + arbitration.phase1 + arbitration.phase2
  arbitration.tq        >= 3
  arbitration.sjw       <= min(arbitration.phase1, arbitration.phase2)
  arbitration.prescaler >= 1  (<=2 will enable Transmitter Delay Compensation Mechanism)

  data.tq         = 1 + data.phase1 + data.phase2
  data.tq        >= 3
  data.sjw       <= min(data.phase1, data.phase2)
  data.prop       = 0
  data.prescaler  = arbitration.prescaler

Used in canSetBusParamsTq, canSetBusParamsFdTq, canGetBusParamsTq and canGetBusParamsTq

Examples:
example/c/busparams_tq.c.

Field Documentation

◆ phase1

int phase1

Phase segment 1, in number of time quanta

Examples:
example/c/busparams_tq.c.

◆ phase2

int phase2

Phase segment 2, in number of time quanta

Examples:
example/c/busparams_tq.c.

◆ prescaler

int prescaler

Prescaler

Examples:
example/c/busparams_tq.c.

◆ prop

int prop

Propagation segment, in number of time quanta

Examples:
example/c/busparams_tq.c.

◆ sjw

int sjw

Sync jump width, in number of time quanta

Examples:
example/c/busparams_tq.c.

◆ tq

int tq

Total bit time, in number of time quanta.

Examples:
example/c/busparams_tq.c.

The documentation for this struct was generated from the following file: