<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Chris,<br>
    <br>
    typically "can can1 status" & "can can2 status" will give the
    statistics of the buses, and "poller times on" will enable poller
    timing statistics to be then shown by "poller times status".<br>
    <br>
    The Leaf uses can2 to query these values:<br>
    <font face="monospace">// VIN [19]<br>
      // QC [2]<br>
      // L0/L1/L2 [2]</font><br>
    <br>
    …but only when the car is on, but not in drive mode. So you should
    check if you get these values.<br>
    <br>
    It also uses can2 for TCU commands, if the model year is >= 2016.<br>
    <br>
    So you should try commands and see if they work correctly.<br>
    <br>
    Please also check the log for changes in can error occurence &
    frequency.<br>
    <br>
    Regards,<br>
    Michael<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 22.01.25 um 14:58 schrieb Chris Box
      via OvmsDev:<br>
    </div>
    <blockquote type="cite"
cite="mid:010b01948e4e4b27-1a6b430d-e7dc-4d1f-8ace-2a7e05e33fee-000000@eu-west-2.amazonses.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Thank you Derek and Michael.</p>
      <p>I'm running this firmware from today, and have driven the car 8
        miles so far without issue.</p>
      <p>Happy to run any useful diagnostic commands. In case it helps,
        the poller reports this.</p>
      <p><code>OVMS# poller times status                                
                       </code><br>
        <code>Poller timing is: off                                    
                       </code><br>
        <code>Type           | count  | Utlztn | Time                  
                       </code><br>
        <code>               | per s  | [‰]    | [ms]                  
                       </code><br>
        <code>---------------+--------+--------+---------              
                       </code><br>
        <code>Poll:PRI    Avg|    0.99|   0.632|    0.065              
                       </code><br>
        <code>           Peak|        |   0.733|    1.325              
                       </code><br>
        <code>===============+========+========+=========              
                       </code><br>
        <code>      Total Avg|    0.99|   0.632|    0.653 </code></p>
      <p>Chris</p>
      <p><br>
      </p>
      <p id="reply-intro">On 2025-01-21 00:41, Derek Caudwell via
        OvmsDev wrote:</p>
      <blockquote type="cite"
style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
        <div id="replybody1">
          <div dir="ltr">Hi Chris
            <div> </div>
            <div>Here are the required changes, as I understand them, to
              be compiled into a new firmware from this thread: <a
href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/pull/1102/files"
                target="_blank" rel="noopener noreferrer"
                moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/pull/1102/files</a></div>
            <div> </div>
            <div>Cheers</div>
            <div>Derek</div>
          </div>
          <br>
          <div class="v1gmail_quote v1gmail_quote_container">
            <div class="v1gmail_attr" dir="ltr">On Tue, 21 Jan 2025 at
              10:48, Michael Balzer via OvmsDev <<a
                href="mailto:ovmsdev@lists.openvehicles.com"
                rel="noreferrer" moz-do-not-send="true"
                class="moz-txt-link-freetext">ovmsdev@lists.openvehicles.com</a>>
              wrote:</div>
            <blockquote class="v1gmail_quote"
style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;">
              <div>Chris,<br>
                <br>
                there is no prepared branch for these changes, as we
                still try to determine the best (most compatible)
                configuration.<br>
                <br>
                You need to apply the suggested changes manually to the
                current master.<br>
                <br>
                Regards,<br>
                Michael<br>
                <br>
                <br>
                <div>Am 20.01.25 um 19:56 schrieb Chris Box via OvmsDev:</div>
                <blockquote type="cite"
style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
                  <p>I'm happy to try some new code on my Leaf. Which
                    code should I use? The current master, or a
                    different branch? It wasn't clear to me from the
                    thread below.</p>
                  <p>Chris</p>
                  <p><br>
                  </p>
                  <p id="v1m_3502584311878067824reply-intro">On
                    2025-01-19 19:47, Derek Caudwell via OvmsDev wrote:</p>
                  <blockquote
style="padding: 0px 0.4em; border-left: 2px solid #1010ff; margin: 0px;">
                    <div id="v1m_3502584311878067824replybody1">
                      <div dir="auto">
                        <div dir="auto">I can't recall testing a later
                          version but I think Chris can confirm he was
                          on a later version when his Leaf had a similar
                          problem.</div>
                        <div dir="auto"> </div>
                        <div dir="auto">The Leaf is now my wife's daily
                          drive so I won't be able to take a look at
                          making the suggested changes for a couple of
                          weeks at least.</div>
                        <div dir="auto"> </div>
                        <div dir="auto"> </div>
                      </div>
                      <div>
                        <div dir="ltr">On Mon, 20 Jan 2025, 8:31 am
                          Michael Balzer via OvmsDev, <<a
                            href="mailto:ovmsdev@lists.openvehicles.com"
                            rel="noreferrer" moz-do-not-send="true"
                            class="moz-txt-link-freetext">ovmsdev@lists.openvehicles.com</a>>
                          wrote:</div>
                        <blockquote
style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;">Derek,<br>
                          <br>
                          <div>Am 03.05.24 um 12:53 schrieb Derek
                            Caudwell via OvmsDev:</div>
                          <blockquote
style="padding: 0px 0.4em; border-left: 2px solid #1010ff; margin: 0px;">When
                            running <strong>firmware  </strong><span
style="color: #002200; font-family: ui-monospace,'Cascadia Mono','Segoe UI Mono',Hack,'Source Code Pro','Roboto Mono',Menlo,Monaco,Consolas,monospace; font-size: 13px;"><strong>3.3.004-74-gbd4e7196</strong>
                              on my Nissan Leaf I suspect (but can't be
                              100% sure as it's only been 24h without
                              fault) the new poller caused the car to
                              throw the attached faults from overloading
                              the can bus whilst driving. The fault was
                              sufficient to send the car into limp mode
                              and could not be driven until cleared with
                              LeafSpy.</span></blockquote>
                          <br>
                          Build 3.3.004-74 (released 2024-04-30) did not
                          yet include the poller tracing control, i.e.
                          it did lots of logging for frames,
                          significantly affecting overall performance.<br>
                          <br>
                          Poller tracing control was introduced in <a
href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/7e4046042a99339d0212aac8f874cc8f780e634e"
                            target="_blank" rel="noopener noreferrer"
                            moz-do-not-send="true"
                            class="moz-txt-link-freetext">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/7e4046042a99339d0212aac8f874cc8f780e634e</a>
                          on May 12.<br>
                          <br>
                          That commit was first included in build
                          3.3.004-103-g11fddbf6 released 2024-05-25. Do
                          you remember testing that build or a later
                          one?<br>
                          <br>
                          <br>
                          But as I still don't understand how a software
                          queue overflow could cause a bus crash, I've
                          also checked the 500 kbit timing for the
                          MCP2515 and found that may have the same issue
                          as the 125 kbit timing:<br>
                          <br>
                          Our timing is:<br>
                          <span style="font-family: monospace;">  case
                            CAN_SPEED_500KBPS:<br>
                                cnf1=0x00; cnf2=0xf0; cnf3=0x86;<br>
                              = PROP=1, PS1=7, PS2=7, SJW=1, Sample 3x
                            @56.3%</span><br>
                          <br>
                          Remember, the SAE/CiA recommendation is SJW=2,
                          Sample 1x @87.5%. That would translate to:<br>
                          <span style="font-family: monospace;"> 
                            PROP=5, PS1=8, PS2=2, SJW=2, Sample 1x
                            @87.5% =<br>
                                cnf1=0x40; cnf2=0xbc; cnf3=0x81;</span><br>
                          <br>
                          I also checked the Arduino MCP_CAN lib, and
                          that uses:<br>
                          <span style="font-family: monospace;">   
                            cnf1=0x40; cnf2=0xe5; cnf3=0x83;</span><br>
                          <span style="font-family: monospace;">  =
                            PROP=6, PS1=5, PS2=4, SJW=2, Sample 3x @75%<br>
                          </span><br>
                          So our timing for 500 kbit/s on the MCP buses
                          also isn't as recommended.<br>
                          <br>
                          Derek, could you test the SAE/CiA
                          recommendation and the MCP_CAN config as
                          shown? Or anyone else with a live can2/can3
                          bus at 500 kbit?<br>
                          <br>
                          If these work, the question is which is the
                          more general setup we should adopt. Apparently
                          the MCP_CAN lib also does not follow the CiA
                          recommendation, I wonder if the MCP_CAN config
                          is a compromise for compatibility.<br>
                          <br>
                          Regards,<br>
                          Michael<br>
                          <span style="font-family: monospace;"></span></blockquote>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                  <fieldset></fieldset>
                  <pre>_______________________________________________
OvmsDev mailing list
<a href="mailto:OvmsDev@lists.openvehicles.com" rel="noreferrer"
                  moz-do-not-send="true" class="moz-txt-link-freetext">OvmsDev@lists.openvehicles.com</a>
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
                  target="_blank" rel="noopener noreferrer"
                  moz-do-not-send="true" class="moz-txt-link-freetext">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
                </blockquote>
                <br>
                <pre>-- 
Michael Balzer * Am Rahmen 5 * D-58313 Herdecke
Fon 02330 9104094 * Handy 0176 20698926</pre>
              </div>
              _______________________________________________<br>
              OvmsDev mailing list<br>
              <a href="mailto:OvmsDev@lists.openvehicles.com"
                rel="noreferrer" moz-do-not-send="true"
                class="moz-txt-link-freetext">OvmsDev@lists.openvehicles.com</a><br>
              <a
href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
                target="_blank" rel="noopener noreferrer"
                moz-do-not-send="true" class="moz-txt-link-freetext">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a></blockquote>
          </div>
        </div>
        <br>
        <div class="pre"
          style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br>
          OvmsDev mailing list<br>
          <a href="mailto:OvmsDev@lists.openvehicles.com"
            moz-do-not-send="true" class="moz-txt-link-freetext">OvmsDev@lists.openvehicles.com</a><br>
          <a
href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
            target="_blank" rel="noopener noreferrer"
            moz-do-not-send="true" class="moz-txt-link-freetext">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a></div>
      </blockquote>
      <p><br>
      </p>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Michael Balzer * Am Rahmen 5 * D-58313 Herdecke
Fon 02330 9104094 * Handy 0176 20698926</pre>
  </body>
</html>