0% found this document useful (0 votes)
111 views16 pages

CAR Protocol

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views16 pages

CAR Protocol

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

21.4.

2022
OVERVIEW OF AUTOMOTIVE PROTOCOL:
diff bet comm. --> wt of the wire, cost , response time;
RATE: 10 lakh bits/sec

CAN - CONTROLLER AREA NETWORK

CAN - intro by Bosh

high speed can (): iso 11898 --> can protocol specification for 1Mbps
low speed can () :iso 11519 --> can protocol specification for 125kbps

In can all the ECU are masters not one ecu alone is master: any ecu can become a master;
serial network communication (serial i/p --> serial o/p)

rate: 1Mbps, 125kbps,

APP of CAN:
automotive, building atuomation, medical etc..

***** Diff OEM use diff protocols for the same appl. different car architecture *******

The can network is organized systematic; as each ecu is connected to either common can
bus (high speed and low speed bus)
CAN peripherals deals/ works in binary;
CAN protocol deals with the differential signal (analo in nature)

CAN transceiver is used to convert the binary to differential signal;


NODE: MC + CAN transceiver module
120 ohm resistor is used to end the network to reduce the noise (voltage standing
wave ratio VSWR).

Signal values in the CAN are representative of differential signal are named as
0 → dominant
1 —> recessive

Dominant 0 Recessive 1

Dominant (0) D0 D0

R1 D0 R1

Any node in the network sends a dominant value, the whole can bus is dominant
When all the nodes in the network send the recessive only then the CAN bus network is
recessive.
QUES:
Why OEM have diff car architectures ..don't they ex[ect the same feature to work in the
same manner as other OEM providers.
EG: land rover everything is ethernet like so

FEATURES:
Simple and flexibility in config
CAN is message based protocol
Message
The msg sent is corrupted, the same msg is re-sent when the bus is idle.
Communication layer:

CAN works in 1, 2, 7
Physical layer → wires
Data link layer → data transfer
Application layer → layer where the sensors are attached

11 bit CAN: means 2^11 (2048) node identifiers can be created.


Each node has its own identifier
11bit data frame size is 110 bits

Start off bit always → dominant so only it can win the bus arbitration

SOF → start of frame → always dominant (1 bit)

11 bit identifier → this is the id for the component data sent (of the msg)
Id is user defined; ID with the least value will be prioritised

No ECU will know which ECU is transmitting the msg. ;


Case scenario:
All the ecu (hears the network signals sent) will send the data at the same time,
when the conflict in the state of the bus (recessive/dominant) is sensed by the ecu the
dominant ECU will continue sending other ECU will stop sending the data.
Eg; when A sends 1001
B sends 1101
There is

RTR (1bit)
RTR → remote transmission sensor when 1 it → request for the data sent to the network

RTR frame is always → dominant for data frame


→ recessive for request frame
RTR frame decides which frame is the data frame and remote frame

RTR frame is dominant for data frame (send data)


RTR is recessive Remote frame (request data)

Data frame → ECU sending data


Remote frame → ECU request for the data

Control field = IDE + r0 + DLC


IDE bit→ identifier extension bit (always dominant) (1 bit)
Lets the network know that next infor is id or data ( incase of 29 bit identifier …this
will indicate the end of 29th bit)

R0 bit → reserved bit (1 bit)


Only for the analysis/ RD purpose
DLC → data length code (4 bit)
Defines how many bytes can be sended in a msg (at max 8byte, min of 1byte)

Data field (64 bit)

CRC field (15 bit)


Transmitter will calculate the bits of data sent and insert as CRC
At the receiver the receiver use the (data, id, DLC) and calculate the CRC at the
receiver and compares with the CRC from the transmitter to check if the data sent is
lost or not.

CRC field → is a random num generated that is based on the data being send
Matching no loss of data
Else loss of data
Compares with the sent data
CRC delimiter (always in recessive ) (1 bit) → cyclic redundant check
As is CRC is in num generation; not to overflow into other field this acts as an buffer
period.

Acknowledgement field (1 bit)


Is by default recessive
When the data is received at the receiver, it becomes dominant
This state is set by the receiver
ACK delimiter (ACK DEL) (1bit)
Buffer period
End of Frame (7 bit )
7 bit recessive: indicate the end of data
Interframe space (IFS) (3 bit)
recessive → announcement to other nodes that there is all data is sent by the current
node so that other node who wins the arbitration can send the data in the CAN network.

Bus idle:
Recessive → no data is sent

—-----------------------------------------xxxxxxxxxxxx-------------------------------------------------------

29 bit + 1 RSS bit


SRR → self recursive frame

SRR RTR The frame becomes

1 0 Dominant

0 1 Recessive

PDU protocol data unit,


PCI,protocol control
SDU software data unit

OSI

APPLICATION LAYER → sensor


PRESENTATION LAYER → MC, CAN transceiver,
TRANSPORT LAYER → CAN bus

—------------------------------------------xxxxxxxxxxxxxxxxxx—------------------------------------------------

CAN physical layer:

● CAN high level (voltage levels)


● CAN low level (voltage levels)

HIGH SPEED CAN:


We have CAN high and CAN low
Max length of the bus depend on the tx rate
Voltage gap between the CAN high and low for dominant is 2 V and recessive volt is 0V

CAN HIGH 1mbps, CAN low

LOW SPEED CAN:


EG: air bag application
No loss of data

10kbps - 125kbps

Refer screenshot

Why CAN bus have two cables ??


The voltage levels in the data will keep in check of the data sent.
—-------------------------------------------------------------------------------------------------

Day 3: 22.04.22

** CAN SYNCH:

Error detection

1. CRC error
2. Form error
3. Stuff error
4. Ack error
5. Bit error

CRC error:
the CRC bits which are generated using → DLC,ID,DATA
The CRC bit at the receiver is generated using the above info and compared with the
tx, if the bits are varying then the CRC error occurs.

Ack error:
When no ECU ack the data received to the Tx then the Ack error occurs

AT transmitter Ack bit will set the bit to recessive and send the recessive data for the ack bit
At the same time, Receiver set the ack bit to dominant, and send the dominant bit to the bus
then bus becomes dominant. The transceiver at the Tx listens to this change and recognizes
the ack set in the network by the receiver.
If no change in the state of the bus by the receiver, this means no ack → no one received
the data.

BIT ERROR:
If the bit sent and received at the receiver is not same then this error occurs
Bit monitoring: occurs after the ide.
The data sent and the state of the bus is monitored. Transceiver listens to the decided can
bus. If the state of the bus and the data sent is not the same then the bit error.

Tx Rx

1 Bus must be in recessive

0 Bus must be in dominant

Except the ack bit state.

FORM error:
Standard form → which won’t change:
SOF EOF IFS del → any change in these fields → form error
If any standard bit fields value are not in right bit numbers it leads to form error.

Stuff error:
For more than 5 continuous bit we do bit stuffing. As we don’t know

Tx sends (11 bit) → 0111 111 0101


We do the bit stuffing and Rx receive→ 0111 1101 0101
At the receiver, this stuffed bit is removed.
If there are 5 continuous bit of same then it is stuff error

—------------------------------------------------xxxxxxx—-------------------------------------------------------

ERROR DETECTION:
TEC - transmitter error counter
REC - receiver error counter

Procedures:
Raise the flag
Taek the control of the bus from the transmitter by the listening rx ECU

Superposition bits
All the ECUnodes send 0 till the bus is captured from the tx. Then each ECU will send 0 to
win the bus. In next clock all the ECU will send 1 but the end node will send 0 to confirm its
identity and in next state it will send 0 and other else ECU will send 0

TEC will increase by 8; REC will increase by 1 for every error;

If the tx sends error bit again and again, other ecu will rise the flag..

REFER ERROR DETECTION SLIDES:

The probability for not discovering an error is 4.7 * 10^-11


CAN SYNCHRONISATION:
CAN is non-return to zero (NRZ bit):

RZ bit coding:
For every bit change the state comes to zero then it goes to the next state.
Here for transition from 1 to 0, the vol level comes to 0V then goes to 3V.

1010001 → DRDRRRD (D-> dominant, r-> recessive)


The can high and low graph

CAN sync → used to make the tx and rx transmit and receive the same.
Refer notes
CAN BUS SYNCHRONISATION:
Hard synchronisation
Re-synchronisation

Bit construction:
Bit time —> the time quanta is the bit time

We remove the phase buffer seg 2 last bit to make the tx and rx to be in
synch.
Phase buffer seg 1 will be extend the bits to make the tx and rx to be in synch.
----------------------------------------------xxxxxxxxxxxxx—----------------------------------

INTRODUCTION TO LIN:
LIN - Local Interconnect Network

LIN cheaper than CAN


Lesser bit rate, bandwidth

LIN consortium:
Consortium - are companies form to def the technology standards to be
followed.
Here all the OEM joined to form this consortium.

Audi BMW freescale


Volvo volkswagen volcano
LIN FRAME FORMAT:

Ref materials for features, frames

The seat, roof, seat —> masters connected to the CAN


Slaves connected to the LIN
—--------------------------------------XXXXXXXXXXX—--------------------------------------
ETHERNET
TYPES:
100mbps, 1000mbps,10mbps

DATAFRAME:

SOF: last two bits are always ‘1’


Media access control (MAC): address is a unique identifier assigned to a
network interface controller for use as a network address in communications
within a network segment.
802.1Q tag → important used to set priority
FCS → (like CRC ) it is a code generated for each frame at the receiver and
compared at the receiver to verify if the frame received is without data lost/not.

—-------------------------------
FlexRay is an automotive network communications protocol developed by the
FlexRay Consortium to govern on-board automotive computing.
FlexRay can handle any type of network configuration, it is 10 times faster
than CAN and provide higher bandwidth, more reliable than CAN, however it
is more expensive
FlexRay has been used by the following manufacturers in their latest top of
the range models: Audi, Bentley, BMW, Lamborghini, Mercedes, Rolls
Royce, Land Rover, Volvo.

You might also like