<?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: call back function is flooded with kStatus_FLEXCAN_RxIdle in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081650#M9230</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Hello,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- That I still don't have any understanding how to acknowledge of Message object(mail box) work.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- how the RX(TX) interrupt are handled and which one do i need for handling my RX message.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In&amp;nbsp;the function&amp;nbsp;&amp;nbsp;FLEXCAN_TransferReceiveNonBlocking the only thing that you are doing is activating the Message Buffer interrupt. The acknowledge of the message and the handling of the RX interrupt is done on the FlexCAN interrupt handler (FLEXCAN_TransferHandleIRQ). If you take as an example the project&amp;nbsp;flexcan_interrupt_transfer you will find this handler in the file fsl_flexcan.c. The acknowledge of the message is done with the function&amp;nbsp;FLEXCAN_SubHandlerForDataTransfered.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- How interrupt priority works in general?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Please refer to section&amp;nbsp;44.7.11 of the RT1060 reference manual. Here you will find the explanation of how the FlexCAN interrupts work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- how to use FLEXCAN_TransferReceiveNonBlocking to acknowledge a message so I can receive a new one.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As mentioned before, this function doesn't acknowledge the received message. The interrupt handler of the FlexCAN module does this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- how the option flexcanConfig.enableIndividMask&amp;nbsp; &amp;nbsp;works. And why I don't receive any messages when the mask is 0x7FF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How did you activate the individual masks? Did you verify that the global mask and the individual masks are not mutually excluded? Did you modify the flexcanConfig.enableIndividMask to true?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Victor&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jun 2020 23:41:38 GMT</pubDate>
    <dc:creator>victorjimenez</dc:creator>
    <dc:date>2020-06-23T23:41:38Z</dc:date>
    <item>
      <title>call back function is flooded with kStatus_FLEXCAN_RxIdle</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081647#M9227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm implementing the flexcan only the calback function is overloaded with kStatus_FLEXCAN_RxIdle events.&lt;/P&gt;&lt;P&gt;And I can't find in the API documentation/ datasheet or example how to acknowledge this event or disable it.&lt;/P&gt;&lt;P&gt;Any suggestion how to solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;MCU: RT1060&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2020 13:40:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081647#M9227</guid>
      <dc:creator>e_v_spronsen</dc:creator>
      <dc:date>2020-06-10T13:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: call back function is flooded with kStatus_FLEXCAN_RxIdle</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081648#M9228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ernst,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the SDK&amp;nbsp; you will find an example named "flexcan_interrupt_transfer". I recommend you check this example to see how to configure the FlexCAN module and the callback function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Victor&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2020 22:53:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081648#M9228</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2020-06-15T22:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: call back function is flooded with kStatus_FLEXCAN_RxIdle</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081649#M9229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I already did that. The documentation is so limited and the example so basic.&lt;/P&gt;&lt;P&gt;- That I still don't have any understanding how to acknowledge of Message object(mail box) work.&lt;/P&gt;&lt;P&gt;- how the RX(TX)&amp;nbsp; interrupt are handled and which one do i need for handling my RX message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; kStatus_FLEXCAN_RxIdle, kStatus_FLEXCAN_RxBusy, kStatus_FLEXCAN_RxFifoBusy:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; kStatus_FLEXCAN_RxRemote, kStatus_FLEXCAN_UnHandled.&lt;/P&gt;&lt;P&gt;- How interrupt priority works in general?&lt;/P&gt;&lt;P&gt;- how to use FLEXCAN_TransferReceiveNonBlocking to acknowledge a message so I can receive a new one.&lt;/P&gt;&lt;P&gt;- how the option flexcanConfig.enableIndividMask&amp;nbsp;&amp;nbsp; works. And why I don't receive any messages when the mask is 0x7FF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After some poking around I got something working. But that is not how I like to develop. I like to understand how the mechanism work but NXP really likes to keep it secrets.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:14:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081649#M9229</guid>
      <dc:creator>e_v_spronsen</dc:creator>
      <dc:date>2020-06-16T10:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: call back function is flooded with kStatus_FLEXCAN_RxIdle</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081650#M9230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Hello,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- That I still don't have any understanding how to acknowledge of Message object(mail box) work.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- how the RX(TX) interrupt are handled and which one do i need for handling my RX message.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In&amp;nbsp;the function&amp;nbsp;&amp;nbsp;FLEXCAN_TransferReceiveNonBlocking the only thing that you are doing is activating the Message Buffer interrupt. The acknowledge of the message and the handling of the RX interrupt is done on the FlexCAN interrupt handler (FLEXCAN_TransferHandleIRQ). If you take as an example the project&amp;nbsp;flexcan_interrupt_transfer you will find this handler in the file fsl_flexcan.c. The acknowledge of the message is done with the function&amp;nbsp;FLEXCAN_SubHandlerForDataTransfered.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- How interrupt priority works in general?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Please refer to section&amp;nbsp;44.7.11 of the RT1060 reference manual. Here you will find the explanation of how the FlexCAN interrupts work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- how to use FLEXCAN_TransferReceiveNonBlocking to acknowledge a message so I can receive a new one.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As mentioned before, this function doesn't acknowledge the received message. The interrupt handler of the FlexCAN module does this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- how the option flexcanConfig.enableIndividMask&amp;nbsp; &amp;nbsp;works. And why I don't receive any messages when the mask is 0x7FF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How did you activate the individual masks? Did you verify that the global mask and the individual masks are not mutually excluded? Did you modify the flexcanConfig.enableIndividMask to true?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Victor&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2020 23:41:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081650#M9230</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2020-06-23T23:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: call back function is flooded with kStatus_FLEXCAN_RxIdle</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081651#M9231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Acknowledge a message object&lt;/P&gt;&lt;P&gt;My experiences is that&amp;nbsp;FLEXCAN_TransferHandleIRQ doesn't acknowledge the message object. When I send a can message. If I breakpoint in the callback function the corresponding mailbox code is 0010b full. when I send an other canbus message the corresponding mailbox code is 0110b overrun.&lt;/P&gt;&lt;P&gt;To work around this. in the callback function I reinitialize FLEXCAN_TransferReceiveNonBlocking after I read the communication data. That seems to work. But I assume this is not the intended use.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Interrupts&lt;/P&gt;&lt;P&gt;My intended question is: How do I prioritize the canbus interrupt with other peripherals like: timer, UARTs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- flexcanConfig.enableIndividMask&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't work.:&lt;/P&gt;&lt;P&gt;flexcanConfig.enableIndividMask&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = true;&lt;/P&gt;&lt;P&gt;FLEXCAN_SetRxIndividualMask(CAN2, mb_index, 0x7FF);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does:&lt;/P&gt;&lt;P&gt;flexcanConfig.enableIndividMask&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = false;&lt;/P&gt;&lt;P&gt;FLEXCAN_SetRxIndividualMask(CAN2, mb_index, 0x7FF);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that doesn't seem very logical to me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Ernst&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2020 10:09:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081651#M9231</guid>
      <dc:creator>e_v_spronsen</dc:creator>
      <dc:date>2020-06-24T10:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: call back function is flooded with kStatus_FLEXCAN_RxIdle</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081652#M9232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- Acknowledge a message object&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The overrun condition occurs when you are receiving more messages than the ones you can process. To prevent this from happening you should use either the FlexCAN FIFO or the DMA instead of the mailbox.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- Interrupts&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You need to change the interrupt priority in the NVIC.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- flexcanConfig.enableIndividMask&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Did you verify that the global mask and the individual masks are not mutually excluded?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Victor&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2020 23:11:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/call-back-function-is-flooded-with-kStatus-FLEXCAN-RxIdle/m-p/1081652#M9232</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2020-07-02T23:11:22Z</dc:date>
    </item>
  </channel>
</rss>

