<?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: K70 FlexCAN: thousands of error interrupts per second in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-FlexCAN-thousands-of-error-interrupts-per-second/m-p/161248#M647</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm. Reading the K70 RM again, I see no rule that would prevent it from trying to resend the CAN frame and raising another error interrupt for the new ACK error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll try polling errors.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2012 16:57:54 GMT</pubDate>
    <dc:creator>konrada</dc:creator>
    <dc:date>2012-05-16T16:57:54Z</dc:date>
    <item>
      <title>K70 FlexCAN: thousands of error interrupts per second</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-FlexCAN-thousands-of-error-interrupts-per-second/m-p/161247#M646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I'm using a K70's integrated FlexCAN on a custom board, together with a third-party CANopen stack (by port GmbH) with a driver I've written.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem: when I activate the CANopen stack with no termination and no other CAN bus member present, I get a storm of error interrupts (roughly 3000 per second).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see that the CANopen stack has tried to send out its NMT 'hello this is NMT slave 1' telegram through the mailbox which does the transmitting. From what I know about CAN, I expect the FlexCAN to detect a lack of acknowledgement, increase the TX error counter and try to resend the NMT telegram, until TX error counter reaches 0x80, at which point FlexCAN goes into Error-Passive state.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I observe is thousands of error interrupts per second, each time with ESR1=0x42252, (that is, SYNCH, ACKERR, TXWRN, TX, and ERRINT are 1 and FLTCONF=1, error passive). ECR reads as (TXERRCNT=128, RXERRCNT=0).&lt;/P&gt;&lt;P&gt;I have disabled TX warnings in CTRL1.TXWRNMSK, so I believe this isn't a TX warning interrupt. The acknowledgment sequence at the end of the ISR consists of&lt;/P&gt;&lt;PRE&gt;regs-&amp;gt;ESR1 = CAN_ESR1_ERRINT_MASK; regs-&amp;gt;ESR1 = CAN_ESR1_BOFFINT_MASK;&lt;/PRE&gt;&lt;P&gt;and I don't believe this is a case of unacknowledged interrupt; the system remains somewhat responsive after all. Also, the task which runs the main loop of the CANopen stack is never entered during that time, so I believe it's not the CANopen stack sending telegrams like crazy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I know the CAN spec, (e.g. rules in &lt;A href="http://www.softing.com/home/en/industrial-automation/products/can-bus/more-can-bus/error-handling/fault-confinement-rules-5-7.php?navanchor=3010516" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;http://www.softing.com/home/en/industrial-automation/products/can-bus/more-can-bus/error-handling/fault-confinement-rules-5-7.php?navanchor=3010516&lt;/A&gt; ), the FlexCAN should not leave the Error Passive state unless it successfully transmits a frame, which is impossible in my setup. So I expect it to stay error-passive and not tell me every time. Is that a reasonable expectation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings KA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:06:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-FlexCAN-thousands-of-error-interrupts-per-second/m-p/161247#M646</guid>
      <dc:creator>konrada</dc:creator>
      <dc:date>2020-10-29T09:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: K70 FlexCAN: thousands of error interrupts per second</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-FlexCAN-thousands-of-error-interrupts-per-second/m-p/161248#M647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm. Reading the K70 RM again, I see no rule that would prevent it from trying to resend the CAN frame and raising another error interrupt for the new ACK error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll try polling errors.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 16:57:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K70-FlexCAN-thousands-of-error-interrupts-per-second/m-p/161248#M647</guid>
      <dc:creator>konrada</dc:creator>
      <dc:date>2012-05-16T16:57:54Z</dc:date>
    </item>
  </channel>
</rss>

