<?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 Getting CAN identifier bits when using broad mask in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Getting-CAN-identifier-bits-when-using-broad-mask/m-p/529564#M9836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Jodie Robinson on Mon Oct 12 08:21:20 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the LPC11C24 in an SAE J1939 application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've done a bit of research, and have the built-in CAN drivers working, but can't find a way to differentiate messages based on their identifiers when using a broad mask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to capture all packets on a CAN bus in a certain range (larger than the available 32 filter slots).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jodie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:29:12 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:29:12Z</dc:date>
    <item>
      <title>Getting CAN identifier bits when using broad mask</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Getting-CAN-identifier-bits-when-using-broad-mask/m-p/529564#M9836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Jodie Robinson on Mon Oct 12 08:21:20 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the LPC11C24 in an SAE J1939 application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've done a bit of research, and have the built-in CAN drivers working, but can't find a way to differentiate messages based on their identifiers when using a broad mask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to capture all packets on a CAN bus in a certain range (larger than the available 32 filter slots).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jodie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:29:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Getting-CAN-identifier-bits-when-using-broad-mask/m-p/529564#M9836</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting CAN identifier bits when using broad mask</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Getting-CAN-identifier-bits-when-using-broad-mask/m-p/529565#M9837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Mon Oct 12 09:25:54 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What's wrong with differentiating them in their message&amp;nbsp; :quest:&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
void CAN_rx(uint8_t msg_obj_num)
{
/* Determine which CAN message has been received */
 msg_obj.msgobj = msg_obj_num;
/* Now load up the msg_obj structure with the CAN message */
 (*rom)-&amp;gt;pCAND-&amp;gt;can_receive(&amp;amp;msg_obj);
//message number 10: command data
[color=#f00] if (msg_obj_num == 10)//message number 10
 {
&amp;nbsp; if(msg_obj.id == (0x280))//ID 0x280[/color]
...
&amp;nbsp; {&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:29:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Getting-CAN-identifier-bits-when-using-broad-mask/m-p/529565#M9837</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting CAN identifier bits when using broad mask</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Getting-CAN-identifier-bits-when-using-broad-mask/m-p/529566#M9838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Jodie Robinson on Mon Oct 12 22:56:48 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi R2D2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems msg_obj doesn't have an id on this part. Is there any way to add it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what CCAN_MSG_OBJ is declared as in my environment:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;typedef struct _CAN_MSG_OBJ {
&amp;nbsp; uint32_t mode_id;
&amp;nbsp; uint32_t mask;
&amp;nbsp; uint8_t data[8];
&amp;nbsp; uint8_t dlc;
&amp;nbsp; uint8_t msgobj;
} CAN_MSG_OBJ;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:29:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Getting-CAN-identifier-bits-when-using-broad-mask/m-p/529566#M9838</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Getting CAN identifier bits when using broad mask</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Getting-CAN-identifier-bits-when-using-broad-mask/m-p/529567#M9839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Tue Oct 13 00:58:15 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Jodie Robinson&lt;/STRONG&gt;&lt;BR /&gt;It seems msg_obj doesn't have an id on this part. Is there any way to add it?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In your case (original sample) that's mode_id &amp;amp; 0x7FF for 11-bit CAN...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mode_id is including CAN id and CAN mode as explained in User manual:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;// control bits for CAN_MSG_OBJ.mode_id&lt;BR /&gt;#define CAN_MSGOBJ_STD 0x00000000UL // CAN 2.0a 11-bit ID&lt;BR /&gt;#define CAN_MSGOBJ_EXT 0x20000000UL // CAN 2.0b 29-bit ID&lt;BR /&gt;#define CAN_MSGOBJ_DAT 0x00000000UL // data frame&lt;BR /&gt;#define CAN_MSGOBJ_RTR 0x40000000UL // rtr frame&lt;BR /&gt;typedef struct _CAN_MSG_OBJ {&lt;BR /&gt;uint32_t mode_id;&lt;BR /&gt;uint32_t mask;&lt;BR /&gt;uint8_t data[8];&lt;BR /&gt;uint8_t dlc;&lt;BR /&gt;uint8_t msgobj;&lt;BR /&gt;} CAN_MSG_OBJ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:29:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Getting-CAN-identifier-bits-when-using-broad-mask/m-p/529567#M9839</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:29:14Z</dc:date>
    </item>
  </channel>
</rss>

