0% found this document useful (0 votes)
204 views4 pages

CAN Bit Stuffing

Bit stuffing is a technique used in CAN (Controller Area Network) protocol to ensure synchronization between transmitting and receiving nodes. Since CAN is an asynchronous protocol without a clock signal, bit stuffing inserts an extra bit whenever the bus signal remains in the same state for five consecutive bits. This prevents long sequences of identical bits and helps receiving nodes resynchronize to the transmitting node. Bit stuffing is applied to the arbitration, control, data and CRC fields but not the fixed format parts of the CAN frame. Transmitting nodes bit-stuff frames before sending them on the bus, while receiving nodes perform bit destuffing to remove the extra bits when processing received frames.

Uploaded by

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

CAN Bit Stuffing

Bit stuffing is a technique used in CAN (Controller Area Network) protocol to ensure synchronization between transmitting and receiving nodes. Since CAN is an asynchronous protocol without a clock signal, bit stuffing inserts an extra bit whenever the bus signal remains in the same state for five consecutive bits. This prevents long sequences of identical bits and helps receiving nodes resynchronize to the transmitting node. Bit stuffing is applied to the arbitration, control, data and CRC fields but not the fixed format parts of the CAN frame. Transmitting nodes bit-stuff frames before sending them on the bus, while receiving nodes perform bit destuffing to remove the extra bits when processing received frames.

Uploaded by

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

Bit Stuffing

AGENDA

Need for Bit stuffing


What is Bit Stuffing
Which parts of frame considered for bit stuffing
Bit Stuffing and Destuffing

Shyam Bhat
VicharaVandana
Need for Bit Stuffing
 CAN Protocol is a Asynchronous Protocol.

 There is no Clock signal to tell which bit is currently on bus or to synchronize between Rx
nodes with Tx nodes.

 In CAN network all Rx nodes synchronize initially with Tx node with falling edge of SOF bit.

 Then with its internal clock ticks it keeps track of bits and with each edge the Nodes are
resynchronized.

1 0 1 0 1 0 1 0
Need for Bit Stuffing
 All Rx nodes have internal clock ticks depending upon which it knows when one bit ends
and when next bit starts on the bus. But with each bit the tolerance or delta error keeps on
building.

 With every edge (or bus state change) the Rx node knows the next bit has come and re
adjusts the internal clock ticks and this is called as Resynchronization of Rx nodes with Tx
node.

 So having bus state constant or unchanged for long time is risky in terms of Rx nodes being
in synch with Tx node.

 SO CAN protocol designers after research came up with the strategy of bit stuffing.

 If CAN bus has constant value for 5 bit lengths atleast then a complimentary bit is inserted
next to it. This is called as bit stuffing
Which part of frame is bit stuffed
Arbitration Control Data CRC ACK End of Frame
S R A
R R C A
O Message ID T DLC Data Checksum C EOF IFS
1 0 D D
F R K
0 1 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 10101010 01010101 0 0 1 1 0 0 1 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1

Bit Stuffing

011111001001001100101010101001010101 0101100100111011 1011111111111

 The Bit stuffing is applicable from beginning of SOF till end of checksum field.
 Bit stuffing is not applicable for Fixed form part (i.e CD to IFS)
 Stuffed Bits are considered for CRC computation in CAN frame
 Tx side Frame is bit stuffed and sent on bus  Bit Stuffing
 Rx side the stuffed bits are removed and then processed further  Bit DeStuffing

You might also like