<?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: Sending CAN message in loop but still can see the message only once in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Sending-CAN-message-in-loop-but-still-can-see-the-message-only/m-p/1517507#M17550</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;as per your code you sent a 0x74F message and waiting till 0x74E message is received, then message is send again and all is repeated. So did you sent above message from CAN tool?&lt;BR /&gt;You can use "if" statement instead of "while" to do not wait on that.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;flexcan_msgbuff_t recvBuff;
FLEXCAN_DRV_Send(INST_CANCOM1,TX_MAILBOX,&amp;amp;buff_RxTx_Cfg,(uint32_t)TX_PHY_ID,msg_data);
/* Start receiving data in RX_MAILBOX. */
FLEXCAN_DRV_Receive(INST_CANCOM1, RX_MAILBOX, &amp;amp;recvBuff);
while(1)
{
	/* if the previous FlexCAN receive is completed */
	if(FLEXCAN_DRV_GetTransferStatus(INST_CANCOM1, RX_MAILBOX) != STATUS_BUSY);
	{
           // process incomming data and enable receive again
           FLEXCAN_DRV_Receive(INST_CANCOM1, RX_MAILBOX, &amp;amp;recvBuff);
	   /* Toggle output value LED0 &amp;amp; LED1 */
	   PINS_DRV_TogglePins(GPIO_PORT, ((1 &amp;lt;&amp;lt; LED1) | (1 &amp;lt;&amp;lt; LED2)));
        }
        if(FLEXCAN_DRV_GetTransferStatus(INST_CANCOM1, TX_MAILBOX) != STATUS_BUSY);
	{ 
           FLEXCAN_DRV_Send(INST_CANCOM1,TX_MAILBOX,&amp;amp;buff_RxTx_Cfg,(uint32_t)TX_PHY_ID,msg_data);
        }
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;BR, Petr&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2022 08:05:50 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2022-09-06T08:05:50Z</dc:date>
    <item>
      <title>Sending CAN message in loop but still can see the message only once</title>
      <link>https://community.nxp.com/t5/S32K/Sending-CAN-message-in-loop-but-still-can-see-the-message-only/m-p/1517388#M17543</link>
      <description>&lt;P&gt;Hello NXP,&lt;/P&gt;&lt;P&gt;I am trying to send CAN message in loop but in response&amp;nbsp; &amp;nbsp;i am receiving it only one time PFA of my code and the screenshot, and please check ad let me know&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 05:42:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Sending-CAN-message-in-loop-but-still-can-see-the-message-only/m-p/1517388#M17543</guid>
      <dc:creator>RishikeshB</dc:creator>
      <dc:date>2022-09-06T05:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sending CAN message in loop but still can see the message only once</title>
      <link>https://community.nxp.com/t5/S32K/Sending-CAN-message-in-loop-but-still-can-see-the-message-only/m-p/1517507#M17550</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;as per your code you sent a 0x74F message and waiting till 0x74E message is received, then message is send again and all is repeated. So did you sent above message from CAN tool?&lt;BR /&gt;You can use "if" statement instead of "while" to do not wait on that.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;flexcan_msgbuff_t recvBuff;
FLEXCAN_DRV_Send(INST_CANCOM1,TX_MAILBOX,&amp;amp;buff_RxTx_Cfg,(uint32_t)TX_PHY_ID,msg_data);
/* Start receiving data in RX_MAILBOX. */
FLEXCAN_DRV_Receive(INST_CANCOM1, RX_MAILBOX, &amp;amp;recvBuff);
while(1)
{
	/* if the previous FlexCAN receive is completed */
	if(FLEXCAN_DRV_GetTransferStatus(INST_CANCOM1, RX_MAILBOX) != STATUS_BUSY);
	{
           // process incomming data and enable receive again
           FLEXCAN_DRV_Receive(INST_CANCOM1, RX_MAILBOX, &amp;amp;recvBuff);
	   /* Toggle output value LED0 &amp;amp; LED1 */
	   PINS_DRV_TogglePins(GPIO_PORT, ((1 &amp;lt;&amp;lt; LED1) | (1 &amp;lt;&amp;lt; LED2)));
        }
        if(FLEXCAN_DRV_GetTransferStatus(INST_CANCOM1, TX_MAILBOX) != STATUS_BUSY);
	{ 
           FLEXCAN_DRV_Send(INST_CANCOM1,TX_MAILBOX,&amp;amp;buff_RxTx_Cfg,(uint32_t)TX_PHY_ID,msg_data);
        }
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 08:05:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Sending-CAN-message-in-loop-but-still-can-see-the-message-only/m-p/1517507#M17550</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2022-09-06T08:05:50Z</dc:date>
    </item>
  </channel>
</rss>

