Buffer clearing on MCP2515 CAN bus

Greetings,

I've recently put together a project where I have two Unos connected via MCP2515 CAN bus modules. It is one-way communication (for now, anyway)... one board is in a remote area taking several sensor readings, sending data to the other unit for display.

Communication is working fine. However, I discovered that should the communication from the 'sensor' unit be disrupted for whatever reason (power failure, unplugged transmission wires, etc), the 'display' unit will continue 'receiving' the last successful transmission that the MCP2515 on its end received. I really need to know if there are no new messages coming through.

I've found some related but somewhat conflicting info online on dealing with this, so was hoping someone could point me in the right direction. My understanding is that there is a data buffer on the MCP2515 board that can be cleared, as well as a "message received" flag that could be flipped. I'm just not sure which is the correct/proper course of action, or how to go about it.

I realize that the answer to the second part of that is almost certainly library-specific, and as I am away from the project at the moment I can't confirm which library I ended up using - I can update with that info this evening. Even without that, though, some general guidance as to what I ought to be looking for would at least give me something to seek out in the library.

Thanks for any input!

Hi Arsigi,

Did you find any solutions? I have the same issue.

Anyone still looking for an answer on this?