<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FlexCAN ACKERR proper management in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexCAN-ACKERR-proper-management/m-p/1290162#M60811</link>
    <description>&lt;P&gt;Alexis, is there a way to automatically disable disable automatic retries when there is a lack of ACK on the bus?&amp;nbsp; I'm seeing behavior right now where I lack an ACK when another device switches into listen only / passive mode and my NXP Microcontroller with FlexCAN floods the bus at a rate &amp;gt;=1000hz.&amp;nbsp; Ideally I'd be able to detect the ACK error, not flood the bus and send 1 message at a specified time interval to test for an ACK.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jun 2021 18:53:25 GMT</pubDate>
    <dc:creator>PD</dc:creator>
    <dc:date>2021-06-09T18:53:25Z</dc:date>
    <item>
      <title>FlexCAN ACKERR proper management</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexCAN-ACKERR-proper-management/m-p/859505#M51458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; using the FlexCAN peripheral on a K20 MCU, I am a bit puzzled on how to properly manage the NO ACK condition. If I enable the interrupt (CANx_CTRL1.ERRMSK &amp;lt;- 1) my handler gets called repeatedly and the CPU is prevented to do anything since it spends all its time serving the interrupt. If I disable the interrupt and poll the error flag (CANx_ESR1.ACKERR) in my loop, the result is the same - once you get ACKERR asserted it never goes away ... until the next power cycle.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; According to the reference manual, it should be enough to read from CANx_ESR1 to clear ACKERR flag, but this does not happen. My idea is that proper handling of this condition must be added. My firmware employs a modified version of the FlexCAN.c/h found in the SDK. Maybe it is outdated, but I haven't found relevant difference in the most recent one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Could you advise or point me to an implementation that correctly deals with ACKERR? Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2019 09:53:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexCAN-ACKERR-proper-management/m-p/859505#M51458</guid>
      <dc:creator>maxpag</dc:creator>
      <dc:date>2019-02-13T09:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN ACKERR proper management</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexCAN-ACKERR-proper-management/m-p/859506#M51459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Massimiliano,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you tell me how are you testing this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the features of the CAN protocol is that will keep sending the package until one node answers.&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;If during system start-up, only one node is operating, then its TXERRCNT increases in each message it is trying to transmit, as a result of acknowledge errors (indicated by the ACKERR bit in the Error and Status Register).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;One way to manage the NO ACK condition is to check how many times the&amp;nbsp;&lt;SPAN&gt;TXERRCNT&amp;nbsp;increase, if the error happens a certain amount of times, stop the transmition and soft reset the module to clear the error signals.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Let me know if this was helpful to you and I will wait for your comments.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Alexis Andalon&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 19:07:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexCAN-ACKERR-proper-management/m-p/859506#M51459</guid>
      <dc:creator>Alexis_A</dc:creator>
      <dc:date>2019-02-19T19:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN ACKERR proper management</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexCAN-ACKERR-proper-management/m-p/1290162#M60811</link>
      <description>&lt;P&gt;Alexis, is there a way to automatically disable disable automatic retries when there is a lack of ACK on the bus?&amp;nbsp; I'm seeing behavior right now where I lack an ACK when another device switches into listen only / passive mode and my NXP Microcontroller with FlexCAN floods the bus at a rate &amp;gt;=1000hz.&amp;nbsp; Ideally I'd be able to detect the ACK error, not flood the bus and send 1 message at a specified time interval to test for an ACK.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 18:53:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexCAN-ACKERR-proper-management/m-p/1290162#M60811</guid>
      <dc:creator>PD</dc:creator>
      <dc:date>2021-06-09T18:53:25Z</dc:date>
    </item>
  </channel>
</rss>

