<?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>i.MX RT Crossover MCUsのトピックFLEXCan RxIdle triggers on FLEXCAN_TransferSendBlocking</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXCan-RxIdle-triggers-on-FLEXCAN-TransferSendBlocking/m-p/1443429#M19149</link>
    <description>&lt;P&gt;Hello NXP Community,&lt;BR /&gt;&lt;BR /&gt;I have a RT1050 Board and i am running the FlexCan_Interrupt_Transfer example.&lt;BR /&gt;&lt;BR /&gt;This example is either transmitting or receiving, but i have modified this software to send blocking every 1 second, and receive any CAN ID packet.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;//callback&lt;BR /&gt;static FLEXCAN_CALLBACK(flexcan_callback)&lt;BR /&gt;{&lt;BR /&gt;switch (status)&lt;BR /&gt;{&lt;BR /&gt;case kStatus_FLEXCAN_RxIdle:&lt;BR /&gt;if (RX_MESSAGE_BUFFER_NUM == result)&lt;BR /&gt;{&lt;BR /&gt;uint32_t id = rx_frame.id &amp;gt;&amp;gt; CAN_ID_STD_SHIFT;&lt;BR /&gt;PRINTF("CAN BUS DATA RECEIVED !?!? [0x%X] , txIdentifier = [0x%X].\r\n", id, txIdentifier);&lt;BR /&gt;rxXfer.frame = &amp;amp;rx_frame;&lt;BR /&gt;(void)FLEXCAN_TransferReceiveNonBlocking(EXAMPLE_CAN, &amp;amp;flexcanHandle, &amp;amp;rxXfer);&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/PRE&gt;&lt;PRE&gt;//initialization (for accepting any RX ID)&lt;BR /&gt;...&lt;BR /&gt; /* Set Rx Masking mechanism. */&lt;BR /&gt;                                                            //rxIdentifier = 0;&lt;BR /&gt;FLEXCAN_SetRxMbGlobalMask(EXAMPLE_CAN, FLEXCAN_RX_MB_STD_MASK(rxIdentifier, 0, 0));&lt;/PRE&gt;&lt;PRE&gt;//once every second&lt;BR /&gt;...&lt;BR /&gt;tx_frame.id = FLEXCAN_ID_STD(txIdentifier);&lt;BR /&gt;tx_frame.format = (uint8_t)kFLEXCAN_FrameFormatStandard;&lt;BR /&gt;tx_frame.type = (uint8_t)kFLEXCAN_FrameTypeData;&lt;BR /&gt;tx_frame.length = (uint8_t)DLC;&lt;BR /&gt;txXfer.mbIdx = (uint8_t)TX_MESSAGE_BUFFER_NUM;&lt;BR /&gt;&lt;BR /&gt;txXfer.frame = &amp;amp;tx_frame;&lt;BR /&gt;FLEXCAN_TransferSendBlocking(EXAMPLE_CAN, TX_MESSAGE_BUFFER_NUM, &amp;amp;tx_frame);&lt;/PRE&gt;&lt;PRE&gt;//the problem&lt;BR /&gt;15:00:01.554&amp;gt; CAN BUS DATA RECEIVED !?!? [0x123] , txIdentifier = [0x321]. //&amp;lt;! correct &lt;BR /&gt;15:00:01.999&amp;gt; CAN BUS DATA RECEIVED !?!? [0x321] , txIdentifier = [0x321]. //&amp;lt;! Incorrect&lt;BR /&gt;15:00:02.548&amp;gt; CAN BUS DATA RECEIVED !?!? [0x124] , txIdentifier = [0x321]. //&amp;lt;! correct&lt;BR /&gt;15:00:03.050&amp;gt; CAN BUS DATA RECEIVED !?!? [0x321] , txIdentifier = [0x321]. //&amp;lt;! Incorrect&lt;BR /&gt;15:00:03.554&amp;gt; CAN BUS DATA RECEIVED !?!? [0x125] , txIdentifier = [0x321]. //&amp;lt;! correct&lt;BR /&gt;15:00:04.059&amp;gt; CAN BUS DATA RECEIVED !?!? [0x321] , txIdentifier = [0x321]. //&amp;lt;! Incorrect&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;I will filter the received ID from the callback, but i prefer the callback to trigger only on actually received packets.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2022 13:09:22 GMT</pubDate>
    <dc:creator>_bjs</dc:creator>
    <dc:date>2022-04-13T13:09:22Z</dc:date>
    <item>
      <title>FLEXCan RxIdle triggers on FLEXCAN_TransferSendBlocking</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXCan-RxIdle-triggers-on-FLEXCAN-TransferSendBlocking/m-p/1443429#M19149</link>
      <description>&lt;P&gt;Hello NXP Community,&lt;BR /&gt;&lt;BR /&gt;I have a RT1050 Board and i am running the FlexCan_Interrupt_Transfer example.&lt;BR /&gt;&lt;BR /&gt;This example is either transmitting or receiving, but i have modified this software to send blocking every 1 second, and receive any CAN ID packet.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;//callback&lt;BR /&gt;static FLEXCAN_CALLBACK(flexcan_callback)&lt;BR /&gt;{&lt;BR /&gt;switch (status)&lt;BR /&gt;{&lt;BR /&gt;case kStatus_FLEXCAN_RxIdle:&lt;BR /&gt;if (RX_MESSAGE_BUFFER_NUM == result)&lt;BR /&gt;{&lt;BR /&gt;uint32_t id = rx_frame.id &amp;gt;&amp;gt; CAN_ID_STD_SHIFT;&lt;BR /&gt;PRINTF("CAN BUS DATA RECEIVED !?!? [0x%X] , txIdentifier = [0x%X].\r\n", id, txIdentifier);&lt;BR /&gt;rxXfer.frame = &amp;amp;rx_frame;&lt;BR /&gt;(void)FLEXCAN_TransferReceiveNonBlocking(EXAMPLE_CAN, &amp;amp;flexcanHandle, &amp;amp;rxXfer);&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/PRE&gt;&lt;PRE&gt;//initialization (for accepting any RX ID)&lt;BR /&gt;...&lt;BR /&gt; /* Set Rx Masking mechanism. */&lt;BR /&gt;                                                            //rxIdentifier = 0;&lt;BR /&gt;FLEXCAN_SetRxMbGlobalMask(EXAMPLE_CAN, FLEXCAN_RX_MB_STD_MASK(rxIdentifier, 0, 0));&lt;/PRE&gt;&lt;PRE&gt;//once every second&lt;BR /&gt;...&lt;BR /&gt;tx_frame.id = FLEXCAN_ID_STD(txIdentifier);&lt;BR /&gt;tx_frame.format = (uint8_t)kFLEXCAN_FrameFormatStandard;&lt;BR /&gt;tx_frame.type = (uint8_t)kFLEXCAN_FrameTypeData;&lt;BR /&gt;tx_frame.length = (uint8_t)DLC;&lt;BR /&gt;txXfer.mbIdx = (uint8_t)TX_MESSAGE_BUFFER_NUM;&lt;BR /&gt;&lt;BR /&gt;txXfer.frame = &amp;amp;tx_frame;&lt;BR /&gt;FLEXCAN_TransferSendBlocking(EXAMPLE_CAN, TX_MESSAGE_BUFFER_NUM, &amp;amp;tx_frame);&lt;/PRE&gt;&lt;PRE&gt;//the problem&lt;BR /&gt;15:00:01.554&amp;gt; CAN BUS DATA RECEIVED !?!? [0x123] , txIdentifier = [0x321]. //&amp;lt;! correct &lt;BR /&gt;15:00:01.999&amp;gt; CAN BUS DATA RECEIVED !?!? [0x321] , txIdentifier = [0x321]. //&amp;lt;! Incorrect&lt;BR /&gt;15:00:02.548&amp;gt; CAN BUS DATA RECEIVED !?!? [0x124] , txIdentifier = [0x321]. //&amp;lt;! correct&lt;BR /&gt;15:00:03.050&amp;gt; CAN BUS DATA RECEIVED !?!? [0x321] , txIdentifier = [0x321]. //&amp;lt;! Incorrect&lt;BR /&gt;15:00:03.554&amp;gt; CAN BUS DATA RECEIVED !?!? [0x125] , txIdentifier = [0x321]. //&amp;lt;! correct&lt;BR /&gt;15:00:04.059&amp;gt; CAN BUS DATA RECEIVED !?!? [0x321] , txIdentifier = [0x321]. //&amp;lt;! Incorrect&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;I will filter the received ID from the callback, but i prefer the callback to trigger only on actually received packets.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 13:09:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXCan-RxIdle-triggers-on-FLEXCAN-TransferSendBlocking/m-p/1443429#M19149</guid>
      <dc:creator>_bjs</dc:creator>
      <dc:date>2022-04-13T13:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXCan RxIdle triggers on FLEXCAN_TransferSendBlocking</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXCan-RxIdle-triggers-on-FLEXCAN-TransferSendBlocking/m-p/1443975#M19161</link>
      <description>&lt;P&gt;found a solution here:&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/S32K/For-FLEXCAN-I-use-the-receive-interrupt-enable-but-send/td-p/714502" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/S32K/For-FLEXCAN-I-use-the-receive-interrupt-enable-but-send/td-p/714502&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;WARNING:&lt;BR /&gt;I have printed the values in the IMASK1 register. these were 0x0.&lt;BR /&gt;After i set the IMASK1 to 0x400 (&lt;STRONG&gt;ENABLING&lt;/STRONG&gt; TX mailbox 10), the Transfer complete successful interrupt mailbox is not causing RXIDle callback.&lt;BR /&gt;The API macro this does this is called:&lt;BR /&gt;&lt;BR /&gt;FLEXCAN_&lt;STRONG&gt;Enable&lt;/STRONG&gt;MbInterrupts(EXAMPLE_CAN, 1UL &amp;lt;&amp;lt; TX_MESSAGE_BUFFER_NUM); //&amp;lt;! used for disabling,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 09:32:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXCan-RxIdle-triggers-on-FLEXCAN-TransferSendBlocking/m-p/1443975#M19161</guid>
      <dc:creator>_bjs</dc:creator>
      <dc:date>2022-04-14T09:32:45Z</dc:date>
    </item>
  </channel>
</rss>

