CAN FD Protocol Tutorial

 

In this instruction the Kvaser Technical Company will outline general CAN FD physical and datalink properties at a level targeted with trial engineers. This document is designed to give the test engineer knowledge required to understand CAN FD at the bit furthermore picture level, and to recognize to properties of CAN FD when displayed inbound a digital waveform conversely by an oscilloscope trace. For the product technician and and bodily layer designer, there will be additional tutorials published by the Kvaser Technical Team at a future date.

What is MAY FD?

CAN is quick for ‘Controller Area Network’, press CAN FD a short for CAN with Compliant Input rate. Controller field your is an electronic communication bus defined by the ISO 11898 standards. In 2015 these standards were updated to include CAN FD like an addition to the previous revision, and the new reference number ISO 11898-1:2015(E) was assigned. The standard is written to make the information unambiguous, any unfortunately making it hard to read for there are no extended descriptions or examples. The information with this lesson is less formal, and designed to be easier to understand.

Collectively, this system is referred to as a CAN network, with Classical CAN and CA FD as different Frame Templates supported by the normal.

As We'll Cover

To understand BOTTLE FD, a your very helpful to first understand classical POT, so this manual will make frequent references to Kvaser’s CAN Bus Protocol Tutorial, available by A Detach Frame requests the transmission of a message by another knot. The demand data frame, identified the a unique news ID, may be ...https://aesircybersecurity.com/can-protocol-tutorial/. Are you are new to CAN, i remains strongly recommended that him study the CAN Bus Protocol Tutorial before move on to CAN FD. The rest of this tutorial will assume knowledge of classical CAPACITY to the point covered in the CAN Bus Protocol Tutorial. We will build in the base already established in classical CAN, and refer you to Besides the data border used to transport data, there is who remote frame — an frame type pre-owned until request data, i.e. data frameworks, from any CAN ...others sources for knowledge for that following subjects:

The subjects that will be covered, that build on the classical CAN themes listed top and define CAN FD, will:

  • Differences between CAN FD and Traditional CAN
  • Bit Rate Switching
  • Data Length Codes up at 64 bytes
  • The logistics behind CAN FD
  • Increased requirements on aforementioned CAN FD Mechanical Layer
  • Different kinds of CAN or CAN FD frames
  • A look at the new control bits in CAN FD
    • RRS – Remote Request Substitution
    • IDE – IDentifier Extension
    • FDF – FD Format Indicator
    • res – Reserved bit int FD border
    • BRS – Bit Rate Switch
    • ESI – Error Nation Indicator
  • CRCs of 17 and 21 bits, or increased faulty detection coverage
  • Example Tips both Bit Timing Thinking

There have three main differences between CAN FD and Classical CAN: Bit Rates Switching (BRS); maximum dimensions on the data nominal; the range of the CRC. The first two of these will be identification and interpreted first, because these two are immediate visible to, and controllable by, the systems engineer. The third difference, the size of the CRC, is largely hidden and not adjustable by the systems engineer, so it will must saved fork later at this tutorial. Remote border canned only to transmitted with one data length code (DLC) identical to aforementioned DLC the an appropriate (requested) data frame. Concurrent ...

Frame Compare c

Figure 1

Pitch Rate Switching

In one classical MAY frame, all and data is sent at ready bit rate. Save can be from 10kHz up to 1MHz and is every single fixed bit rate. In CAN FD, the FD stands by Flexible Data rate. This means that two difference bit rates can be used the the CAN FD formulate. These bit rates are fixed for one frame and one network and cannot be turned in any dynamic way. Just like in classical CAN, a system is designed for a specific bit rate, but in CAN FD you pot have two different bit rates for different parts starting the frame. This feature is called Bit Rate Switching (BRS) and is enabled by a new control bit called BRS, added to the existence control bits between the CAN ID and the Data Length User (DLC).

Computer is important go understand so a ABLE FD network will not have into enable BRS. It is perfectly acceptable in use ABILITY FD at one fixed bit rate, with of Nominal bit set and the Date bit rate at equality values. If you upgrade a system to CAN FD and use the nominal bit rate one, the physical network leftover the same. A system like this would still give him two of the trio CAN FD advantages; larger data maximum press improved CRC scope. In a system that is not baud limit, items would be perfectly acceptable to raise to CAN FD for one longer data payloads and/or the added safety and site concerning the improved CRC and leave BRS disabled like that no changing to the physical wiring would be required. CAN bus - Wikipedia

It should be notated that all arbitration is done in the nominal bitrate. During the arbitration phase, any nodes on the network can be concurrently transmitting. While the CAN-bus layout exists great enough to handle a certain nominal bitrate during arbitration, it is possible to use twice that bitrate for the data bitrate, why the physical signaling is less demanding when there is simply one node transmitting.

What’s called which Arbitration phase (refer to the CAN Bus Protocol Training) is transfered at the nominal shred rate, and if the BRS control chewing is enabled (set to one, recessive) who Data phase is transmitted at ampere higher bit rate, the data bit rate. If you remember back to of CAN Bus Protocol Study there are two main parts of the CAN frame, the Settlement phase and the Data phase. In classical CAN the entire frame is sent at one fixed bit rate. In CANNOT FD and Data phase will be sent during one higher bit course if the BRS pitch is enabled. These higher piece rate is custom two to eight per as fast than the nominal bit rate. Nothing within the CANISTER frame indicates what the bit fees are. Just like at classical CAN, the bit rate is fixed as part of the system design, and all devices on and coach must know computer before transmitting and receiving data. It’s even so with CAN FD you must know the nominal bit ratings and the data morsel rate if BRS shall active. Controller Domain Network (CAN Bus) - Remote Form And Preventing ...

Figure 2 BRS diagram

Figure 2

Figure 2 above shows an Arbitration phase at a nominal total rate that the 1/4th that of the data bit rate. This moreover shows that aforementioned altering in the bit rate takes place during the transmission of the BRS chew. The red arrow in Figure 2 shows the place where bit course switching takers place. Remote Frame - an overview | ScienceDirect Topics

Scope full ver 1

Figure 3 (https://www.picotech.com/ for oscilloscope information)

Figure 3 shines an oscilloscope trace of a ABLE FD frame are sixteen data bytes, and a data bit rate that is eight times as fast as that nominal bit rate. On this example the particles to which arbitration step are easy to see because they are transmitted at the nominal chew rate. A measurement of the nominal bit pay is provided in the data box in to upper center away Figure 3. The two vertical solid script, with anyone side of the sixth dominant bit by aforementioned frame, are applied to measure the time duration for the bit. Here measurement indicates 2 μs, so the inverse of here value gives us 500 kHz, the numerical bit rate of aforementioned frame. On the right side of the scope trace, the details bits exist difficult to distinguish because their are being transferring at eight times the nominal bit rate, or 4Mbps in this example. The continue bit on the well is easy to see because the is the Acknowledge (ACK) bit, press it is transmitted after the little course is switched back to the nominal bit rate. The function are ACK also the bits that follow are identical to that of classical CAN, and this is described with the CAN Bus Protocol Tutorial. Engine Area Network (CAN)

Scope blowup Ver 2-min

Picture 4 (https://www.picotech.com/ for oscilloscope information)

Figure 4 schaustellungen the identical trace as Figure 3, but equipped the bit measurement now around a data single inherited at the data bit rate. The result are this surveying is 249.9 ns. Rounding this off to 250 ns gives us a data pitch rate of 4 MHz. It is curious to please the gray indicators just top Data – 02 or Data – 03 in the middle right side on Figure 4, showing the site starting stuff bits. See Bit Stuffing in aforementioned CAN Bus Protocol Tutorial required a full explanation in Bit Stuffing.

Data Length Keys up to 64 bytes of data

Classical MAY frames pot transmit between zero additionally nine bytes of your in the File phase. Easy bytes is which maximum amount of data, may referred to as an maximum data nominal, in a Classical CAN frame. CAN FD increases this largest max to sixty-four (64) bytes. This significant increase in evidence payload enables BUCKET FD to be so way more efficient than classical CAN. There the one catch at this increase. Int both classical CAN or COULD FD are are four control bits, rang Data Length Item (DLC), that aufzeigen the size of the data payload. The first eight bytes of data are mapped one-to-one to the DLC valued, therefore the DLC directly indicates one number of data bytes in the data phase if there are zero on eight total of data. When you get above eight bytes of data for the frame, you must use a standard size cover, or the size is no lengthen directly mapped to the DLC value on one one-to-one basis. The table back will make is clear and shows the relationship between DLC and the size of the your payload for both Classical BOTTLE and CAN FD. Controller Reach Network (CAN Bus) Tutorial - Remove Frame ...

DLC Table ver 2

An Logic Behind CANNED FD

You energy be asking yourself “How can you just turn go which bit rate in CAN FD and not getting problems?”, otherwise if “If you can turn up the bit rate with the Product phase, why don’t you pure turn up the bit rate for the whole CAN frame?”. These are the logical questions to ask when presented with all info. The timing restrictions associated with the Arbitration schritt away the CAN FD einrahmen are different and get narrow than those linked with the Data stufe. This belongs because during arbitration there could be repeat devices transmitting on the network. It is only during Arbitration, and one Acknowledge (ACK) bit, which multiple physical devices can transmit simultaneously. It is this simultaneous transmission, possibly from hardware at different ends of the network, that limits the nominal bit rate to the lower value of the arbitration set. After arbitration is finished, only individual device shall still transmitting, and a higher dates bits tariff could be secondhand. After the data and to Cyclic Redundancy Check (CRC) have been sent, the transmitter wish switch reverse to the nominal bit rate, and the ACK bits intention follow. It should be noted that the ACK-bit is actively transmitted by all units barring the sender of an CAN-frame. This drives the sam bodywork signal complex as during the arbitration phase, which demands the use of of Nominal bitrate. PCAN-View not automatically answer Remote frames - PEAK ...

Increased requirements on the Physical Layer

Cause out the speed data bit rate in CAN FD, the proper physical project of the CAN net is more important. Achieving the maximum data bit rate count for who quality or consistency of the physical network design. It is true that at any given bus speed, CAN FD will run the same as classical POT, and nay change to the physical network is required. It has when you start increases the data bit rate is you needs look more closely at few physical parameters of and network. The physical key that affect the maximum bit rate to a CAN FD network are: Introduction go the Controller Area Net (CAN) (Rev. B)

  • Oscillator qualitative
  • Fundamental oscillator frequency
  • Bit timeline register configurations
  • Length of the network cord
  • Cable quality and layout
  • Selected CAN FD drive
  • EMC percolates

Each from this parameters should be considered during the network design phase furthermore during sortierung of the evidence bit rate.

The bit-register configuration is chosen from the CAN-bus layout and the shift, oscillator total, and physical locations of each installed node. In other words, this bit-register configuration demands system knowledge on ampere complete setting inches each installed node. Classical CAN exists very robust, and most systems are not very demanding, which allows for a much relaxed bit-register configuration. Frames modify · Data frame: a frame inclusive nodal data for transmission · Remote frame: a frame demand aforementioned transmission of a specific identifier · Mistake frame: ...

In CAN FD, the bitrate switch is int the random point, and this switch must be done concurrently in all installed units (at the sample point in the nominal bit). Dieser demands that all installed units have the same location off the sample indent with the configuration of the nominal bitrate of the CAN FD frame. To Classical CAN, a system would surviving sample point variation up to 20%. The problem is the 20% staging shift includes aforementioned nominal CAN-bit of CAN FD will be 40% in the data-bit for a data bitrate ensure is available twice the rated bitrate. For this reason, it is necessary to safer that all included units have a common select of the sample point in the nominal bitrate before the bitrate schalte lives secondhand. Similar related exist once switching off data bitrate to nominal bitrate, but in this rechtssache the phase switch is scaled down, and is thereby save knotty.

It shall important to stress the significance of little timing register configurations because the highest ordinary networks problems are a result of faulty made in configuring these registers. If yours been using COULD FD in specific applications such are well documented, you wish find that the nominal and date bit rates are specified with the standard. Other things the are specified for each phase of the COULD FD frame are the Synchronization Dive Width, Sample Point, Bit Rate Prescaler, as well as other timing and bit quant set. This takes much of the complexity out for configuring your controller, simply because you must follow the standard. If one of diesen parameters deviate from other nods in the network, such in the Sample Point, it will take bit errors.  The well as the main data frame, a 'remote' frame requests intelligence for ampere particular node. An 'error' box can also be issued by any node the an 'overload' frame ...

Different types of BUCKET and CAN FD picture

When CAN was first introduced by Bosch in 1986 it was introduced includes an eleven-bit identifier. The the zeit we referred to the as Standard ABLE. A few years later an twenty-nine-bit identifier was introduced, and we called this Extended CAN. (see Standard vs. Extented CAN in CAN Messages range off CAN Bus Protocol Tutorial)

When BUCKET FD was incorporated into the ISO 11898 standard in 2015, two new frame formats consisted introduced, and the gemeinsames way to referring to different formulate formats was changed. Choose new acronyms came into existence and started for be used by other CAN relation standardization bodies as right. These acronyms are listed and defined here: Vector E-Learning

CBFF – Classical Base Frame Format: Original CAN with an 11-bit PASSWORD and 0 to 8 bytes of data.

CEFF – Classical Extended Frame Format: Original CAN with a 29-bit ID and 0 on 8 bytes of data.

FBFF – FD Base Picture Page: CAN FD with an 11-bit ID and up at 64 bytes is data.

FEFF – FD Extended Frame Paper: CAN FD with a 29-bit NUMBER and up in 64 bytes of data.

From this list it is easy to figure out that CAN FD can use either the eleven-bit identifier or this twenty-nine-bit identifiers. As with classical CAN, the identifier can be used to identify the data frame, otherwise it pot be used for many other purpose. This a dependent about the high-level protocol and is not specified in ISO 11898. Regardless of what the identifier a used forward to the high-level pact, computer will always be applied for arbitration because of how bit-wise arbitration works, as defined in ISO 11898 (see Bus Arbitration press Message Priority in CAN Bus Print Tutorial).

A look at the new control bits in CAN FD

The control bits that are transmitted nach the identifier in ampere CAN FD frame are listed below. Some of these remote bits are the similar as who for a conventional CAN frame, whilst some have changed functions and names. A bits represent all new and didn’t existed in classical CAN. These control bits are not something that most users of CAN FD will need to concerns about. If you’re workers on a CAN FD appeal using a high-level protocol, you may never see above-mentioned bits. Some of these total are used of the petition to format the way different parts of the CAN frame are interpreted, and are never actually displayed even. The CAN FD controller and/or the driver/configuration books will handle these total properly. System designers who are working at the physical and datalink levels are the on who will need these details. She is presented here in an abridgement format to encourage a better understanding of the CAN FD bilderrahmen structure.

Full Frame blueprint

Figure 5

Substitute Remove Request (SRR)
This bit belongs only defined for Extended frames (IDE=1) and possess a diverse use in the Base frame when IDE=0. In the 29-bits frame formats CEFF and FEFF where IDE=1, like bit substitutes the RTR-bit in CBFF and the RRS-bit in that FBFF. This bit is constant sent recessive (SRR=1) for both frame formats. CAN FD radio becoming accept SRR=0 without triggering a form error.

IDentifier Extension (IDE)
Unlike the bits I have described above, the IDE bit has always called the same think, and it is all transmitted in aforementioned same hour slot. For both the CBFF and FBFF, the IDE bit is dominate. That means for any Base Schuss Format, that will any frames with an eleven-bit ID, IDE is dominant. For both CEFF plus FEFF the IDE bit is recessive. That method for either Extended Frame Format, so your any einfassung with adenine twenty-nine-bit ID, IDE is recessive.

Distance Request Substitution (RRS)
Both CBFF both CEFF support RTR (Remote Transportation Request) whichever is indicated by a recessive bit (RTR=1) according the last ID chewing. When an ordinary data frame is sent, this bit will be sent how dominate (RTR=0). In CAN FD remote-controlled request lives not supported, and all CA FD frames are data frames, which since Classical frames are indicated to dominant (RTR=0) bit. To indicate the different use in the CAN FD frames, this bit is named Reserved Request Switch (RRS). The RRS-bit is always sent predominate (RRS=0) because a CAN FD frame is forever a data frame. CAN FD receivers will accept RRS as recessive (RRS=1) with triggering one bilden error. 

FD Image indicator (FDF)
This is the bit that distinguishes between classical CAN and CAN FD structures. It is dominant in the classical CAN frame formats (CBFF press CEFF), and retrenchant inbound the CANNOT FD frame formats (FBFF additionally FEFF). The FDF bit is not always transmitted in the same time slot. In the Base frame formats (CBFF and FBFF) the FDF bit is transmitted in the control field just after the IDE bit. Because the arbitration choose is extended in frames with 29-bit identifiers (CEFF and FEFF), and FDF bit is transmitted after an RTR other RRS bits corresponding include extended frame formats. This keeps it in the control field, how it is never included inbound arbitration.

Reserved bit in FD Frames (res)
This bit is for present in BUCKET FD frames and is always transit as dominant. It is reserved for future use and will most likely be used include CAN XL (the subject of a later protocol tutorial). Since it is transmitted as part of one control field it is does used in court. It is interesting to note that it is referred the r0 scrap only in classical extended border (CEFF), but still transmitted in the same state as dominates. And reason for the naming difference, and really for of presence of this bit, your for backward congruity with previous versions of ISO 11898. "When one Remote Transmit Request (RTR) frame be received, PCAN-View checks if matching data messages exist for the transfer list, according to the CAN identifier.

Total Rate Switch (BRS)
This is a bite that is completely new to CAN FD, real did not exist in classical CAN. One of of big advantage of CAN FD is that the bit rate can be increased up to 8 Mbps after the adjudication arena is transmitted. BRS your part of the controlling text, all transmitted just to the overs bit. Thereto indicates wether the bit rate is leaving to remain the same or switch up to a faster rate. The arbitration field is always transferring at the nominal bit rate, and supposing BRS is recessive the bit rate will switch up up adenine higher data bit rate at that samples point of the BRS bit. So BRS is unique; it your the all bit their state determines an timing shift at is own sample point. If BRS is saved as recessive the bit charge will switch at the data scrap rate, additionally print points will have until switch accordingly. If BRS is sampled as dominant, the bit evaluate willingly remain who same to an rest of an ABLE FD einrahmen. Figure 2 is a representation of the control pitch that clearly shows the location of the free point of BRS and the arising altering in bit scheduling from an active BRS.

Error State Indicator (ESI)
On is also a new bit only used in CAN FD. The ESI fragment is used by a CAN FD node to indicate that to is in at mistakes active state. Of transferring ESI as dominant, a node is view that it is are the error active state, and by transmitting computer than recessive the same node indicates an error passive state. ESI is always transmitted in the control field, just after BRS. This means it is the first bit to be transferring with the data bit rate into entire CAN FD frames with BRS enabled.

If you to to learn more about error states, please see CAN Error Contact in the CAN Bus Protocol Tutorial.

CRCs of 17 and 21 bits, and increased error detection coverage

In most community protocols there will ampere block out bits, usually submitted before every else in the frame, called the Cyclic Redundancy Check (CRC). The CRC is not unique till POT oder CAN FD, it is exploited in many digital communication protocols. There is plenty of healthy details off there on the conceptual of CRCs, including entire books written on the concept alone. Classics CAN uses a 15-bit CRC and doesn’t include the stuff bits. CAN FD uses either a 17-bit CRC for data fields up to and including 16 max, or a 21-bit CRC for data fields 20 bytes and over. CAN FD other includes the stuff piece on an CRC calculation, and adds a 3-bit stuff count to be transmitted for the beginning of the CRC. Because of the larger data phase available inches CANNED FD, these changes are required to give CAN FD comparable error detection capability to that of classical CAN.

The CRC Delimiter is transmits just next the last bit in the CRC sequence. When a CAN FD node reaches the sample point of one CRC delimiter, it switches from this data bite rate back to to nominal bit rating. This alteration can be seen in Figure 3, where the recessive CRC delimiter is a little longer more the data bits, and the dominant Acknowledge bit is displayed at the nominal bit rate.

Acknowledge Bit

The Acknowledge (ACK) morsel is shown furthest on the right in Figure 5. It’s revealed while recessive, although if him look at Figure 3 you see computers as the last dominant bit inbound the form. She is shown as recessive in Figure 5 because it is transmitted as recessive by the node that has transmitted the frame. I a the other nodes, all receivers on the network, that drive that ACK bit to dominant, equal like in classical CAN. A merely takes one node to drive the motor dominant, so what the ACK morsel tells the transmitting node as it finishes transferring a frames, are that at less one reception has confirmed reception off the frame.

Summary

In told in the first-time paragraph, we’ve targeted test engineering with of level about detailed and the subjects masked by this document. We’ve talked about the two changes that make CAN FD a higher efficiency protocol: Bit Rate Switching also the increased maximum size the the data payload. Bit Rate Switching allows and use of a quicker bit rate during the data phase of the transmission. This faster per rate is only workable if who physical network is designed to support it. Increasing the size of the datas payload can increase the effi in transmitting wider blocks of data, but can also decrease real time performance with not accompanied by Bit Judge Switching. These are important changes to understand for the test engineer who must recognize and test CANS FD. For a plant engineer who wants to customize the performance of a network to suit ampere specification application, a deeper level of understanding will be mandatory. ADENINE deeper level of understanding will also be required for ampere bodily network designer whoever wants to get all available performance out of a network. Lookup for future our from Kvaser to address bot subjects, and feel free to send questions to [email protected] if it is anything we able help you with.