<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p id="reply-intro">On 2025-01-23 16:28, Michael Balzer via OvmsDev wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">The CAN status variables are all explained in can.h:</div>
<div> </div>
</blockquote>
<div> </div>
<div>Thanks for your explanation, which is most helpful.</div>
<div> </div>
<div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">So these are simply indications of RX buffer 0 overflows. These are no "real" overflows, as RX buffer 1 was still available, so the frames were not lost and the <span style="font-family: monospace;">rxbuf_overflow</span> counter was not incremented.</blockquote>
</div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div> </div>
</blockquote>
<div>So with the current code, I should interpret these pairs of errors as a single warning that can2 has a lot of activity, and if it gets worse could result in loss of a frame.</div>
<div> </div>
<div>It's possible that when I experienced the actual car issues there was something more significant logged. But we don't know because I pulled the plug and the log entries are missing.</div>
<div> </div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div>The driver could clear this condition to avoid signaling this as a CAN error. I think we kept it that way because an RXB0 overflow already indicates a lot of traffic on the bus. This could also result in a warning log, but the CAN framework doesn't know how to distinguish driver specific errors from warnings.</div>
</blockquote>
<div>
<div>
<p>Going back to your earlier advice, I think you're asking us to monitor the rate of can errors in the log, and observe if that changes with different bus timing.</p>
<p>And also monitor can status. With my current firmware (existing timing, single sampling, both buses in active mode) I see can1 is a bit busier than can2 (10 million vs 8.6 million). Can1 has had one genuine receive overflow.</p>
<div><span style="font-family: 'courier new', courier, monospace;">OVMS# can can1 status</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">CAN: can1</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Mode: Active</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Speed: 500000</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">DBC: none</span></div>
<div><span style="font-family: 'courier new', courier, monospace;"> </span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Interrupts: 10231357</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Rx pkt: 10228979</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Rx ovrflw: 1</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Tx pkt: 1343</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Tx delays: 50</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Tx ovrflw: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Tx fails: 998</span></div>
<div><span style="font-family: 'courier new', courier, monospace;"> </span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Err flags: 0x00000000</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Rx err: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Tx err: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Rx invalid: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Wdg Resets: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Wdg Timer: 0 sec(s)</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Err Resets: 1</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">OVMS# can can2 status</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">CAN: can2</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Mode: Active</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Speed: 500000</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">DBC: none</span></div>
<div><span style="font-family: 'courier new', courier, monospace;"> </span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Interrupts: 8661395</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Rx pkt: 8672342</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Rx ovrflw: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Tx pkt: 40</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Tx delays: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Tx ovrflw: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Tx fails: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;"> </span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Err flags: 0x01000001</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Rx err: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Tx err: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Rx invalid: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Wdg Resets: 0</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Wdg Timer: 0 sec(s)</span></div>
<div><span style="font-family: 'courier new', courier, monospace;">Err Resets: 0</span></div>
<div> </div>
<div><span style="font-family: verdana, geneva, sans-serif;">On the transmit side nearly all our activity is on can1. There have been a huge proportion of failures, but this is the only can1 error I can find in the log. </span></div>
<div> </div>
<div><span style="font-family: 'courier new', courier, monospace;">2025-01-23 16:37:06.464 GMT E (31051994) esp32can: can1 stuck bus-off error state (errflags=0x00040c00) detected - resetting bus</span></div>
<p><span style="font-family: verdana, geneva, sans-serif;">It's quite possible there are others from earlier in the day, when I had debug level on. I've now set the level to warn so it should be easy to spot everything significant. I'll update when I have something to report.</span></p>
</div>
</div>
<p>Chris</p>
</body></html>