<?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: CAN Extended ID not able to receive in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637726#M25206</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;Hi&amp;nbsp;jeremyzhou:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;As said I am using custom board and succefully able to receive standard message and even the message object no and interrupt is updated into CANINT -&amp;gt; INTID, bust this does not happens in extended mode, when I select extended it never detect the message object data. Below is the snap for your ref.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/17964i9DE5CD81576EA6B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Pl provide me some technical solution .&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Apr 2017 13:14:02 GMT</pubDate>
    <dc:creator>sridharan</dc:creator>
    <dc:date>2017-04-26T13:14:02Z</dc:date>
    <item>
      <title>CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637722#M25202</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 using CAN sample code to receive CAN packet, I am able to receive std ID packet, however I am not able to receive any extended ID , I am able to see the data loaded into ARB1/2 registed but why CAN handlers is not enter if found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can Anyone please help me.&lt;/P&gt;&lt;P&gt;Below is piece of code where I am editing changes for extended ID receive in CAN configure().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Mxtd: 1, Mdir: 0, Mask is 0x1FFFFFFF */&lt;BR /&gt; LPC_CAN-&amp;gt;IF1_MSK1 = ID_EXT_MASK &amp;amp; 0xFFFF;&lt;BR /&gt; LPC_CAN-&amp;gt;IF1_MSK2 = MASK_MXTD | (ID_EXT_MASK &amp;gt;&amp;gt; 16);&lt;/P&gt;&lt;P&gt;/* MsgVal: 1, Mtd: 1, Dir: 0, ID = 0x100000 */&lt;BR /&gt; LPC_CAN-&amp;gt;IF1_ARB1 = (RX_EXT_MSG_ID+i) &amp;amp; 0xFFFF;&lt;BR /&gt; LPC_CAN-&amp;gt;IF1_ARB2 = ID_MVAL | ID_MTD | ((RX_EXT_MSG_ID+i) &amp;gt;&amp;gt; 16);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2017 04:45:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637722#M25202</guid>
      <dc:creator>sridharan</dc:creator>
      <dc:date>2017-04-24T04:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637723#M25203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="294970" data-username="sridharan" href="https://community.nxp.com/people/sridharan"&gt;sridharan TechM&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; font-size: 14px; font-family: 微软雅黑,sans-serif;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: 微软雅黑, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;"&gt;the opportunity to serve you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 微软雅黑, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;"&gt;I was wondering if you can tell me which chip you use and share the simple demo, then I can replicate the issue on my board.&lt;/SPAN&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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>Tue, 25 Apr 2017 02:18:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637723#M25203</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-04-25T02:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637724#M25204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;jeremyzhou&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using LPC11c24 with 10mhz clock customized board. its just same as Xpresso board only clock is 12mhz here.&lt;/P&gt;&lt;P&gt;I have tried with many working sample code, Standard format works fine ,but extended doesn't work with any sample.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently using CAN demo sample code from "lpc11xx.keil-examples-CMSIS-update" &amp;nbsp;-&amp;gt;CAN folder.&lt;/P&gt;&lt;P&gt;Will there be any clock issues or HW issue or sample code problem ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 08:29:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637724#M25204</guid>
      <dc:creator>sridharan</dc:creator>
      <dc:date>2017-04-25T08:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637725#M25205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="294970" data-username="sridharan" href="https://community.nxp.com/people/sridharan"&gt;sridharan TechM&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;I don't think the demo is suit for the LPCXpresso LPC11C24, the code can't jump to the main code successful when during debug as the demo froze.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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, 26 Apr 2017 08:16:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637725#M25205</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-04-26T08:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637726#M25206</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;Hi&amp;nbsp;jeremyzhou:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;As said I am using custom board and succefully able to receive standard message and even the message object no and interrupt is updated into CANINT -&amp;gt; INTID, bust this does not happens in extended mode, when I select extended it never detect the message object data. Below is the snap for your ref.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/17964i9DE5CD81576EA6B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Pl provide me some technical solution .&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2017 13:14:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637726#M25206</guid>
      <dc:creator>sridharan</dc:creator>
      <dc:date>2017-04-26T13:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637727#M25207</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;Hi&amp;nbsp;jeremyzhou,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am really disappointed , The demo code is working fine in LPCXpresson 11c24 board, however the same issue persist, I am not able to receive extended ID, I think the Demo code given by NXP itself is wrong. Can you pl check and rectify .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Expecting your response as we have struck up with this issue since 3 week without solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;PFB, Let me know if this is correct for receiving extended ID&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id = id &amp;amp; _EXT_FORMAT;&lt;/P&gt;&lt;P&gt;LPC_CAN-&amp;gt;IF1_MSK1 = (id &amp;amp; _MSK1_MSK);&lt;BR /&gt; LPC_CAN-&amp;gt;IF1_MSK2 = (id &amp;gt;&amp;gt; 16) | _MSK2_MXTD;&lt;/P&gt;&lt;P&gt;LPC_CAN-&amp;gt;IF1_ARB1 = (id &amp;amp; _ARB1_ID);&lt;BR /&gt; LPC_CAN-&amp;gt;IF1_ARB2 = (id &amp;gt;&amp;gt; 16) | _ARB2_XTD | _ARB2_MSGVAL;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 06:26:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637727#M25207</guid>
      <dc:creator>sridharan</dc:creator>
      <dc:date>2017-04-27T06:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637728#M25208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;The demo has already configure the extended frame in the CAN_ConfigureMessages(), and in the RX_TX_Bouncing function, the extended frames also are sent to PC.&lt;/P&gt;&lt;P&gt;In the read-me.txt, you can learn the more information about the running the demo.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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, 27 Apr 2017 08:32:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637728#M25208</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-04-27T08:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637729#M25209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="" data-containerid="-1" data-containertype="-1" data-content-finding="Community" data-objectid="294970" data-objecttype="3" href="https://community.nxp.com/people/sridharan"&gt;sridharan TechM&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;I've created the demo, you can send the send the data which includes the standard or extend frame, the MCU will rebound the data.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2017-04-28_15-56-55.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/14390iF41E593AC4BAD790/image-size/large?v=v2&amp;amp;px=999" role="button" title="2017-04-28_15-56-55.jpg" alt="2017-04-28_15-56-55.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fig 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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>Fri, 28 Apr 2017 07:59:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637729#M25209</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-04-28T07:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637730#M25210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a complete example that can receive 11-bit ID 0x003 or 29-bit ID 0x12345678. I've tested this with Keil Realview and a Keil MCB1000 board with an LPC11C24.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;#include "lpc11xx.h"
#include "system_lpc11xx.h"

// CAN message objects 0 to CANOBJ_RXTX-1 are used for receive
#define CANOBJ_RXTX 24
// CAN message objects CANOBJ_RXTX to 31 are used for transmit

// various CAN registers
#define CMDREQ_BSY (1UL &amp;lt;&amp;lt; 15)

// CAN CTRL register
#define CTRL_INI (1UL &amp;lt;&amp;lt; 0)
#define CTRL_IEN (1UL &amp;lt;&amp;lt; 1)
#define CTRL_SIE (1UL &amp;lt;&amp;lt; 2)
#define CTRL_EIE (1UL &amp;lt;&amp;lt; 3)
#define CTRL_DAR (1UL &amp;lt;&amp;lt; 5)
#define CTRL_CCE (1UL &amp;lt;&amp;lt; 6)
#define CTRL_TST (1UL &amp;lt;&amp;lt; 7)

// CAN CMDMASK register
#define CMDMSK_DATB (1UL &amp;lt;&amp;lt; 0)
#define CMDMSK_DATA (1UL &amp;lt;&amp;lt; 1)
#define CMDMSK_TREQ (1UL &amp;lt;&amp;lt; 2)
#define CMDMSK_IPND (1UL &amp;lt;&amp;lt; 3)
#define CMDMSK_CTRL (1UL &amp;lt;&amp;lt; 4)
#define CMDMSK_ARB (1UL &amp;lt;&amp;lt; 5)
#define CMDMSK_MSK (1UL &amp;lt;&amp;lt; 6)
#define CMDMSK_WR (1UL &amp;lt;&amp;lt; 7)
#define CMDMSK_RD (0UL &amp;lt;&amp;lt; 7)

// CAN MCTRL register
#define MCTRL_DLC (0x0F)
#define MCTRL_EOB (1UL &amp;lt;&amp;lt; 7)
#define MCTRL_TXRQT (1UL &amp;lt;&amp;lt; 8)
#define MCTRL_RMTEN (1UL &amp;lt;&amp;lt; 9)
#define MCTRL_RXIE (1UL &amp;lt;&amp;lt; 10)
#define MCTRL_TXIE (1UL &amp;lt;&amp;lt; 11)
#define MCTRL_UMASK (1UL &amp;lt;&amp;lt; 12)
#define MCTRL_IPND (1UL &amp;lt;&amp;lt; 13)
#define MCTRL_MSGLT (1UL &amp;lt;&amp;lt; 14)
#define MCTRL_NWDAT (1UL &amp;lt;&amp;lt; 15)

// CAN ARB2 register
#define ARB_ID (0x1FFF)
#define ARB_DIR (1UL &amp;lt;&amp;lt; 13)
#define ARB_XTD (1UL &amp;lt;&amp;lt; 14)
#define ARB_MSGVL (1UL &amp;lt;&amp;lt; 15)

// CAN MSK2 register
#define MSK2_MXTD (1UL &amp;lt;&amp;lt; 15)

// uses 125kbps on CAN bus with a 48MHz peripheral clock
#define CANBitrate125k_48MHz 0x00001C57UL

// transmit a CAN message
static void Transmit
 (
 uint8_t msgObjNum, // object number to use for transmission
 uint32_t Id, // message identifier (11-bit)
 uint8_t Len, // length of message in bytes
 uint8_t *pData // message data
 )
{
 if (msgObjNum &amp;lt; CANOBJ_RXTX) return;
 
 while (LPC_CAN-&amp;gt;IF1_CMDREQ &amp;amp; CMDREQ_BSY); // wait until previous copy complete

 // prepare registers with message
 LPC_CAN-&amp;gt;IF1_CMDMSK = CMDMSK_WR|CMDMSK_ARB|CMDMSK_CTRL|CMDMSK_TREQ|CMDMSK_DATA|CMDMSK_DATB;
 LPC_CAN-&amp;gt;IF1_MCTRL = MCTRL_TXRQT|MCTRL_TXIE|MCTRL_EOB|(Len &amp;amp; MCTRL_DLC);
 LPC_CAN-&amp;gt;IF1_ARB1 = 0;
 LPC_CAN-&amp;gt;IF1_ARB2 = ((Id &amp;amp; 0x7FF) &amp;lt;&amp;lt; 2)|ARB_DIR|ARB_MSGVL;

 // copy data
 LPC_CAN-&amp;gt;IF1_DA1 = *(uint16_t *)&amp;amp;pData[0];
 LPC_CAN-&amp;gt;IF1_DA2 = *(uint16_t *)&amp;amp;pData[2];
 LPC_CAN-&amp;gt;IF1_DB1 = *(uint16_t *)&amp;amp;pData[4];
 LPC_CAN-&amp;gt;IF1_DB2 = *(uint16_t *)&amp;amp;pData[6];

 LPC_CAN-&amp;gt;IF1_CMDREQ = msgObjNum + 1; // copy registers to this message object 
}

// configures a receive filter
static void SetCANFilter
 (
 uint32_t Id, // message identifier to receive
 uint8_t Ext // set to one for 29-bit identifier, 0 for 11-bit identifier
 )
{
 uint8_t lp;
 uint32_t cMsgObj;
 uint32_t msgV;

 msgV = (LPC_CAN-&amp;gt;MSGV2 &amp;lt;&amp;lt; 16) | LPC_CAN-&amp;gt;MSGV1;

 for (lp = 0; lp &amp;lt; CANOBJ_RXTX; lp++) 
 {
 if ((msgV &amp;amp; (1 &amp;lt;&amp;lt; lp)) == 0)
 break;
 }
 if (lp &amp;lt; CANOBJ_RXTX)
 {
 cMsgObj = lp + 1; // valid message object number found
 }
 else
 {
 return;
 }

 LPC_CAN-&amp;gt;IF1_CMDMSK = CMDMSK_WR|CMDMSK_MSK|CMDMSK_ARB|CMDMSK_CTRL;
 LPC_CAN-&amp;gt;IF1_MCTRL = MCTRL_UMASK|MCTRL_RXIE|MCTRL_EOB|MCTRL_DLC;

 if (Ext)
 {
 LPC_CAN-&amp;gt;IF1_MSK1 = Id &amp;amp; 0xFFFF;
 LPC_CAN-&amp;gt;IF1_MSK2 = ((Id &amp;amp; 0x1FFFFFFF) &amp;gt;&amp;gt; 16) | MSK2_MXTD;
 LPC_CAN-&amp;gt;IF1_ARB1 = Id &amp;amp; 0xFFFF;
 LPC_CAN-&amp;gt;IF1_ARB2 = ((Id &amp;amp; 0x1FFFFFFF) &amp;gt;&amp;gt; 16) | ARB_MSGVL | ARB_XTD;
 }
 else
 {
 LPC_CAN-&amp;gt;IF1_MSK1 = 0;
 LPC_CAN-&amp;gt;IF1_MSK2 = ((Id &amp;amp; 0x7FF) &amp;lt;&amp;lt; 2);
 LPC_CAN-&amp;gt;IF1_ARB1 = 0;
 LPC_CAN-&amp;gt;IF1_ARB2 = ((Id &amp;amp; 0x7FF) &amp;lt;&amp;lt; 2) | ARB_MSGVL;
 }

 LPC_CAN-&amp;gt;IF1_CMDREQ = cMsgObj; // copy registers to message object
 while (LPC_CAN-&amp;gt;IF1_CMDREQ &amp;amp; CMDREQ_BSY);
}

// check for a received message
// returns 1 if message received, 0 if no message received
uint8_t PullMessage
 (
 uint32_t *pId, // filled with identifier of received message
 uint8_t *pExt, // set to 1 on return if identifier is 29-bit
 uint8_t *pLen, // filled with length in bytes of received message
 uint8_t *pData // pass an eight-byte array, filled with received data
 )
{
 uint32_t cInt;
 uint8_t cMsgObj;

 cInt = LPC_CAN-&amp;gt;INT; // read current interrupt status
 switch (cInt)
 {
 case 0x0000: // no interrupt
 return 0;

 case 0x8000: // status interrupt, status register was updated
 return 0;

 default: // message object interrupt
 cMsgObj = cInt &amp;amp; 0xFF;
 // valid rx object, retrieve data
 if ((cMsgObj &amp;gt;= 1) &amp;amp;&amp;amp; (cMsgObj &amp;lt;= CANOBJ_RXTX))
 { 
 while (LPC_CAN-&amp;gt;IF2_CMDREQ &amp;amp; CMDREQ_BSY); // wait for object availability
 LPC_CAN-&amp;gt;IF2_CMDMSK = CMDMSK_RD|CMDMSK_MSK|CMDMSK_ARB|CMDMSK_CTRL|CMDMSK_IPND|CMDMSK_TREQ|CMDMSK_DATA|CMDMSK_DATB;
 LPC_CAN-&amp;gt;IF2_CMDREQ = cMsgObj; // copy this object to registers
 while (LPC_CAN-&amp;gt;IF2_CMDREQ &amp;amp; CMDREQ_BSY);

 // receive overrun occured
 if (LPC_CAN-&amp;gt;IF2_MCTRL &amp;amp; MCTRL_MSGLT)
 { 
 }

 // XTD bit (extended format), copy message to destination
 if (LPC_CAN-&amp;gt;IF2_ARB2 &amp;amp; (1UL &amp;lt;&amp;lt; 14))
 { 
 *pId = ((LPC_CAN-&amp;gt;IF2_ARB2 &amp;amp; 0x1FFF) &amp;lt;&amp;lt; 16) | (LPC_CAN-&amp;gt;IF2_ARB1 &amp;amp; 0xFFFF);
 *pExt = 1;
 }
 // regular message (11bit ID), copy message to destination
 else
 { 
 *pId = (LPC_CAN-&amp;gt;IF2_ARB2 &amp;gt;&amp;gt; 2) &amp;amp; 0x7FF;
 *pExt = 0;
 }
 *pLen = LPC_CAN-&amp;gt;IF2_MCTRL &amp;amp; MCTRL_DLC;
 *(uint16_t *)&amp;amp;pData[0] = LPC_CAN-&amp;gt;IF2_DA1;
 *(uint16_t *)&amp;amp;pData[2] = LPC_CAN-&amp;gt;IF2_DA2;
 *(uint16_t *)&amp;amp;pData[4] = LPC_CAN-&amp;gt;IF2_DB1;
 *(uint16_t *)&amp;amp;pData[6] = LPC_CAN-&amp;gt;IF2_DB2;
 
 return 1;
 }
 // tx object
 else
 {
 while (LPC_CAN-&amp;gt;IF1_CMDREQ &amp;amp; CMDREQ_BSY); // wait for object availability
 LPC_CAN-&amp;gt;IF1_CMDMSK = CMDMSK_IPND;
 LPC_CAN-&amp;gt;IF1_CMDREQ = cMsgObj; // copy this object to registers
 while (LPC_CAN-&amp;gt;IF1_CMDREQ &amp;amp; CMDREQ_BSY);
 }
 break;
 }

 return 0;
}

// interrupt handler
void CAN_IRQHandler(void)
{
 uint32_t Id;
 uint8_t Ext;
 uint8_t Len;
 uint8_t Data[8];
 
 // check if a message was received
 if (PullMessage(&amp;amp;Id, &amp;amp;Ext, &amp;amp;Len, Data))
 {
 // message received
 Id = Id;
 }
}

// main function
int main(void)
{
 uint32_t btr = CANBitrate125k_48MHz;
 uint16_t lp;
 uint8_t TxData[8];
 uint8_t RxData[8];
 uint32_t RxId;
 uint8_t RxLen;
 uint8_t RxExt;

 SystemInit();

 LPC_SYSCON-&amp;gt;PRESETCTRL |= (1UL &amp;lt;&amp;lt; 3); // clear the reset signal
 LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= (1UL &amp;lt;&amp;lt; 17); // enable CAN power
 LPC_CAN-&amp;gt;CLKDIV = 0; // set CAN clk to match systemclock, here 48MHz
 LPC_CAN-&amp;gt;CNTL = CTRL_INI; // set CAN to init mode

 LPC_CAN-&amp;gt;CNTL |= CTRL_CCE; // start config bit timing
 LPC_CAN-&amp;gt;BT = (uint16_t) btr;
 LPC_CAN-&amp;gt;BRPE = (uint16_t) (btr &amp;gt;&amp;gt; 16);
 LPC_CAN-&amp;gt;CNTL &amp;amp;= ~CTRL_CCE; // end config bit timing

 // initialize CAN message objects
 for (lp = 0; lp &amp;lt; 32; lp++)
 {
 LPC_CAN-&amp;gt;IF1_CMDMSK = CMDMSK_WR|CMDMSK_MSK|CMDMSK_ARB|CMDMSK_CTRL|CMDMSK_DATA|CMDMSK_DATB;
 LPC_CAN-&amp;gt;IF1_MCTRL = 0;
 LPC_CAN-&amp;gt;IF1_MSK1 = 0;
 LPC_CAN-&amp;gt;IF1_MSK2 = 0;
 LPC_CAN-&amp;gt;IF1_ARB1 = 0;
 LPC_CAN-&amp;gt;IF1_ARB2 = 0;
 LPC_CAN-&amp;gt;IF1_DA1 = 0;
 LPC_CAN-&amp;gt;IF1_DA2 = 0;
 LPC_CAN-&amp;gt;IF1_DB1 = 0;
 LPC_CAN-&amp;gt;IF1_DB2 = 0;

 LPC_CAN-&amp;gt;IF1_CMDREQ = lp+1; // copy from registers to message object
 while (LPC_CAN-&amp;gt;IF1_CMDREQ &amp;amp; CMDREQ_BSY);
 }

 LPC_CAN-&amp;gt;STAT = 0; // reset CAN status register

 LPC_CAN-&amp;gt;CNTL |= CTRL_IEN; // enable interrupts
 
 LPC_CAN-&amp;gt;CNTL &amp;amp;= ~CTRL_INI; // normal operating mode 
 
 // want to receive message 0x003 (11-bit ID)
 SetCANFilter(0x003, 0);
 // want to receive message 0x00000004 (29-bit ID)
 SetCANFilter(0x12345678, 1);
 
 NVIC_EnableIRQ(CAN_IRQn);
 
 // send a message
 for (lp = 0; lp &amp;lt; 8; lp++) TxData[lp] = lp;
 Transmit(CANOBJ_RXTX, 0x001, 8, TxData);
 Transmit(CANOBJ_RXTX + 1, 0x002, 8, TxData);
 
 while(1);
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2017 11:56:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637730#M25210</guid>
      <dc:creator>esacademysuppor</dc:creator>
      <dc:date>2017-04-28T11:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637731#M25211</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 have tried the same both its same, i am able to tx rx standard ID not extended id, Can I know which CAN Analysiser tool your using, jfyi I am using &amp;nbsp;KVASER CANking, let me is this compatible or pl suggest, for now i am using Lpcxpresso board&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2017 13:04:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637731#M25211</guid>
      <dc:creator>sridharan</dc:creator>
      <dc:date>2017-04-28T13:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637732#M25212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="" data-containerid="-1" data-containertype="-1" data-content-finding="Community" data-objectid="294970" data-objecttype="3" href="https://community.nxp.com/people/sridharan"&gt;sridharan TechM&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;I use the CANPro and the board is the LPCXpresso LPC11C24 (OM13093).&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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>Sat, 29 Apr 2017 09:19:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637732#M25212</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-04-29T09:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Extended ID not able to receive</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637733#M25213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG class="" style="color: #646464; background-color: #ffffff; border: 0px; font-weight: 200; font-size: 1.286rem; padding: 0px 0px 0px 30px;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit; font-size: 18.004px;"&gt;Hi jeremyzhou,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG class="" style="color: #646464; background-color: #ffffff; border: 0px; font-weight: 200; font-size: 1.286rem; padding: 0px 0px 0px 30px;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit; font-size: 18.004px;"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG class="" style="color: #646464; background-color: #ffffff; border: 0px; font-weight: 200; font-size: 1.286rem; padding: 0px 0px 0px 30px;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit; font-size: 18.004px;"&gt;I got the output, The problem was with the CANAnalyser tool(CANKING) . I need to provide extended data in different format.&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG class="" style="color: #646464; background-color: #ffffff; border: 0px; font-weight: 200; font-size: 1.286rem; padding: 0px 0px 0px 30px;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit; font-size: 18.004px;"&gt;Thanks for your support.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 04:46:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-Extended-ID-not-able-to-receive/m-p/637733#M25213</guid>
      <dc:creator>sridharan</dc:creator>
      <dc:date>2017-05-02T04:46:18Z</dc:date>
    </item>
  </channel>
</rss>

