<?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>S32 SDK中的主题 Re: FlexCAN stuck in interrupt loop</title>
    <link>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733410#M293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we updated to SDK 3.0.2 with ISELED driver 4.0.0 and so far had no further problems with the FlexCAN driver itself. That being said, when we want to read data from the ISELEDs, sometimes the ISELED driver will override part of RAM, which for us coincidentally holds the runtime data of the FlexCAN driver (time stamps, flexcan driver states). When this happens,&amp;nbsp;the FlexCAN driver often gets stuck in an interrupt loop again. I created another thread for this issue (&lt;A href="https://community.nxp.com/thread/538270"&gt;S32K ISELED buffer override&lt;/A&gt;&amp;nbsp;). So there still there seems to be some cross over effects using the ISELED driver and FlexCAN driver, at least for us.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jul 2020 06:30:04 GMT</pubDate>
    <dc:creator>christianmächle</dc:creator>
    <dc:date>2020-07-29T06:30:04Z</dc:date>
    <item>
      <title>FlexCAN stuck in interrupt loop</title>
      <link>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733406#M289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;There is a bug in the FlexCAN module of SDK 1.8.7 where the controller gets stuck in an interrupt loop.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;This issue often occurs when using the RX FIFO but can also occur when using message boxes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #3d3d3d; font-size: 11.5pt;"&gt;Explanation:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;Under certain circumstances the &lt;EM&gt;FLEXCAN_IRQHandler&lt;/EM&gt; can&amp;nbsp;reset the status of a message box to&amp;nbsp;&lt;EM&gt;FLEXCAN_MB_IDLE&lt;/EM&gt; without resetting the IFLAG of the message box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;In this case, when the&amp;nbsp;&lt;EM&gt;FLEXCAN_IRQHandler&lt;/EM&gt; exists, the&amp;nbsp;CAN interrupt is immediately called again (since the IFLAG of the message box is still active) and executes the&amp;nbsp;&lt;EM&gt;FLEXCAN_IRQHandler&lt;/EM&gt;&amp;nbsp;again.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;The&amp;nbsp;&lt;EM&gt;FLEXCAN_IRQHandler&amp;nbsp;&lt;/EM&gt;realizes that the IFLAG of the message box is set, but since the status of this message box was already reset to&amp;nbsp;&lt;EM&gt;FLEXCAN_MB_IDLE&lt;/EM&gt;, the&amp;nbsp;&lt;EM&gt;FLEXCAN_IRQHandler&lt;/EM&gt; does not service the message box and exits without resetting the IFLAG. In that case the CAN interrupt is called again and so on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;The controller is then stuck in an interrupt loop.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #3d3d3d; font-size: 11.5pt;"&gt;Solution:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;This failure can be avoided by adding&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="token function"&gt;FLEXCAN_ClearMsgBuffIntStatusFlag&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;base&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; mb_idx&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;after line 1196 of flexcan_driver.c#&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Mar 2018 20:31:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733406#M289</guid>
      <dc:creator>christianmächle</dc:creator>
      <dc:date>2018-03-24T20:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN stuck in interrupt loop</title>
      <link>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733407#M290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There were some updates made in the FLEXCAN IRQ handler which should fix this issue.&lt;/P&gt;&lt;P&gt;But can you provide more details&amp;nbsp;for the "certain circumstances"? We need to make sure that the scenario which you describes is covered by our updates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rares&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2018 09:04:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733407#M290</guid>
      <dc:creator>raresvasile</dc:creator>
      <dc:date>2018-03-28T09:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN stuck in interrupt loop</title>
      <link>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733408#M291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately we did not investigate the root cause of the error further.&lt;/P&gt;&lt;P&gt;For our application we are using the ISELED driver together with the FlexCAN driver. The goal is to send about 50 CAN messages back to back to the microcontroller every 30ms. We noticed that if we sat up the FlexCAN driver as RX FIFO and do not clear the RX FIFO fast enough during that burst of CAN messages, that the driver would be stuck in that loop.&lt;/P&gt;&lt;P&gt;We could also halt the controller in debug mode while sending that burst of messages and after we let the application run again, the controller would be stuck in this loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2018 18:36:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733408#M291</guid>
      <dc:creator>christianmächle</dc:creator>
      <dc:date>2018-03-29T18:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN stuck in interrupt loop</title>
      <link>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733409#M292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/raresvasile"&gt;raresvasile&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I have the same issue , i am using SDK v3.00 , was this issue fixed in later versions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2020 10:30:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733409#M292</guid>
      <dc:creator>islam1</dc:creator>
      <dc:date>2020-07-28T10:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN stuck in interrupt loop</title>
      <link>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733410#M293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we updated to SDK 3.0.2 with ISELED driver 4.0.0 and so far had no further problems with the FlexCAN driver itself. That being said, when we want to read data from the ISELEDs, sometimes the ISELED driver will override part of RAM, which for us coincidentally holds the runtime data of the FlexCAN driver (time stamps, flexcan driver states). When this happens,&amp;nbsp;the FlexCAN driver often gets stuck in an interrupt loop again. I created another thread for this issue (&lt;A href="https://community.nxp.com/thread/538270"&gt;S32K ISELED buffer override&lt;/A&gt;&amp;nbsp;). So there still there seems to be some cross over effects using the ISELED driver and FlexCAN driver, at least for us.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2020 06:30:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733410#M293</guid>
      <dc:creator>christianmächle</dc:creator>
      <dc:date>2020-07-29T06:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN stuck in interrupt loop</title>
      <link>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733411#M294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I got the same issue in the SDK 3.0.2. The root cause of this issue is the IMASK1 flag of a mailbox is set while its state is IDLE. This results in an unexpected interrupt occurring.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pre-condition:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using at least two mailboxes for transmitting or receiving, it is not necessary to enable Rx FIFO.&lt;/LI&gt;&lt;LI&gt;Make a high bus traffic environment.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Explanation:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The function FLEXCAN_SetMsgBuffIntCmd is used to set or clear the IMASK flag of a specific mailbox ID. The following code in this function shall cause the problem.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;if (enable)&lt;BR /&gt;{&lt;BR /&gt; (base-&amp;gt;IMASK1) = ((base -&amp;gt;IMASK1) | (temp));&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt; (base-&amp;gt;IMASK1) = ((base-&amp;gt;IMASK1) &amp;amp; ~(temp));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;This "(base-&amp;gt; IMASK1) = ((base -&amp;gt; IMASK1) | (temp))" expression is not an atomic block. So that, a FlexCAN interrupt will probably interrupt this expression. In this case, the other mailbox IMASK flags that were cleared by the ISR are now re-set.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resolution:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Add the expression into an atomic block.&lt;/P&gt;&lt;P&gt;DISABLE_INTERRUPTS();&lt;BR /&gt;(base-&amp;gt;IMASK1) = ((base -&amp;gt;IMASK1) | (temp));&lt;BR /&gt;ENABLE_INTERRUPTS();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2020 03:09:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733411#M294</guid>
      <dc:creator>khaipham</dc:creator>
      <dc:date>2020-08-20T03:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: FlexCAN stuck in interrupt loop</title>
      <link>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733412#M295</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;we upgraded to SDK 4.0.0 and the issue is not occurring anymore (Release note also states that this release fixes that issue ).. so we consider this closed&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks all for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2020 17:14:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/FlexCAN-stuck-in-interrupt-loop/m-p/733412#M295</guid>
      <dc:creator>islam1</dc:creator>
      <dc:date>2020-08-25T17:14:28Z</dc:date>
    </item>
  </channel>
</rss>

