<?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>Zephyr ProjectのトピックRe: FLEXCAN Driver IRQ too slow?</title>
    <link>https://community.nxp.com/t5/Zephyr-Project/FLEXCAN-Driver-IRQ-too-slow/m-p/2351527#M654</link>
    <description>&lt;P&gt;1：&amp;nbsp;&amp;nbsp;64 mailboxes does not mean 64 active RX buffers&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;FlexCAN supports&amp;nbsp;64 total mailboxes&amp;nbsp;, but&amp;nbsp;each mailbox can be configured as either Rx or Tx&amp;nbsp;， so the effective receive capacity depends on how the driver configures them, not just on the raw hardware count.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_1-1776251461207.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/382451i2AAC19E49BBE4985/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_1-1776251461207.png" alt="mayliu1_1-1776251461207.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2:&amp;nbsp; &amp;nbsp;Rx FIFO and Mailboxes are not simply mutually exclusive&amp;nbsp;. The FlexCAN block includes both Mailboxes and an Rx FIFO, and the hardware supports&amp;nbsp;selectable priority between Mailboxes and Rx FIFO during matching&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;3:&amp;nbsp;your observation that you can only process&amp;nbsp;6 frames at a time&amp;nbsp;matches the documented&amp;nbsp;Legacy Rx FIFO depth of 6 frames&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_0-1776251367914.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/382450iFD673320846DEFB1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_0-1776251367914.png" alt="mayliu1_0-1776251367914.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Apr 2026 11:12:58 GMT</pubDate>
    <dc:creator>mayliu1</dc:creator>
    <dc:date>2026-04-15T11:12:58Z</dc:date>
    <item>
      <title>FLEXCAN Driver IRQ too slow?</title>
      <link>https://community.nxp.com/t5/Zephyr-Project/FLEXCAN-Driver-IRQ-too-slow/m-p/2346384#M647</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a CAN based protocol where pings consists of two CAN frames, but for some reason the second frame is seemingly lost.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As can be seen on the photo, the two frames are very close to eachother, but from my debugging the flexcan driver callback is only called once on the first frame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/2026-04-07/can-frames.jpeg &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="can-frames.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/381426i2093B8A16D75E9F5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="can-frames.jpeg" alt="can-frames.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any subsequent pings seem to behave differently, as the photo below shows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/2026-04-07/can-frames-2.jpeg&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="can-frames-2.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/381427iB16F499D2F4E77B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="can-frames-2.jpeg" alt="can-frames-2.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I lower the CAN bitrate the issue seems to dissapear - this is not practical for me because all other devices on my bus are speaking 1Mbit/s, so I have to look elsewhere. I am using a fairly simple setup using LTC2875:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2026-04-07T15_20_44,955548658+02_00.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/381428iBE9EE65FA744875A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2026-04-07T15_20_44,955548658+02_00.png" alt="2026-04-07T15_20_44,955548658+02_00.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2026-04-07T15_22_00,968533394+02_00.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/381434iA13BCE6A36668920/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2026-04-07T15_22_00,968533394+02_00.png" alt="2026-04-07T15_22_00,968533394+02_00.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My device tree:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;amp;flexcan1 {
	/* J7/10 (main bus) */
	status = "okay";
	pinctrl-0 = &amp;lt;&amp;amp;pinmux_flexcan1&amp;gt;;
	pinctrl-names = "default";
	phys = &amp;lt;&amp;amp;can_phy1&amp;gt;;

	can-transceiver {
		max-bitrate = &amp;lt;5000000&amp;gt;;
	};
};

&amp;amp;flexcan2 {
	/* J7/10 (main bus) */
	status = "okay";
	pinctrl-0 = &amp;lt;&amp;amp;pinmux_flexcan2&amp;gt;;
	pinctrl-names = "default";
	phys = &amp;lt;&amp;amp;can_phy2&amp;gt;;

	can-transceiver {
		max-bitrate = &amp;lt;5000000&amp;gt;;
	};
};

&amp;amp;flexcan3 {
	/* J9? */
	status = "okay";
	pinctrl-0 = &amp;lt;&amp;amp;pinmux_flexcan3&amp;gt;;
	pinctrl-names = "default";
	phys = &amp;lt;&amp;amp;can_phy3&amp;gt;;

	can-transceiver {
		max-bitrate = &amp;lt;5000000&amp;gt;;
	};
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To me, it looks a bit like the flexcan driver's IRQ is doing a lot of stuff before lowering the "I have handled the event"-flag, which might be what is leading to this issue, but my attempts at patching it has not resulted in any improvement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using zephyr version 4.3.0 and the upstream `hal_nxp` module (so version 2.14.4 of the flexcan driver)&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2026 13:31:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Zephyr-Project/FLEXCAN-Driver-IRQ-too-slow/m-p/2346384#M647</guid>
      <dc:creator>agj</dc:creator>
      <dc:date>2026-04-07T13:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXCAN Driver IRQ too slow?</title>
      <link>https://community.nxp.com/t5/Zephyr-Project/FLEXCAN-Driver-IRQ-too-slow/m-p/2347091#M649</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/260750"&gt;@agj&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thank you so much for your interest in our products and for using our community.&lt;/P&gt;
&lt;DIV&gt;
&lt;P&gt;&amp;nbsp;I suggest you check below :&lt;/P&gt;
&lt;DIV&gt;
&lt;P&gt;1: Check whether your Zephyr setup is using a single RX mailbox or the RX FIFO.&lt;/P&gt;
&lt;P&gt;2:&amp;nbsp;I&amp;nbsp; suggest using the RX FIFO or multiple RX mailboxes.&lt;/P&gt;
&lt;P&gt;3:&amp;nbsp;Please check for RX FIFO overflow or warning states.&lt;/P&gt;
&lt;DIV&gt;
&lt;P&gt;The NXP SDK defines specific receive statuses such as&amp;nbsp; kStatus_FLEXCAN_RxFifoBusy,&amp;nbsp; &amp;nbsp;kStatus_FLEXCAN_RxFifoOverflow,&amp;nbsp; and&amp;nbsp; &amp;nbsp; kStatus_FLEXCAN_RxFifoWarning .&lt;/P&gt;
&lt;P&gt;If you can add some logging and see overflow or warning conditions, that would&amp;nbsp; point to a buffering issue rather than a PHY or bitrate problem.&lt;/P&gt;
&lt;P&gt;Please try it.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;May Liu&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Apr 2026 10:40:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Zephyr-Project/FLEXCAN-Driver-IRQ-too-slow/m-p/2347091#M649</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2026-04-08T10:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXCAN Driver IRQ too slow?</title>
      <link>https://community.nxp.com/t5/Zephyr-Project/FLEXCAN-Driver-IRQ-too-slow/m-p/2350572#M651</link>
      <description>Hi May,&lt;BR /&gt;&lt;BR /&gt;You make it sound like RX FIFO and Mailboxes are mutually exclusive, is this correct?&lt;BR /&gt;By my research, it looks like mailboxes are enabled as the default (confirmed through a gdb session - I have 64 mailboxes) however, I don't see how to enable RX FIFO. Can you assist in how to enable RX FIFO in my zephyr project?&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Asger Gitz-Johansen</description>
      <pubDate>Tue, 14 Apr 2026 07:35:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Zephyr-Project/FLEXCAN-Driver-IRQ-too-slow/m-p/2350572#M651</guid>
      <dc:creator>agj</dc:creator>
      <dc:date>2026-04-14T07:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXCAN Driver IRQ too slow?</title>
      <link>https://community.nxp.com/t5/Zephyr-Project/FLEXCAN-Driver-IRQ-too-slow/m-p/2351497#M653</link>
      <description>I tried enabling `CONFIG_CAN_STATS=y` (and `CONFIG_STATS=y`)... `can show can@400c4000` shows that an rx overrun occurred (see below). This is very odd to me considering the default amount of mailboxes is 64. I also noticed that I can only process 6 can frames at a time on the MCU...&lt;BR /&gt;&lt;BR /&gt;```&lt;BR /&gt;uart:~$ can show can@400c4000&lt;BR /&gt;core clock: 24000000 Hz&lt;BR /&gt;max bitrate: 1000000 bps&lt;BR /&gt;max std filters: 10&lt;BR /&gt;max ext filters: 10&lt;BR /&gt;capabilities: normal loopback listen-only triple-sampling&lt;BR /&gt;mode: normal&lt;BR /&gt;state: error-active&lt;BR /&gt;rx errors: 0&lt;BR /&gt;tx errors: 0&lt;BR /&gt;timing: sjw 1..4, prop_seg 1..8, phase_seg1 1..8, phase_seg2 2..8, prescaler 1..256&lt;BR /&gt;transceiver: can-phy1&lt;BR /&gt;statistics:&lt;BR /&gt;bit errors: 0&lt;BR /&gt;bit0 errors: 0&lt;BR /&gt;bit1 errors: 0&lt;BR /&gt;stuff errors: 0&lt;BR /&gt;crc errors: 0&lt;BR /&gt;form errors: 0&lt;BR /&gt;ack errors: 0&lt;BR /&gt;rx overruns: 1&lt;BR /&gt;```</description>
      <pubDate>Wed, 15 Apr 2026 10:38:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Zephyr-Project/FLEXCAN-Driver-IRQ-too-slow/m-p/2351497#M653</guid>
      <dc:creator>agj</dc:creator>
      <dc:date>2026-04-15T10:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXCAN Driver IRQ too slow?</title>
      <link>https://community.nxp.com/t5/Zephyr-Project/FLEXCAN-Driver-IRQ-too-slow/m-p/2351527#M654</link>
      <description>&lt;P&gt;1：&amp;nbsp;&amp;nbsp;64 mailboxes does not mean 64 active RX buffers&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;FlexCAN supports&amp;nbsp;64 total mailboxes&amp;nbsp;, but&amp;nbsp;each mailbox can be configured as either Rx or Tx&amp;nbsp;， so the effective receive capacity depends on how the driver configures them, not just on the raw hardware count.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_1-1776251461207.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/382451i2AAC19E49BBE4985/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_1-1776251461207.png" alt="mayliu1_1-1776251461207.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2:&amp;nbsp; &amp;nbsp;Rx FIFO and Mailboxes are not simply mutually exclusive&amp;nbsp;. The FlexCAN block includes both Mailboxes and an Rx FIFO, and the hardware supports&amp;nbsp;selectable priority between Mailboxes and Rx FIFO during matching&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;3:&amp;nbsp;your observation that you can only process&amp;nbsp;6 frames at a time&amp;nbsp;matches the documented&amp;nbsp;Legacy Rx FIFO depth of 6 frames&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_0-1776251367914.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/382450iFD673320846DEFB1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_0-1776251367914.png" alt="mayliu1_0-1776251367914.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 11:12:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Zephyr-Project/FLEXCAN-Driver-IRQ-too-slow/m-p/2351527#M654</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2026-04-15T11:12:58Z</dc:date>
    </item>
  </channel>
</rss>

