<?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: MQX CAN bus API usage in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-CAN-bus-API-usage/m-p/310946#M9986</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately this is not an option for me as I'm using MQX 4.0.2 and currently cannot switch to 4.1 because of some troubles I'm having with the Atheros WiFi driver.. :smileysad:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Apr 2014 09:30:25 GMT</pubDate>
    <dc:creator>kaif</dc:creator>
    <dc:date>2014-04-09T09:30:25Z</dc:date>
    <item>
      <title>MQX CAN bus API usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-CAN-bus-API-usage/m-p/310944#M9984</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;I am writing my first small application using MQX 4.0 and it's CAN bus drivers on a K60 tower board. I've had a look at the kflexcan example code that comes with the MQX bundle. After playing around with it, I'm now wondering if I understand the concept behind it correctly. What I mean is this:&lt;/P&gt;&lt;P&gt;The kflexcan API offers a &lt;SPAN style="font-family: 'courier new', courier;"&gt;FLEXCAN_Rx_message()&lt;/SPAN&gt; that takes a mailbox as parameter. Now, a mailbox is initialized by &lt;SPAN style="font-family: 'courier new', courier;"&gt;FLEXCAN_Initialize_mailbox()&lt;/SPAN&gt; that takes a specific CAN ID as parameter. Later you just call &lt;SPAN style="font-family: 'courier new', courier;"&gt;_lwevent_wait_ticks()&lt;/SPAN&gt; which will block the current task until a message with the requested CAN ID pops up in the mailbox. So far, this is very comfortable and easy to use.&lt;/P&gt;&lt;P&gt;But let's say I'm working with a large number of different CAN IDs. How does this approach work then? Do I have to add a mailbox for every CAN ID that can appear on the bus? That doesnt sound like the way to go..&lt;/P&gt;&lt;P&gt;What I would expect is a function that takes a CAN ID as parameter and then blocks the current task until it receives such a message or hits a timeout. Something like this:&lt;SPAN style="font-family: 'courier new', courier;"&gt; can_message_t can_read(can_id_t id, uint_32 timeout)&lt;/SPAN&gt;. For my purposes this wouldn't need to be thread safe. Do I have to implement such a function myself? How are you guys working with the provided API, regarding multiple CAN IDs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any input!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 10:29:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-CAN-bus-API-usage/m-p/310944#M9984</guid>
      <dc:creator>kaif</dc:creator>
      <dc:date>2014-04-04T10:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: MQX CAN bus API usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-CAN-bus-API-usage/m-p/310945#M9985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your case, I think you may use the RX FIFO feature, which is supported in MQX 4.1. You may download it and find it in K70's BSP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 08:31:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-CAN-bus-API-usage/m-p/310945#M9985</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2014-04-09T08:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: MQX CAN bus API usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-CAN-bus-API-usage/m-p/310946#M9986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately this is not an option for me as I'm using MQX 4.0.2 and currently cannot switch to 4.1 because of some troubles I'm having with the Atheros WiFi driver.. :smileysad:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 09:30:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-CAN-bus-API-usage/m-p/310946#M9986</guid>
      <dc:creator>kaif</dc:creator>
      <dc:date>2014-04-09T09:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: MQX CAN bus API usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-CAN-bus-API-usage/m-p/310947#M9987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can port the flexcan driver from MQX 4.1 to 4.0.2. You may find there is option for TWR-K60N512 as below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43537iD6E75923B8817FEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Or PE drivers can also be a good option, you may disable flexcan in user_config.h and use the&amp;nbsp; driver code generated by PE instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 08:15:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-CAN-bus-API-usage/m-p/310947#M9987</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2014-04-10T08:15:56Z</dc:date>
    </item>
  </channel>
</rss>

