MCP2515 - Recovering from Error-Passive state

"Chuck Hackett" <[email protected]>
Newsgroups gmane.comp.hardware.bus.can
Message-ID <[email protected]>
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]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.