<?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のトピックInterrupt on Receiving CAN FD S32k144</title>
    <link>https://community.nxp.com/t5/S32K/Interrupt-on-Receiving-CAN-FD-S32k144/m-p/1908515#M37704</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;i would ask if there's any example for CAN FD Interrupt without SDK.&lt;/P&gt;&lt;P&gt;I've configured IMASK1, is there anything else I must do?&lt;/P&gt;&lt;P&gt;I tested it with canoe and send a CAN FD Message. But it says Tx Error (Bit Error and NAK Error)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope anyone can help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sandra&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2024 08:37:50 GMT</pubDate>
    <dc:creator>12914A</dc:creator>
    <dc:date>2024-07-15T08:37:50Z</dc:date>
    <item>
      <title>Interrupt on Receiving CAN FD S32k144</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-on-Receiving-CAN-FD-S32k144/m-p/1908515#M37704</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;i would ask if there's any example for CAN FD Interrupt without SDK.&lt;/P&gt;&lt;P&gt;I've configured IMASK1, is there anything else I must do?&lt;/P&gt;&lt;P&gt;I tested it with canoe and send a CAN FD Message. But it says Tx Error (Bit Error and NAK Error)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope anyone can help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sandra&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 08:37:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-on-Receiving-CAN-FD-S32k144/m-p/1908515#M37704</guid>
      <dc:creator>12914A</dc:creator>
      <dc:date>2024-07-15T08:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt on Receiving CAN FD S32k144</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-on-Receiving-CAN-FD-S32k144/m-p/1909410#M37747</link>
      <description>&lt;P&gt;Hi@&lt;A id="link_5" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/232799" target="_self" aria-label="View Profile of Sandra1"&gt;&lt;SPAN class=""&gt;Sandra1&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I made a demo base on "S32K144_Project_CanFd" which is provided in S32 DS For Arm V2.2.&lt;/P&gt;
&lt;P&gt;1.set MB4 interrupt mask in&amp;nbsp;FLEXCAN0_init()&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;CAN0-&amp;gt;IMASK1 |= CAN_IMASK1_BUF31TO0M(1 &amp;lt;&amp;lt; 4);/*Enable MB 4 interrupt mask*/&lt;/LI-CODE&gt;
&lt;P&gt;2.Set NVIC and install&amp;nbsp; CAN0 IRQ Handler&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;void NVIC_init_IRQs (void)
{
	  S32_NVIC-&amp;gt;ICPR[2] = 1 &amp;lt;&amp;lt; (CAN0_ORed_0_15_MB_IRQn % 32);
	  S32_NVIC-&amp;gt;ISER[2] = 1 &amp;lt;&amp;lt; (CAN0_ORed_0_15_MB_IRQn % 32);
	  S32_NVIC-&amp;gt;IP[CAN0_ORed_0_15_MB_IRQn] = 0xA0;
}

void CAN0_ORed_0_15_MB_IRQHandler(void)
{
    if ((CAN0-&amp;gt;IFLAG1 &amp;gt;&amp;gt; 4) &amp;amp; 1) {  /* If CAN 0 MB 4 flag is set (received msg), read MB4 */
      FLEXCAN0_receive_msg();      /* Read message */
      rx_msg_count++;               /* Increment receive msg counter */

      if (rx_msg_count == 10) {   /* If 1000 messages have been received, */
        PTD-&amp;gt;PTOR |= 1&amp;lt;&amp;lt;16;         /*   toggle output port D16 (Green LED) */
        rx_msg_count = 0;           /*   and reset message counter */
      }

      FLEXCAN0_transmit_msg();     /* Transmit message using MB0 */
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1721109138585.png" style="width: 739px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/288689iEC089D9E9FAAC789/image-dimensions/739x213?v=v2" width="739" height="213" role="button" title="Senlent_0-1721109138585.png" alt="Senlent_0-1721109138585.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 06:03:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-on-Receiving-CAN-FD-S32k144/m-p/1909410#M37747</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2024-07-16T06:03:07Z</dc:date>
    </item>
  </channel>
</rss>

