<?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: CAN Code with Non Blocking Functionality</title>
    <link>https://community.nxp.com/t5/S32K/CAN-Code-with-Non-Blocking-Functionality/m-p/1524315#M17801</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;Thanks for the Reply.&lt;/P&gt;&lt;P&gt;Currently the code is for Rx is like below.&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;recvMsg);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;/* Wait until the previous FlexCAN receive is completed */&lt;BR /&gt;&amp;nbsp; &amp;nbsp;while(CAN_GetTransferStatus(INST_CAN_PAL1, RX_MAILBOX) == STATUS_BUSY);&lt;STRONG&gt;//If no message received it's blocking on Here&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;/* Check the received message ID and payload */&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if((recvMsg.data[0] == LED0_CHANGE_REQUESTED) &amp;amp;&amp;amp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;recvMsg.id == RX_MSG_ID)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Toggle output value LED1 */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PINS_DRV_TogglePins(GPIO_PORT, (1 &amp;lt;&amp;lt; LED0));&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;If i removed the while condition, The LED Toggling is not working&lt;/P&gt;&lt;P&gt;also if i changed the code like below also the Toggling is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;recvMsg);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(CAN_GetTransferStatus(INST_CAN_PAL1, RX_MAILBOX) != STATUS_BUSY)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// read data from receive buffer&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;recvMsg);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Sep 2022 13:20:23 GMT</pubDate>
    <dc:creator>Dilip1441</dc:creator>
    <dc:date>2022-09-19T13:20:23Z</dc:date>
    <item>
      <title>CAN Code with Non Blocking Functionality</title>
      <link>https://community.nxp.com/t5/S32K/CAN-Code-with-Non-Blocking-Functionality/m-p/1524092#M17782</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm Using can_pal_s32k144 Example Code.&lt;/P&gt;&lt;P&gt;In that code if i didn't receive any message from other end, The Code is blocked at&lt;/P&gt;&lt;P&gt;/* Wait until the previous FlexCAN receive is completed */&lt;BR /&gt;while(CAN_GetTransferStatus(INST_CAN_PAL1, RX_MAILBOX) == STATUS_BUSY);&lt;/P&gt;&lt;P&gt;Can you please Suggest to Achieve the Both Cases&lt;/P&gt;&lt;P&gt;1.When ever the CAN Msg Received it need to have the Capable of Reading without any issue.&lt;/P&gt;&lt;P&gt;2.When ever the CAN Msg didn't Received, It'll move forward for the next Functionalities without blocking at&amp;nbsp;CAN_GetTransferStatus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 07:50:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-Code-with-Non-Blocking-Functionality/m-p/1524092#M17782</guid>
      <dc:creator>Dilip1441</dc:creator>
      <dc:date>2022-09-19T07:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Code with Non Blocking Functionality</title>
      <link>https://community.nxp.com/t5/S32K/CAN-Code-with-Non-Blocking-Functionality/m-p/1524243#M17794</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;instead of while statement use if condition&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if(CAN_GetTransferStatus(INST_CAN_PAL1, RX_MAILBOX) != STATUS_BUSY)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// read data from receive buffer&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// call Receive function again&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Petr&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 10:32:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-Code-with-Non-Blocking-Functionality/m-p/1524243#M17794</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2022-09-19T10:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Code with Non Blocking Functionality</title>
      <link>https://community.nxp.com/t5/S32K/CAN-Code-with-Non-Blocking-Functionality/m-p/1524315#M17801</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thanks for the Reply.&lt;/P&gt;&lt;P&gt;Currently the code is for Rx is like below.&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;recvMsg);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;/* Wait until the previous FlexCAN receive is completed */&lt;BR /&gt;&amp;nbsp; &amp;nbsp;while(CAN_GetTransferStatus(INST_CAN_PAL1, RX_MAILBOX) == STATUS_BUSY);&lt;STRONG&gt;//If no message received it's blocking on Here&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;/* Check the received message ID and payload */&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if((recvMsg.data[0] == LED0_CHANGE_REQUESTED) &amp;amp;&amp;amp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;recvMsg.id == RX_MSG_ID)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Toggle output value LED1 */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PINS_DRV_TogglePins(GPIO_PORT, (1 &amp;lt;&amp;lt; LED0));&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;If i removed the while condition, The LED Toggling is not working&lt;/P&gt;&lt;P&gt;also if i changed the code like below also the Toggling is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;recvMsg);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(CAN_GetTransferStatus(INST_CAN_PAL1, RX_MAILBOX) != STATUS_BUSY)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// read data from receive buffer&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;recvMsg);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 13:20:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-Code-with-Non-Blocking-Functionality/m-p/1524315#M17801</guid>
      <dc:creator>Dilip1441</dc:creator>
      <dc:date>2022-09-19T13:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Code with Non Blocking Functionality</title>
      <link>https://community.nxp.com/t5/S32K/CAN-Code-with-Non-Blocking-Functionality/m-p/1524783#M17818</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;code should be rather below...&lt;/P&gt;
&lt;P&gt;CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;recvMsg);&lt;/P&gt;
&lt;P&gt;while(1)&lt;BR /&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;/* check if FlexCAN receive is completed */&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if(CAN_GetTransferStatus(INST_CAN_PAL1, RX_MAILBOX) != STATUS_BUSY)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Check the received message ID and payload */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if((recvMsg.data[0] == LED0_CHANGE_REQUESTED) &amp;amp;&amp;amp;recvMsg.id == RX_MSG_ID)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Toggle output value LED1 */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PINS_DRV_TogglePins(GPIO_PORT, (1 &amp;lt;&amp;lt; LED0));&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &amp;amp;recvMsg);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 07:38:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-Code-with-Non-Blocking-Functionality/m-p/1524783#M17818</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2022-09-20T07:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Code with Non Blocking Functionality</title>
      <link>https://community.nxp.com/t5/S32K/CAN-Code-with-Non-Blocking-Functionality/m-p/1548989#M18680</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In below function&amp;nbsp;RX_MSG_ID indicates only one particular CAN Message ID to Receive.&lt;/P&gt;&lt;P&gt;Ex:&amp;nbsp;RX_MSG_ID = 7; it'll receive CAN Message ID 7 only, If send Message ID 6,5,8 It won't receive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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_MSG_ID);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please suggest me to receive all messages which i sent from other end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and what is&amp;nbsp;TX_MAILBOX and RX_MAILBOX?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 17:29:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-Code-with-Non-Blocking-Functionality/m-p/1548989#M18680</guid>
      <dc:creator>Dilip1441</dc:creator>
      <dc:date>2022-11-04T17:29:22Z</dc:date>
    </item>
  </channel>
</rss>

