<?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>topic Re: How to Receive multiple CAN messages in S32K</title>
    <link>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1588488#M20239</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210548"&gt;@Dileep1441&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you tell us the MCU that you are using? And also, which software?&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2023 18:55:00 GMT</pubDate>
    <dc:creator>VaneB</dc:creator>
    <dc:date>2023-01-26T18:55:00Z</dc:date>
    <item>
      <title>How to Receive multiple CAN messages</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1588365#M20236</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to receive multiple CAN messages.&lt;/P&gt;&lt;P&gt;Please check the below function which i wrote for receive the single message, but i want to receive multiple messages id's, please do the needful on this requirement.&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UINT16 CAN_Rx(UINT32 Rx_Id, UINT8* Data)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;/* Set information about the data to be sent&lt;BR /&gt;* - Standard message ID&lt;BR /&gt;* - Bit rate switch enabled to use a different bitrate for the data segment&lt;BR /&gt;* - Flexible data rate enabled&lt;BR /&gt;* - Use zeros for FD padding&lt;BR /&gt;*/&lt;BR /&gt;can_buff_config_t buffCfg = {&lt;BR /&gt;.enableFD = true,&lt;BR /&gt;.enableBRS = true,&lt;BR /&gt;.fdPadding = 0U,&lt;BR /&gt;.idType = CAN_ID_TYPE,&lt;BR /&gt;.isRemote = false&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;/* Define receive buffer */&lt;BR /&gt;can_message_t recvMsg;&lt;/P&gt;&lt;P&gt;/* Configure RX buffer with index RX_MAILBOX */&lt;BR /&gt;CAN_ConfigRxBuff(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;buffCfg, Rx_Id);&lt;/P&gt;&lt;P&gt;/* Start receiving data in RX_MAILBOX. */&lt;BR /&gt;CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;recvMsg);&lt;/P&gt;&lt;P&gt;/* Wait until the previous FlexCAN receive is completed */&lt;BR /&gt;if(CAN_GetTransferStatus(INST_CAN_PAL1, RX_MAILBOX) != STATUS_BUSY)&lt;BR /&gt;{&lt;BR /&gt;/* Check the received message ID and payload */&lt;BR /&gt;if(recvMsg.id == RX_MSG_ID)&lt;BR /&gt;{&lt;BR /&gt;CAN_Rx_test_ID = recvMsg.id;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 15:13:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1588365#M20236</guid>
      <dc:creator>Dileep1441</dc:creator>
      <dc:date>2023-01-26T15:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to Receive multiple CAN messages</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1588488#M20239</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210548"&gt;@Dileep1441&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you tell us the MCU that you are using? And also, which software?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 18:55:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1588488#M20239</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-01-26T18:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to Receive multiple CAN messages</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1588492#M20240</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I'm using S32K144 EVB, and Software S32DS ARM 2018.R1&lt;/P&gt;&lt;P&gt;Example code:can_pal_s32k144&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please request to share the process and configuration for below requirements:&lt;/P&gt;&lt;P&gt;1.CAN Rx Interrupt Method(when ever the msg received control need to goes to CAN Rx IRQ)&lt;/P&gt;&lt;P&gt;2.CAN Rx Filtering Method(Ex MSG ID's:: 0x10 to 0x20)&lt;/P&gt;&lt;P&gt;3.Multiple CAN Messages Receiving method(need to receive all the messages on the bus)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 19:05:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1588492#M20240</guid>
      <dc:creator>Dileep1441</dc:creator>
      <dc:date>2023-01-26T19:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Receive multiple CAN messages</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1588578#M20242</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210548"&gt;@Dileep1441&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Firstly I recommend you update the IDE to &lt;A href="https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=S32DS-3-4" target="_blank" rel="noopener"&gt;S32DS 3.4&lt;/A&gt; and the lasted SDK version (&lt;A href="https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=SW32K14-SDK1D" target="_blank" rel="noopener"&gt;S32SDK_S32K1XX_RTM_4.0.3.&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;In section 16.33 Controller Area Network - Peripheral Abstraction Layer (CAN PAL) of the S32SDK User Manual, you can find a detailed description and example codes of CAN PAL. You can find it at ...\nxp\S32DS.3.4\S32DS\software\S32SDK_S32K1XX_RTM_4.0.3\doc&lt;BR /&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;: the previous path is an example of where you can find the S32SDK_S32K144_UserManual&lt;/P&gt;&lt;P&gt;Also, refer to the following community posts that could be useful for you.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.nxp.com/t5/S32K/How-to-receive-multiple-CAN-message/m-p/1516819" target="_blank" rel="noopener"&gt;How to receive multiple CAN message&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.nxp.com/t5/S32K/S32k144-CAN-Receive-Multiple-messages/m-p/736267" target="_blank" rel="noopener"&gt;S32k144 CAN Receive Multiple messages&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.nxp.com/t5/S32K/Not-able-to-receive-multiple-can-message/m-p/1520497" target="_blank" rel="noopener"&gt;Not able to receive multiple can message&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 26 Jan 2023 22:56:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1588578#M20242</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-01-26T22:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to Receive multiple CAN messages</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1588855#M20250</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the Reply.&lt;/P&gt;&lt;P&gt;Please check the below code, using below code i can able to receive all the message ID's&lt;/P&gt;&lt;P&gt;but the issue is, that while loop is blocking my remining functionality of the code.&lt;/P&gt;&lt;P&gt;Can you please suggest without while loop or please share the interrupt method code for Rx.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/***********************************************************************************************************************&lt;BR /&gt;* Function Name: UINT16 CAN_Rx(UINT32 Rx_Id, UINT8* Data, UINT8 Data_len)&lt;BR /&gt;* Description : This function is used to Receive the data on CAN&lt;BR /&gt;* Arguments : CAN_MSG_ID, Data, Data length&lt;BR /&gt;* Return Value : Status&lt;BR /&gt;***********************************************************************************************************************/&lt;BR /&gt;UINT16 CAN_Rx(UINT32 Rx_Id, UINT8* Data)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;/* Set information about the data to be sent&lt;BR /&gt;* - Standard message ID&lt;BR /&gt;* - Bit rate switch enabled to use a different bitrate for the data segment&lt;BR /&gt;* - Flexible data rate enabled&lt;BR /&gt;* - Use zeros for FD padding&lt;BR /&gt;*/&lt;BR /&gt;can_buff_config_t buffCfg = {&lt;BR /&gt;.enableFD = true,&lt;BR /&gt;.enableBRS = true,&lt;BR /&gt;.fdPadding = 0U,&lt;BR /&gt;.idType = CAN_ID_TYPE,&lt;BR /&gt;.isRemote = false&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;/* Define receive buffer */&lt;BR /&gt;can_message_t recvMsg;&lt;/P&gt;&lt;P&gt;/* Configure RX buffer with index RX_MAILBOX */&lt;BR /&gt;CAN_ConfigRxBuff(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;buffCfg, Rx_Id);&lt;BR /&gt;FLEXCAN_DRV_SetRxMbGlobalMask(INST_CAN_PAL1, FLEXCAN_MSG_ID_STD, 0); // All id received masking&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Start receiving data in RX_MAILBOX. */&lt;BR /&gt;CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;recvMsg);&lt;/P&gt;&lt;P&gt;while(1)&lt;BR /&gt;{&lt;BR /&gt;/* Wait until the previous FlexCAN receive is completed */&lt;BR /&gt;if(CAN_GetTransferStatus(INST_CAN_PAL1, RX_MAILBOX) == STATUS_SUCCESS) //STATUS_BUSY&lt;BR /&gt;{&lt;BR /&gt;CAN_Rx_test_ID = recvMsg.id;&lt;BR /&gt;CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;recvMsg);&lt;/P&gt;&lt;P&gt;/* Check the received message ID and payload */&lt;BR /&gt;/* if(recvMsg.id == RX_MSG_ID)&lt;BR /&gt;{&lt;BR /&gt;CAN_Rx_test_ID = recvMsg.id;&lt;BR /&gt;}*/&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 12:16:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1588855#M20250</guid>
      <dc:creator>Dileep1441</dc:creator>
      <dc:date>2023-01-27T12:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to Receive multiple CAN messages</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1590814#M20321</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210548"&gt;@Dileep1441&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer&amp;nbsp;ftm_periodic_interrupt example, with this you can see how to work with interruptions.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 22:15:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Receive-multiple-CAN-messages/m-p/1590814#M20321</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-01-31T22:15:47Z</dc:date>
    </item>
  </channel>
</rss>

