<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>On my Leaf the bus seems to stop quite often, so the reset would
have to operate quite often too. Perhaps increment a metric when
the reset fires so we can monitor how often it is happening?<br>
</p>
<br>
<div class="moz-cite-prefix">On 16/08/18 01:46, Mark Webb-Johnson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:70C03BEE-CA3B-43D4-8283-816DD46F64DE@webb-johnson.net">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Sorry, forgot to mention: another option is to poll the bus
manually if an interrupt hasn’t been received in N seconds. Check
the status registers and if everything is not perfect then reset
the controller.<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 15 Aug 2018, at 9:45 PM, Mark Webb-Johnson
<<a href="mailto:mark@webb-johnson.net" class=""
moz-do-not-send="true">mark@webb-johnson.net</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space;
line-break: after-white-space;" class="">This was my worry
for both esp32 can and mcp2515. We get an interrupt, but
for some reason the status is not showing anything to do,
so we return from the interrupt. Then, the status changes.
Or, for a particular status we had to do something that we
didn’t. The bus is locked up, and the interrupt never
fires again, so we never get called. I wonder if we just
fired the interrupt handler again manually, would it
recover?
<div class=""><br class="">
</div>
<div class="">When this happens, do we need to power off
then on the can bus, or is a ‘can canX stop’ ‘can canX
start …’ sufficient?</div>
<div class=""><br class="">
</div>
<div class="">Perhaps a general solution would be a
watchdog. If the CAN bus does not receive anything for N
seconds (perhaps 60), then restart the controller? We
could simply protect it from restarting twice (a simple
check of the counters), so worse case this would restart
once 60 seconds after a bus normally went idle. Or is
that too kludgy?</div>
<div class=""><br class="">
</div>
<div class="">Regards, Mark.<br>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>