<?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>S32KのトピックRe: K146 CAN0 BUSOFF issue</title>
    <link>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2088987#M48265</link>
    <description>&lt;P&gt;Thank you, I will try the 2 solutions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I want let my discribtion more clear, I want express, when&amp;nbsp; bus-off happen the interrupt process(left)&amp;nbsp; can't be inserted by freertos task event process (right), right?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Simply to&lt;/SPAN&gt; say, between the bus-off event interrupt process(step3-step7),&lt;SPAN&gt;&amp;nbsp;can0 module can't be re-initialized?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Because CAN0 interrput priority is higher than&amp;nbsp;freertos.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/335446iEB521710CC03F300/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;1.jpg&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Apr 2025 06:29:33 GMT</pubDate>
    <dc:creator>Ali22</dc:creator>
    <dc:date>2025-04-29T06:29:33Z</dc:date>
    <item>
      <title>K146 CAN0 BUSOFF issue</title>
      <link>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2087840#M48202</link>
      <description>&lt;P&gt;Dears,&lt;/P&gt;&lt;P&gt;Anyone who meet this issue: When&amp;nbsp;repeatedly trigger CAN0 bus-off for several times, it happened like this: ESR1[FLTCONF] = 0x3, but&amp;nbsp;ESR1[BOFFINT] is never set,&amp;nbsp;CTRL1[BOFFMSK])&amp;nbsp; always is set. We handle the bus-off error interrupt like this:if&amp;nbsp;ESR1[BOFFINT] = 1, we will re-&lt;SPAN&gt;initialize&lt;/SPAN&gt; the CAN0 module , The question is, in theory ,&amp;nbsp;bus-off happen -&amp;gt; ESR1[FLTCONF] = 0x3&amp;nbsp; ---------------&amp;gt; ESR1[BOFFINT]=1&amp;nbsp; -&amp;gt;CAN0&amp;nbsp;re-&lt;SPAN&gt;initialize -&amp;gt;bus-off happen-&amp;gt; ESR1[FLTCONF] = 0x3~~~~~~~~~this loop can Keep going, but now this loop is stopped for unknown reason, who meet this issue and how to fix it?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/335062i432C4249E0FEF77B/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;1.jpg&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 00:47:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2087840#M48202</guid>
      <dc:creator>Ali22</dc:creator>
      <dc:date>2025-04-28T00:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: K146 CAN0 BUSOFF issue</title>
      <link>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2088263#M48234</link>
      <description>&lt;P&gt;Hi@&lt;SPAN&gt;Ali22&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;We have analyzed and discussed your problem before.&lt;/P&gt;
&lt;P&gt;This should be a problem caused by the order of clearing the ESR1 register:&lt;/P&gt;
&lt;P&gt;I can easily reproduce this working condition.&lt;/P&gt;
&lt;P&gt;I wrote a test demo that you can use directly to observe, and I recorded a video for your reference&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;a. S32K146EVB&lt;BR /&gt;b. S32 Design Studio for Arm V2.2 + RTM 3.0.x&lt;/P&gt;
&lt;P&gt;1. Run the attached project, which will send CAN frames regularly&lt;BR /&gt;2. Short CAN_H and CAN_L to simulate bus-off events&lt;BR /&gt;3. Enter flexcan0_ErrorCallback();&lt;BR /&gt;4. flexcan0_ErrorCallback() will reinitialize the flexcan module, and all flexcan registers will be reset&lt;BR /&gt;5. Try to send (continue to short CAN_H and CAN_L at this time)&lt;BR /&gt;6. The program will enter CAN0_Error_IRQHandler()-&amp;gt;FLEXCAN_ClearErrIntStatusFlag(), where the ESR1 register will be cleared&lt;/P&gt;
&lt;P&gt;7.For now, you will see the ESR1.BOFFINT = 0 but FLTCONF = 0x03.&lt;/P&gt;
&lt;P&gt;The program will not into&amp;nbsp;flexcan0_ErrorCallback() anymore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 09:57:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2088263#M48234</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2025-04-28T09:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: K146 CAN0 BUSOFF issue</title>
      <link>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2088813#M48259</link>
      <description>&lt;P&gt;Dears&lt;/P&gt;&lt;P&gt;Thanks for your support, but we encounter the issue is we just set a flag in &lt;SPAN&gt;flexcan0_ErrorCallback();and&amp;nbsp;flexcan module re-initialize is put in freertos 10ms task, in theory,&amp;nbsp;freertos interrupt can' t break CAN0 error interrupt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/335360i97A5217F487EDF33/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;1.jpg&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so re-initialize flexcan module will never happen before CAN0_Error_IRQHandler() in the below steps, all right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Run the attached project, which will send CAN frames regularly&lt;BR /&gt;2. Short CAN_H and CAN_L to simulate bus-off events&lt;BR /&gt;3. Enter flexcan0_ErrorCallback();&lt;BR /&gt;4. flexcan0_ErrorCallback() will reinitialize the flexcan module, and all flexcan registers will be reset&lt;BR /&gt;5. Try to send (continue to short CAN_H and CAN_L at this time)&lt;BR /&gt;6. The program will enter CAN0_Error_IRQHandler()-&amp;gt;FLEXCAN_ClearErrIntStatusFlag(), where the ESR1 register will be cleared&lt;/P&gt;&lt;P&gt;7.For now, you will see the ESR1.BOFFINT = 0 but FLTCONF = 0x03.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 02:34:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2088813#M48259</guid>
      <dc:creator>Ali22</dc:creator>
      <dc:date>2025-04-29T02:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: K146 CAN0 BUSOFF issue</title>
      <link>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2088834#M48260</link>
      <description>&lt;P&gt;&lt;A href="mailto:Hi@Ali22" target="_blank"&gt;Hi@Ali22&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"so re-initialize flexcan module will never happen before CAN0_Error_IRQHandler() in the below steps, all right?"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;You understand it wrong.&lt;BR /&gt;As long as your flexcan is still sending messages between reinitializing flexcan and clearing the ESR1 register, this problem may occur.&lt;/P&gt;
&lt;P&gt;Solution 1.&lt;BR /&gt;1. Disable FLEXCAN_ClearErrIntStatusFlag() and test your project to see if this phenomenon still occurs.&lt;/P&gt;
&lt;P&gt;Solution 2.&lt;/P&gt;
&lt;P&gt;2.After entering CAN0_Error_IRQHandler(), turn on BOFFREC = 0, bus-off automatic recovery instead of reinitialization, and confirm the bus-off status by polling the FLTCONF bit&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 02:52:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2088834#M48260</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2025-04-29T02:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: K146 CAN0 BUSOFF issue</title>
      <link>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2088987#M48265</link>
      <description>&lt;P&gt;Thank you, I will try the 2 solutions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I want let my discribtion more clear, I want express, when&amp;nbsp; bus-off happen the interrupt process(left)&amp;nbsp; can't be inserted by freertos task event process (right), right?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Simply to&lt;/SPAN&gt; say, between the bus-off event interrupt process(step3-step7),&lt;SPAN&gt;&amp;nbsp;can0 module can't be re-initialized?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Because CAN0 interrput priority is higher than&amp;nbsp;freertos.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/335446iEB521710CC03F300/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;1.jpg&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 06:29:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2088987#M48265</guid>
      <dc:creator>Ali22</dc:creator>
      <dc:date>2025-04-29T06:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: K146 CAN0 BUSOFF issue</title>
      <link>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2089228#M48283</link>
      <description>&lt;P&gt;Hi@&lt;SPAN&gt;Ali22&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Your diagram is wrong. Even if you initialize FlexCAN immediately after the "bus-off event happened agian", there will be no problem.&lt;/P&gt;
&lt;P&gt;The problem is that no new bus-off event can occur between the completion of reinitialization of FlexCan and the clearing of the ESR1 register.&lt;/P&gt;
&lt;P&gt;So how does a new bus-off event occur?&lt;/P&gt;
&lt;P&gt;That is, the external factors that caused the bus-off were not removed. At this time, FlexCan tried to send a message, which would generate a new bus-off event.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;你的图不对,就算是在“bus-off event happed agian”之后立马初始化FlexCAN，也不会有问题。&lt;/P&gt;
&lt;P&gt;问题是在重新初始化FlexCan完成之后至清除ESR1寄存器之间不能发生新的bus-off事件。&lt;/P&gt;
&lt;P&gt;那么新的bus-off事件是如何发生的？&lt;/P&gt;
&lt;P&gt;即造成bus-off的外部因素没有移除，此时FlexCan尝试发送了报文，这就会产生新的bus-off事件。&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 09:27:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2089228#M48283</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2025-04-29T09:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: K146 CAN0 BUSOFF issue</title>
      <link>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2089293#M48289</link>
      <description>&lt;P&gt;Dears&lt;/P&gt;&lt;P&gt;Yes, it is not correct, thanks for your mentioned, it should like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/335542i471B56808950B5C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;1.jpg&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What I want to know is that in this software architecture, CAN0 initialization cannot occur between Enter flexcan0_Errocall() and Enter CAN0_Errc_IRQHandler(), right?&lt;BR /&gt;Because the task of CAN0 is executed in freeRTOS, it is impossible to interrupt the execution process of CAN0 Error interrupt.&lt;/P&gt;&lt;P&gt;我想了解的是在这种软件架构下CAN0初始化不可能发生在Enter flexcan0_ErrorCallback() 和 Enter CAN0_Error_IRQHandler()之间吧？&lt;/P&gt;&lt;P&gt;因为CAN0的任务是执行在freeRTOS里的，不可能打断CAN0 Error中断执行过程。&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 10:47:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2089293#M48289</guid>
      <dc:creator>Ali22</dc:creator>
      <dc:date>2025-04-29T10:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: K146 CAN0 BUSOFF issue</title>
      <link>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2089344#M48295</link>
      <description>&lt;P&gt;Hi@&lt;SPAN&gt;Ali22&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I'm not sure, and we don't support FreeRTOS applications. This is not within our support scope.&lt;/P&gt;
&lt;P&gt;We have discussed this for so long, I just want to tell you the possible causes of this situation and how to simulate this situation.&lt;/P&gt;
&lt;P&gt;You can set some flags or logs in the program to locate the specific cause of the problem.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;我不确定，我们也不去支持FreeRtos的应用，这不在我们的支持范围。&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;我们讨论这么久，我只是想告诉你造成这个状况的可能原因以及如何去模拟这种状况的发生。&lt;/P&gt;
&lt;P&gt;你们可以自己在程序里面去设置一些标志位或者log来定位具体的问题原因。&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 11:50:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/K146-CAN0-BUSOFF-issue/m-p/2089344#M48295</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2025-04-29T11:50:34Z</dc:date>
    </item>
  </channel>
</rss>

