<?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: Flex_CAN Receive issue</title>
    <link>https://community.nxp.com/t5/S32K/Flex-CAN-Receive-issue/m-p/1389294#M13299</link>
    <description>&lt;P&gt;Hi&amp;nbsp;PeteS,&lt;/P&gt;&lt;P&gt;Thank you for support.&lt;/P&gt;&lt;P&gt;I follow the below&amp;nbsp; procedure &amp;amp; I got Rx data but, in that I am getting garbage values .I am attaching Transmit &amp;amp;receive data screenshots for your reference. Please help me to sort out this problem.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 08:54:00 GMT</pubDate>
    <dc:creator>vardhan</dc:creator>
    <dc:date>2021-12-20T08:54:00Z</dc:date>
    <item>
      <title>Flex_CAN Receive issue</title>
      <link>https://community.nxp.com/t5/S32K/Flex-CAN-Receive-issue/m-p/1388785#M13291</link>
      <description>&lt;P&gt;In S32k144 Evolution board I import Flex CAN project. Transmit functions working properly but Receive functions i didn't get Receive data by using MICROCHIP CAN BUS Analyzer.&lt;/P&gt;&lt;P&gt;As of my observation this Flag (CAN0-&amp;gt;FLAG1) is not setting in Receiver function. Please help me to&amp;nbsp; resolve the issue&lt;/P&gt;&lt;P&gt;Below is my working flow&amp;nbsp;&lt;/P&gt;&lt;P&gt;In main(){&lt;/P&gt;&lt;P&gt;for (;;)&lt;BR /&gt;{&lt;BR /&gt;/* Loop: if a msg is received, transmit a msg */&lt;BR /&gt;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 */&lt;BR /&gt;FLEXCAN0_receive_msg (); /* Read message */&lt;BR /&gt;rx_msg_count++; /* Increment receive msg counter */&lt;/P&gt;&lt;P&gt;if (rx_msg_count == 1000) { /* If 1000 messages have been received, */&lt;BR /&gt;PTD-&amp;gt;PTOR |= 1&amp;lt;&amp;lt;16; /* toggle output port D16 (Green LED) */&lt;BR /&gt;rx_msg_count = 0; /* and reset message counter */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;FLEXCAN0_transmit_msg (); /* Transmit message using MB0 */&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void FLEXCAN0_receive_msg(void)&lt;BR /&gt;{&lt;BR /&gt;/*! Receive msg from ID 0x556 using msg buffer 4&lt;BR /&gt;* =============================================&lt;BR /&gt;*/&lt;BR /&gt;uint8_t j;&lt;BR /&gt;uint32_t dummy;&lt;/P&gt;&lt;P&gt;RxCODE = (CAN0-&amp;gt;RAMn[ 4*MSG_BUF_SIZE + 0] &amp;amp; 0x07000000) &amp;gt;&amp;gt; 24; /* Read CODE field */&lt;BR /&gt;RxID = (CAN0-&amp;gt;RAMn[ 4*MSG_BUF_SIZE + 1] &amp;amp; CAN_WMBn_ID_ID_MASK) &amp;gt;&amp;gt; CAN_WMBn_ID_ID_SHIFT; /* Read ID */&lt;BR /&gt;RxLENGTH = (CAN0-&amp;gt;RAMn[ 4*MSG_BUF_SIZE + 0] &amp;amp; CAN_WMBn_CS_DLC_MASK) &amp;gt;&amp;gt; CAN_WMBn_CS_DLC_SHIFT; /* Read Message Length */&lt;/P&gt;&lt;P&gt;for (j=0; j&amp;lt;2; j++)&lt;BR /&gt;{ /* Read two words of data (8 bytes) */&lt;BR /&gt;RxDATA[j] = CAN0-&amp;gt;RAMn[ 4*MSG_BUF_SIZE + 2 + j];&lt;BR /&gt;}&lt;BR /&gt;RxTIMESTAMP = (CAN0-&amp;gt;RAMn[ 0*MSG_BUF_SIZE + 0] &amp;amp; 0x000FFFF);&lt;BR /&gt;dummy = CAN0-&amp;gt;TIMER; /* Read TIMER to unlock message buffers */&lt;BR /&gt;CAN0-&amp;gt;IFLAG1 = 0x00000010; /* Clear CAN 0 MB 4 flag without clearing others*/&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 10:58:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Flex-CAN-Receive-issue/m-p/1388785#M13291</guid>
      <dc:creator>vardhan</dc:creator>
      <dc:date>2021-12-17T10:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Flex_CAN Receive issue</title>
      <link>https://community.nxp.com/t5/S32K/Flex-CAN-Receive-issue/m-p/1388990#M13293</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;so you are using&amp;nbsp;S32K144_Project_FlexCan example. You are able to send message (std ID 0x555), this is visible on CAN bus analyzer. This example is preparing MB4 to receive message with std ID 0x511. Is this message send from&amp;nbsp;CAN bus analyzer? if yes, is the message ACKed, or do you see any error detected on both sides?&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 21:51:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Flex-CAN-Receive-issue/m-p/1388990#M13293</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-12-17T21:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Flex_CAN Receive issue</title>
      <link>https://community.nxp.com/t5/S32K/Flex-CAN-Receive-issue/m-p/1389294#M13299</link>
      <description>&lt;P&gt;Hi&amp;nbsp;PeteS,&lt;/P&gt;&lt;P&gt;Thank you for support.&lt;/P&gt;&lt;P&gt;I follow the below&amp;nbsp; procedure &amp;amp; I got Rx data but, in that I am getting garbage values .I am attaching Transmit &amp;amp;receive data screenshots for your reference. Please help me to sort out this problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 08:54:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Flex-CAN-Receive-issue/m-p/1389294#M13299</guid>
      <dc:creator>vardhan</dc:creator>
      <dc:date>2021-12-20T08:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Flex_CAN Receive issue</title>
      <link>https://community.nxp.com/t5/S32K/Flex-CAN-Receive-issue/m-p/1389543#M13308</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;looks RxDATA[0] and&amp;nbsp;RxDATA[1] have correct values, you read 32bit word and&lt;/P&gt;
&lt;P&gt;RxDATA[0] =&amp;nbsp;16909060 = 0x1020304&lt;BR /&gt;RxDATA[1] = 84281096 = 0x5060708&lt;/P&gt;
&lt;P&gt;thus byte values correspond to one transmitted by CAN tool.&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 13:14:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Flex-CAN-Receive-issue/m-p/1389543#M13308</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-12-20T13:14:41Z</dc:date>
    </item>
  </channel>
</rss>

