CAN communication has a function to detect message transmission failures and a function to resend failed messages, making it highly fault-tolerant.
The bus cable length can be extended up to 1,000m, and the communication
specification allows you to specify the CAN bit configuration for transmitting
1 bit.
By combining with compatible devices, communication based on CAN2.0B
and CAN FD can be performed.
When using CAN FD communication, data transmission speeds of up to 5
Mbit/s can be achieved.
When using CAN2.0B communication, transmission speeds of up to 1 Mbit/s
can be achieved.
With API-CAN(WDM), the timing of CAN bit configuration can be determined using only the bit rate and three parameters (TSeg1, TSeg2, SJW).
*The following assumes TSeg1=6TQ, TSeg2=3TQ*
- Set the sample point to be approximately between 60% and 80% of the
bit time.
In most cases, a setting between 75% and 80% is
recommended.
- It is recommended to set the synchronization jump width (SJW) and time segment 2 (TSeg2) to the same value.
- For specific parameter setting examples, please refer to the [Parameter Setting Example with Sample Point Position 75%].
CONTEC CAN communication devices has simplified bit configuration
timing settings.
It is designed to automatically configure the bit rate, synchronization,
and error handling composition settings defined
in CAN Specification by simply setting the following four parameters.
CAN Communication Device |
Summary |
Setting Range (unit: TQ) |
Supplement |
TSeg1 |
Timing Segment1 |
2TQ to 513TQ |
This is the period from immediately after the start of CAN communication until the end of the sample point. |
TSeg2 |
Timing Segment2 |
1TQ to 128TQ |
This is the period from immediately after the sample point until the end of 1-bit transmission. |
SJW |
Synchronization Jump width |
1TQ to 127TQ |
Adjustment width used for one synchronous event. |
N-prescaler |
Prescalar |
(1 to 32) |
N-prescaler cannot be specified directly in API-CAN(WDM) functions. |
Time segment 1 (TSeg1), time segment 2 (TSeg2), and synchronization jump width (SJW) specified with the API-CAN(WDM) function are set as they are to the CAN communication device.
CONTEC CAN communication device is equipped with the reference
clock (can_clk).
Therefore, the API-CAN(WDM) driver determines an appropriate prescaler
(N-prescaler) from the bit rate value specified by the API-CAN(WDM) function
and sets it to CAN communication device.
Inside the API-CAN(WDM) driver, the prescaler value is adjusted to
be as small as possible and the number of TQs
per bit is adjusted to be as much as possible.