RE: MCP2515 - Recovering from Error-Passive state
"John Dammeyer" <[email protected]>
| Newsgroups | gmane.comp.hardware.bus.can |
|---|---|
| Message-ID | <[email protected]> |
Chuck, I think you are being overly conservative. Each Tx Error increments the error counter by 8. That's a transmitted message flagged as improperly formed by some _other_ node. Each successful transmission decrements the counter by 1. Taking off the node with the high error count doesn't mean that node has the problem. It will likely be the node(s) that created error flag not receiving the message correctly. You haven't talked much about your protocol. If you still have the potential of two nodes sending the same ID with different data you are hooped. You will not solve the periodic bus disturbances. And they will happen often. It's been my experience that with larger networks the nodes tend to drift together when sending messages so you end up with blocks of nodes arbitrating. If you aren't filtering properly then often nodes end up with buffer overruns when you think you have a bus that is only loaded at 10%. What you really have then is a bus that is 100% loaded for 10% of the time. If you have some sort of heartbeat message sent by each node on a periodic basis then have them include their TEC REC counters within the heartbeat. Collect that information over a period of time and you might see a cluster of nodes with problems. Now you can look at either power supplies, grounding or even bus reflections that tend to trash messages at certain physical points. I could tell you another story about that sort of thing for power line networking using a CAN like protocol but I must run. Cheers John Dammeyer > -----Original Message----- > From: [email protected] [mailto:canlist- > [email protected]] On Behalf Of Chuck Hackett > Sent: September-10-14 11:31 AM > To: [email protected] > Subject: [CANLIST] MCP2515 - Recovering from Error-Passive state > > I have done a lot of trial-and-error work on my MCP2515 driver and I think I > have most of the semantics of MCP2515 error recovery figured out. > > Things seem to be in order except for recovery from Error-Passive state. > > Currently I am canceling all xmit buffers and not attempting to send any bus > messages if the MCP2515 is not in Error-Active state (I realize this may be > overly conservative but it currently makes other things easier). The > firmware then monitors EFLG in background (I get no MCP2515 interrupts if > no > other nodes are sending) waiting for the MCP2515 to return to Error-Active > state. > > Apparently, to decrement the TEC counter the MCP2515 needs to actually > attempt to send a message - or, is there some other way to get the MCP2515 > to exit Error-Passive? > > I can periodically attempt to send a message when in Error-Passive state but > this doesn't feel quite right to me. > > > > -- > Archives and useful links: http://groups.yahoo.com/group/CANbus > Subscribe and unsubscribe at www.vector.com/canlist/ > Report any problems to <[email protected]> -- Archives and useful links: http://groups.yahoo.com/group/CANbus Subscribe and unsubscribe at www.vector.com/canlist/ Report any problems to <[email protected]>