CAN Protocol
CAN Protocol
ilou WIN05
CAN Protocol
1. CAN SPEED
2. Data limité
Sb.ilou WIN05
3. CAN Bus
Notes : the two twisted buses always end with resistor=120 OHM
Which means that the difference between them nothing but Delt_V
6- The CAN transceiver(physiq la,yer) convert from the CAN logic to th TTL logic, and the Can
controller(Hardwarem, Network layer) form the Can Frame but in the TTL bit
5. CAN priorities
5- CAN is a message based protocol, because in the frame we don’t know who is the receiver.
6- Each msg has something called msg ID and the msg ID has three porpuses :
- What kind of data carried or what is about
- The priority
- Filtring: if the id msg=X I wont let it pass
Sb.ilou WIN05
6. Message filtering
7- CAN is a Half-duplix,
Sb.ilou WIN05
7. Acknowledgement method
- In the can frame we have the data and also the bit pf acknowledgement.
8. CSMA-CA Protocol
Carrier Sense Multiple Access Collision Avoidance Protocol
9. Type of Frames
They are 4 types of can Protocol,
Sb.ilou WIN05
- Data Frame
- Remote Frame
- Error Frame
- Overload Frame
Frame carrying the data from the transmitter, noede tp all recieiver nodes. And ther is two types of
data frame:
IF a node wants a specific dataFrame, so it sends the Remote frame with same msg ID on the BUS
Sb.ilou WIN05
It s approximately just like data frame but only the data frame is missing
As u see in the pic upper the frame is detected as an error so the transmission of the frame in the bus
stopped and after the destroying we have retransmission
But now we have ecu that works in GH so this frame is very rare
- THEN WE HAVE TO IDENTIFY THE FRAME BY Msg IDE (CAN is msg based Protocol), 11bits
- In the standar Can Frame we have 9 bits of the 11 Bits that can change and the are not
fix, so we can have 2^9=512 Different Can Frame in the standard Can frame (000X to
7FFx)
-
- after the msg ide we must tell the Bus if it is data frame or Remote Frame, becu zyou
know the data frame and the remote frame have the same Msg ID for this we use RTR Bit
- RTR: remote transmut Request:(=1 means Remote frame, =0 Data Frame)
- R1 and R0 bits:R1 used as IDE or difference between the Standard frame and the
extended frame. R0 used as FDF to difference between a
- DLC data length the Code, 4bits: tells how many bytes of data in the frame, u know the
can frame contain 1 bits or 2 3 OR 4;;;;;8bits,
- Data: 0 to 8 bits
Sb.ilou WIN05
- Checksum, 15 bits : detect if the bit changed due to noises for example
- CD 1bit: If the checksum number is the same we must validate the data frame for that we
use the checksome Delimiter
- ACK 1 bit: here where the nodes can tell that the frame is received and it is valid. Here
how it is happened the Tx node puts a recessive bit in the ACK, so All th Rx who valide
this frame and want to ACK it will put a dominant bit in the slot, so THE Tx if he find that
the bit change to a dominant he will that it s ack by the receiver.
If this bit got a 0 and 1 by two nodes in the same time the bus will take the dominant
bit value 0
- Every dat frame ends with 11 conecutive Recessive bits , AD, EOF, IFS just after those bits
the bus consider IDLE again and every node can send data frame
- SOF and msg ID and RTR: called Arbitration field, R0 (IDE) and R1 DLC: control field,
checksum (CRC seaquence), CD (DEL) CRC field, ACK and DEL (AD) CK field
-
Sb.ilou WIN05
SRR 1bit: Subtitude remote requist in the place of RTR in standard data format.
Always Recessive
12. Priority
The fra;e who had the low ID has the priority
Sync_seg:
Bus
Sb.ilou WIN05
Pro_Seg:
Sb.ilou WIN05
Phase_seg1 , Phase_seg2:
ALL RX nodes *
t
Sb.ilou WIN05
Transmitter errors means that only the Tx can detect those errors. Same fot Rx erreors
Sb.ilou WIN05
If the transmitter put a value in the bus the bus should take the same value, but for some reason shit
happens as u see in the pic below, and we will have a bit errors. So the TX after detection of the b.it
errors will send an error flag, just after this detection
So here the Tx understand that there an error in the frame, because he not receiving any ACK, stull
have a rececive bit. That s what we call a ACK error,
So to make a difference between ACK And CRC errors, THE first one start just after the ACK slot and
the second one after the DLC slot. And that s why ze have a delimiter BIT DLC
Sb.ilou WIN05
23. Conclusions’
26. CAN FD
Look the ressource
The orange part will transferred at regular speed, the blue high speed
BRS: ables us to choos if the frame will be in higher frame or not. Cuz the option of high speed is
optional. If it 1 then it is a dual frame