Re: Unique ID & Acknowledgement in CAN
"Kees Zagers" <[email protected]>
| Newsgroups | gmane.comp.hardware.bus.can |
|---|---|
| Organization | SI-Kwadraat |
| Message-ID | <002c01ce03a9$f84ceb70$7703a8c0@SIKwadraat> |
Hi Dinesh, Agree with you on 1. Good document. Disagree with you on 2. The filter and mask don't have any influence on the ACK. If a node detects a correct message on the bus, it will send an ACK, independent of the filter/mask settings. The filter/mask settings are only relevant for the communication of the message to the local CPU. The only way to prevent a node from sending an ACK (and errorframes)is putting it in listen-only mode (if possible). Kees ----- Original Message ----- From: Dinesh Guleria To: CANLIST Sent: Tuesday, February 05, 2013 2:42 PM Subject: Re: [CANLIST] Unique ID & Acknowledgement in CAN Hi BoopathiRaja, 1> Refer following application note. Some thing i read when i started with CAN on AVR. www.avrfreaks.net/modules/FreaksArticles/files/23/CAN on the AVR.pdf Only unique CAN Message ID and RTR bit values may be transmitted by any CAN node. If two or more Tx CAN nodes using the exact same CAN Message ID and RTR values collide, they will both pass the priority arbitration together allowing two or more active CAN nodes to be sending after the arbitration field. After the arbitration is finished, any dominant/recessive bit wise difference will cause a CANSTMOB register Tx BERR (Bit ERRor) in the transmitting CAN node that sends a recessive bit and sees a dominant bit value instead (two BERR exceptions have already been noted). Because CAN has error signaling, error node confinement and automatic retries of corrupted messages, the BERR will cause an error flag to be sent over the entire CAN bus (error signaling). Automatic retries could theoretically create a situation where the two Tx CAN duplicate Message ID+RTR nodes keep repeating the same BERR failure over and over, until the Tx CAN node bus off error handling is triggered by the CANTEC error counter trying to exceed a value of 255 decimal. The CANTEC error counter is incremented by 8 when sending the error flag, so if there are no other Tx problems the 32nd failed BERR retry attempt will cause the bus off (error node confinement). Since bus off is automatically reset after receiving 128 occurrences of 11 consecutive recessive bits, the problems may keep occurring over and over. Just remember this problem is caused by the CAN bus designer using the exact same Tx CAN Message ID and RTR bit valuesin multiple Tx CAN nodes (it is not the fault of the CAN system). Of course the exact same Rx CAN Message ID may be used in any other CAN node or even in all the other CAN nodes. 2> This the decided at CAN network design level. Those nodes who are interested for a particular message depending upon your setting in MASK & filter registers. If received message pass that criteria then automatically silicon of CAN bus will send ACK in the ACK slot of the CAN bus frame. It seems you have just started. Just refer wiki for staring point of view. http://en.wikipedia.org/wiki/CAN_bus I hope this helps you. Regards, Dinesh On Tue, Feb 5, 2013 at 6:21 PM, PDE-Elect - Software Team 1 <[email protected]> wrote: Hi techies, 1. If i am using same CAN id in 2 different nodes. what will happen.? Whether any error will occur or Tx will be in proper..? 2. How the acknowledgement works in CAN.? How the sender knows the acknowledged frame from receiver.? Regards, BoopathiRaja.G | Product Development Engineering Electronics, 0422-4331608 | [email protected] Pricol Limited Website : www.pricol.co.in Address : 132, Ooty Main Road, Periyanaikanpalayam, Coimbatore, 641020, India. Disclaimer: This message contains confidential information and is intended only for the recipients mentioned. If you have received this mail by error, kindly delete the same from your system and notify the sender. The sender does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission.