Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] bitrate of nodes in can communication

Status
Not open for further replies.

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
hi , i am doing can communication using mcp2515 can controller,at89s8252 mcu and pca82c250 can transceiver... i have a doubt regarding the speed of nodes....if we have two nodes with different speed (bit rate ) on a can bus ..then what will happen will the communication happen smoothly or any critical situation will arise...please suggest here...
 

embpic

Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Activity points
5,213
Then on that condition communication will not be established. bcoz the TQ that is time quanta should be same to have proper arbitration.And TQ is decided on Osc. freq. that is speed you provide to CAN bus. propagation delay should same to have proper arbitration therwise communiaction will be invalid.sync segment which is part of bit time which is responsible for hard synchronization.
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
thanx for the above suggestion sir.....kindly please explain your answer...
 

embpic

Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Activity points
5,213
consider any communication protocol they require to be sync in terms of speed, baud rate or frequency.
and in terms of CAN protocol bit is divided into synchronization segment, propogation segment, phase segment1 and phase segment2. so this segment are responsible for synchronization between the segment.
 

Emb4U

Member level 3
Joined
Jan 18, 2014
Messages
56
Helped
9
Reputation
18
Reaction score
8
Trophy points
8
Location
Bangaluru
Activity points
321
I think when the two nodes have the different speeds then the bit time does not match for both. In that time the data sent by transmitting node is not correctly recieved by the reciever node . then there must an error occurs. but which error arises ,i am little bit confused. I think it Bit Error will arise because the bits are does not match in transmitter side and reciever side.
 

embpic

Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Activity points
5,213
no there will be no kinda of communication.
bit error will arise when they get sync at bit time and read both bit at time.
for getting sync there should be same speed between the nodes.
 

Emb4U

Member level 3
Joined
Jan 18, 2014
Messages
56
Helped
9
Reputation
18
Reaction score
8
Trophy points
8
Location
Bangaluru
Activity points
321
no there will be no kinda of communication.
bit error will arise when they get sync at bit time and read both bit at time.
for getting sync there should be same speed between the nodes.

Then there must be a error , which error I am confused ?

Can you explain me briefly ?
thank you for your reply
 

embpic

Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Activity points
5,213
As per my thinking when they read bit at perticular time at time but if speed is different then also no node will detect for causing error but node which is transmitting will cause the error of ack bcoz he will not get any kinda acknowledge from other node.
 

Emb4U

Member level 3
Joined
Jan 18, 2014
Messages
56
Helped
9
Reputation
18
Reaction score
8
Trophy points
8
Location
Bangaluru
Activity points
321
As per my thinking when they read bit at perticular time at time but if speed is different then also no node will detect for causing error but node which is transmitting will cause the error of ack bcoz he will not get any kinda acknowledge from other node.

why ack error will occur ? explain please.

i think if there is different speed , CRC will also not match. then CRC errror may be occurs
 

embpic

Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Activity points
5,213
when crc error will generate??
 

Emb4U

Member level 3
Joined
Jan 18, 2014
Messages
56
Helped
9
Reputation
18
Reaction score
8
Trophy points
8
Location
Bangaluru
Activity points
321
hi, crc error is generated if the TEC not equals to REC .TEC-TRANSMIT ERROR COUNTER REC-RECIEVE ERROR COUNTER

NO NO this is wrong,
If TEC is not equal to REC then CRC error will not generated because CRC calculation handled by can controller automatically.
CRC error will check by receiver. It will check wheather it will match or not match.
 

embpic

Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Activity points
5,213
CRC is calculated on both side.first transmitter send data with CRC in frame and receiver is match by calculating CRC at their end. if not matched then CRC error is genrated.
 

Emb4U

Member level 3
Joined
Jan 18, 2014
Messages
56
Helped
9
Reputation
18
Reaction score
8
Trophy points
8
Location
Bangaluru
Activity points
321
CRC is calculated on both side.first transmitter send data with CRC in frame and receiver is match by calculating CRC at their end. if not matched then CRC error is genrated.

According to the calculation of transmitting node ,the receiving node will check wheather the crc calculation will match or not match.
If not match then crc error will generated.
 

Tanmay Dash

Junior Member level 3
Joined
Jul 6, 2014
Messages
30
Helped
11
Reputation
22
Reaction score
11
Trophy points
8
Location
bhubaneswar,orissa,india
Activity points
177
no its true that tec and rec is responible for crc calculation plz refer can part a part b document og robert bosch if any error occurs for 128 times active error state and for tec or rec more than 256 passive error state is occured and after 256 busoff condition arises

- - - Updated - - -

i aplosize,tec and rec is required for all type of errors like bit error ,stuff error,crc error,ack error crc calculation based on 15 bit polynomial for transmission side and its reverse is checked in recieve section.
11010011101100 000 <--- input right padded by 3 bits
1011 <--- divisor
01100011101100 000 <--- result (note the first four bits are the XOR with the divisor beneath, the rest of the bits are unchanged)
1011 <--- divisor ...
00111011101100 000
1011
00010111101100 000
1011
00000001101100 000 <--- note that the divisor moves over to align with the next 1 in the dividend (since quotient for that step was zero)
1011 (in other words, it doesn't necessarily move one bit per iteration)
00000000110100 000
1011
00000000011000 000
1011
00000000001110 000
1011
00000000000101 000
101 1
-----------------
00000000000000 100 <--- remainder (3 bits). Division algorithm stops here as quotient is equal to zero.






reverse effect in recieve section:

11010011101100 100 <--- input with check value
1011 <--- divisor
01100011101100 100 <--- result
1011 <--- divisor ...
00111011101100 100

......

00000000001110 100
1011
00000000000101 100
101 1
------------------
0 <--- remainder
 

embpic

Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Activity points
5,213
According to the calculation of transmitting node ,the receiving node will check wheather the crc calculation will match or not match.
If not match then crc error will generated.

Yes that is what i have written
trasnmitter calculate and send to receiver then receiver calculate at their end and if not match then error is get genarated.
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
dear emb4u, sir you are right due to different speed crc in both side will not match and crc error will generate , but also ack error will generate and the error frame will generate only due to ack error not for crc error , as per datasheet when a crc error occurs then the error flag will generate following the ack delimiter please suggest. thank you.

- - - Updated - - -

Dear Tanmay, just modifying your statement a little bit , that TEC and REC are not required for any type of error calculation in can communication rather after an error get detected , both tec and rec get affected and the state of node defines as error active or error passive or bus-off .
 

Tanmay Dash

Junior Member level 3
Joined
Jul 6, 2014
Messages
30
Helped
11
Reputation
22
Reaction score
11
Trophy points
8
Location
bhubaneswar,orissa,india
Activity points
177
dear debabrata,as u told that error frame will be generarted only due to ack error but not with crc error...its quite contradictory as crc is one of 5 types of error (bit,stuff,form,ack,crc) .so my point is any 5 of this error if occured error frame will be generated..kindly refer part A and part B document.thank u
''''''''''''''''''''''''''''''''
there is enough for everyone's need but not for anyone's greed"""""""""""""""""""""
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
dear Tanmay, kindly read my above comment before you reply anything, as i have written that if ack error and crc error detected on the same frame then error frame will be generated due to ack error because it is mentioned in can part A and part B document (please refer page 25 under error signalling) that on crc error detection error frame will generate after ack delimiter. thank you.
 

    V

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top