<?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: Problem for FlexCAN in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286784#M11136</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Yes you r right.i am not using any net 60 ohm across these bus lines.What is the purpose for using it?? i have attached the schematic of transceiver circuit. For testing communication between two CAN nodes i interconnected CANH pins and CANL pins of both transceivers.Also i can view the transmitted signals from CAN0 on Receiver pin of second transceiver in CAN1 for reception.But still CAN1 interrupt&amp;nbsp; is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;sruthy uk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Mar 2016 04:30:46 GMT</pubDate>
    <dc:creator>sruthyuk</dc:creator>
    <dc:date>2016-03-16T04:30:46Z</dc:date>
    <item>
      <title>Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286766#M11118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi, all&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;When I use the flexCAN of K60Dx512, I encounter a problem that make me crazy.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Firstly, I set the flexCAN as global masking &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;canx-&amp;gt;MCR &amp;amp;= ~CAN_MCR_IRMQ_MASK; //global&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;And then I use two MCU as TX &amp;amp; RX.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The ID is 29bits extension. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In the TX MCU I use one MSG object as TX mode and set the 29bits, 8 bytes;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In another RX MCU&amp;nbsp; I use one MSG object as RX mode and set the same 29bits ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;When I begin to send message, I can use oscilloscope to get signal from the can bus. But the RX terminal can't receive message which I use interrupt&amp;nbsp; to get message. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I set break point in the Interrupt code in order to use debug to trace it. But it doesn't stop on the break point.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;So I change the &lt;SPAN style="font-size: 10pt;"&gt;flexCAN as individual masking.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;canx-&amp;gt;MCR |= CAN_MCR_IRMQ_MASK;&amp;nbsp;&amp;nbsp; //individual&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I also use two MCU testing just like above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This time the RX terminal can receive message but it can't receive &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;continuously when the TX send &lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;continuously.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;It seem to lost message and I set the baud as 500kps.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;this is Initiate function for flexCAN&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;void initcan()&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;{&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&amp;nbsp; OSC-&amp;gt;CR |= OSC_CR_ERCLKEN_MASK | OSC_CR_EREFSTEN_MASK;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SIM-&amp;gt;SCGC6 |= SIM_SCGC6_FLEXCAN0_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR&amp;nbsp;&amp;nbsp; |= CAN_MCR_MDIS_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;CTRL1 |= CAN_CTRL1_CLKSRC_MASK; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR |= CAN_MCR_HALT_MASK; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR |= CAN_MCR_FRZ_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR &amp;amp;= ~CAN_MCR_MDIS_MASK; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; while(!(canx-&amp;gt;MCR &amp;amp; CAN_MCR_LPMACK_MASK));&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR ^= CAN_MCR_SOFTRST_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; while(canx-&amp;gt;MCR &amp;amp; CAN_MCR_SOFTRST_MASK);&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; &lt;/P&gt;&lt;P&gt;&amp;nbsp; while(!(canx-&amp;gt;MCR &amp;amp; CAN_MCR_FRZACK_MASK));&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; if(mask_mode == CAN_MSGOBJ_GLOBAL_MASKING)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; canx-&amp;gt;MCR &amp;amp;= ~CAN_MCR_IRMQ_MASK;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; canx-&amp;gt;MCR |= CAN_MCR_IRMQ_MASK;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR |= CAN_MCR_SUPV_MASK ;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR |= CAN_MCR_SRXDIS_MASK ; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR &amp;amp;= ~CAN_MCR_WRNEN_MASK;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR &amp;amp;= ~CAN_MCR_RFEN_MASK ; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR &amp;amp;= ~CAN_MCR_AEN_MASK;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR &amp;amp;= ~CAN_MCR_LPRIOEN_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;CTRL2 |= CAN_CTRL2_EACEN_MASK; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;CTRL2 &amp;amp;= ~CAN_CTRL2_RRS_MASK;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;CTRL2 |= CAN_CTRL2_MRP_MASK;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //canx-&amp;gt;CTRL1 |= CAN_CTRL1_LBUF_MASK;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;CTRL1 &amp;amp;= ~CAN_CTRL1_LBUF_MASK;&amp;nbsp;&amp;nbsp; &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; &lt;/P&gt;&lt;P&gt;&amp;nbsp; //canx-&amp;gt;CTRL1 |= CAN_CTRL1_LPB_MASK;&amp;nbsp; //loop &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;CTRL1 &amp;amp;= ~CAN_CTRL1_LPB_MASK;&amp;nbsp; &lt;/P&gt;&lt;P&gt; //set baud &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;prescale = CAN_GET_PRESCALE(g_bus_clock,baud,20); &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;//&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;canx-&amp;gt;CTRL1 |= CAN_CTRL1_RJW(2) &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&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; &lt;/TD&gt;&lt;TD&gt;| CAN_CTRL1_PROPSEG(6)&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&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; &lt;/TD&gt;&lt;TD&gt;| CAN_CTRL1_PSEG1(6) &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&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; &lt;/TD&gt;&lt;TD&gt;| CAN_CTRL1_PSEG2(4)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&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; &lt;/TD&gt;&lt;TD&gt;| CAN_CTRL1_PRESDIV(prescale); &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;TIMER = 0x0000; &lt;/P&gt;&lt;P&gt;&amp;nbsp; for(i = 0;i &amp;lt; MSG_MAX_NO; i++)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; canx-&amp;gt;MB[i].CS&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x00000000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; canx-&amp;gt;MB[i].ID&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x00000000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; canx-&amp;gt;MB[i].WORD0 = 0x00000000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; canx-&amp;gt;MB[i].WORD1 = 0x00000000;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;IFLAG1 = 0xFFFFFFFF;&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;IFLAG2 = 0xFFFFFFFF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;IMASK1 = 0x00000000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;IMASK2 = 0x00000000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for(i = 0;i &amp;lt; MSG_MAX_NO; i++)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; canx-&amp;gt;RXIMR[i] = 0x1FFFFFFF;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;RXMGMASK = 0x1FFFFFFF;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;RX14MASK = 0x1FFFFFFF;&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;RX15MASK = 0x1FFFFFFF; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR &amp;amp;= ~CAN_MCR_FRZ_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; while( canx-&amp;gt;MCR &amp;amp; CAN_MCR_FRZACK_MASK); &lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR &amp;amp;= ~(CAN_MCR_HALT_MASK); &lt;/P&gt;&lt;P&gt;&amp;nbsp; while( canx-&amp;gt;MCR &amp;amp; CAN_MCR_NOTRDY_MASK);&lt;/P&gt;&lt;P&gt;&amp;nbsp; canx-&amp;gt;MCR &amp;amp;= ~CAN_MCR_MDIS_MASK;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this my send function&lt;/P&gt;&lt;P&gt;void send(.......)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( CAN_GetMsgCode(canx_ptr,msg_num_temp) != CAN_MSGOBJ_TX_UNCONDITIONAL)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //CODE INACTIVE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; canx_ptr-&amp;gt;MB[msg_num_temp].CS |= CAN_MB_CS_CODE(CAN_MSGOBJ_TX_INACTIVE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_SetMsgID(canx_ptr,msg_num_temp,message_id);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Msg data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_WriteData(canx_ptr,msg_num_temp,in_data_length,in_data_buffer);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Msg length&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_SetMsgLength(canx_ptr,msg_num_temp,in_data_length);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Msg CODE TX_UNCONDITIONAL wait to send&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; canx_ptr-&amp;gt;MB[msg_num_temp].CS |= CAN_MB_CS_CODE(CAN_MSGOBJ_TX_UNCONDITIONAL);&lt;/P&gt;&lt;P&gt;}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this my receive funtion&lt;/P&gt;&lt;P&gt;void receive(....)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; message_code = CAN_GetMsgCode(canx,msg_num);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; if ((message_code != CAN_MSGOBJ_RX_BUSY) &amp;amp;&amp;amp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (message_code != CAN_MSGOBJ_RX_OVERRUN))&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg_id = LPLD_CAN_GetMsgID(canx, msg_num);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //read Msg len&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data_length&amp;nbsp;&amp;nbsp;&amp;nbsp; = (uint8_t)LPLD_CAN_GetMsgLength(canx, msg_num);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //read data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_GetData(canx, msg_num,data_length,rx_data);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //get time stamp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; time_stamp = LPLD_CAN_GetMsgTimeStamp(canx, msg_num);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i = data_length; i &amp;lt; 8; i++)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rx_data[i] = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //save data to can_rx_msg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; can_rx_msg-&amp;gt;CAN_MsgID = msg_id;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; can_rx_msg-&amp;gt;CAN_MsgDataLength = data_length;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; can_rx_msg-&amp;gt;CAN_MsgTimeStamp&amp;nbsp; = time_stamp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; memcpy(can_rx_msg-&amp;gt;CAN_MsgDataBuffer,rx_data,data_length);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //unlock msg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; timer = CAN_UnlockMsg(canx);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_Interrupt_ClearPending(canx,msg_num);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //write code to empty msg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_SetMsgCode(canx,msg_num,CAN_MSGOBJ_RX_EMPTY);&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Laplenden&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 08:38:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286766#M11118</guid>
      <dc:creator>AaronsCook</dc:creator>
      <dc:date>2013-11-19T08:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286767#M11119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laplenden,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am checking this issue. I will let you know when I could get any updated info.&lt;/P&gt;&lt;P&gt;Thank you for the patience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B.R.&lt;/P&gt;&lt;P&gt;Ma Hui&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 02:35:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286767#M11119</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2013-11-20T02:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286768#M11120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B.R.&lt;/P&gt;&lt;P&gt;Laplenden&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 03:06:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286768#M11120</guid>
      <dc:creator>AaronsCook</dc:creator>
      <dc:date>2013-11-20T03:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286769#M11121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laplenden,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would recommend to refer FlexCAN example of K60 from attached.&lt;/P&gt;&lt;P&gt;Please read below info before start two CAN nodes communications:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This project is a simple can_loopback_node example. It requires at least two CAN nodes:&lt;/P&gt;&lt;P&gt;Node A is running sci2can or any other CAN application with internal loopback disabled;&lt;/P&gt;&lt;P&gt;Node B is running can_loopback_node code.&lt;/P&gt;&lt;P&gt;The example echoes all messages to the remote node (Node A).&lt;/P&gt;&lt;P&gt;The default CAN bit rate is 83.33K.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default the serial port on the tower serial card is used for&lt;/P&gt;&lt;P&gt;the terminal output. The terminal should be configured for 115200 8-N-1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Supported platforms:&lt;/P&gt;&lt;P&gt;- TWR_K40X256&lt;/P&gt;&lt;P&gt;- TWR_K60N512&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The can_loopback_node.eww file will open the project for all of the supported platforms.&lt;/P&gt;&lt;P&gt;Pick the specific project that corresponds to your hardware.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: if switching between platforms it is a good idea to do a make clean to make sure the code&lt;/P&gt;&lt;P&gt;is properly configured for the new platform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instructions on how to play with sci2can node (Node A):&lt;/P&gt;&lt;P&gt;1) Open sci2can.eww workspace, and change both FLEXCAN_SELF_RECEPTION and FLEXCAN_LOOP_BACK macro values to 0 in can_config.h as below:&lt;/P&gt;&lt;P&gt;#define FLEXCAN_SELF_RECEPTION&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;#define FLEXCAN_LOOP_BACK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;2) Select "FLASH_256KB_PFLASH_256KB_DFLASH" as the active configuration for the project;&lt;/P&gt;&lt;P&gt;3) Rebuild the whole project;&lt;/P&gt;&lt;P&gt;4) Select "Project-&amp;gt;download and debug";&lt;/P&gt;&lt;P&gt;5) Select "Debug-&amp;gt;Go" to run the code;&lt;/P&gt;&lt;P&gt;6) Switch off the power to the tower system Node A and disconnect the JTAG connection from the emulator and PC to the Node A;&lt;/P&gt;&lt;P&gt;7) Connect one end of the CAN cable to J7 on TWR-SER module of the Node A tower system ,&lt;/P&gt;&lt;P&gt;the other end to the J7 on another set of TWR-SER module of K40 or K60 tower system (Node B);&lt;/P&gt;&lt;P&gt;8) Connect JTAG connector from the emulator to the tower system Node B and PC;&lt;/P&gt;&lt;P&gt;9) switch on the power to the tower system Node B;&lt;/P&gt;&lt;P&gt;10) open can_loopback_node workspace by double-clicking on can_loopback_node.eww&lt;/P&gt;&lt;P&gt;11) Select "FLASH_256KB_PFLASH_256KB_DFLASH" as the active configuration for the project;&lt;/P&gt;&lt;P&gt;12) Rebuild the whole project and then select "Project-&amp;gt;download &amp;amp; debug";&lt;/P&gt;&lt;P&gt;13) Select "Debug-&amp;gt;Go" to run the code on the tower system Node B;&lt;/P&gt;&lt;P&gt;14) switch on the power to the tower system Node A to run sci2can demo;&lt;/P&gt;&lt;P&gt;15) follow aforementioned instructions to play with sci2can demo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 06:28:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286769#M11121</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2013-11-20T06:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286770#M11122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;I will study this code carefully and test the function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B.R.&lt;/P&gt;&lt;P&gt;laplenden&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 06:38:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286770#M11122</guid>
      <dc:creator>AaronsCook</dc:creator>
      <dc:date>2013-11-20T06:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286771#M11123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,Hui_Ma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I test the code KINETIS_SC_100MHz's FlexCAN demo. It's perform great!&lt;/P&gt;&lt;P&gt;I have a question about the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;the demo has used bus clock as the source of CAN&lt;/P&gt;&lt;P&gt;pFlexCANReg-&amp;gt;CTRL1 |= FLEXCAN_CTRL_CLK_SRC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However,why dose it use "pFlexCANReg-&amp;gt;CTRL1 = 0 | ....." to clear the FLEXCAN_CTRL_CLK_SRC bit?&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;if(pFlexCANReg-&amp;gt;CTRL1 &amp;amp; FLEXCAN_CTRL_CLK_SRC)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;{&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;/*&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;** 48M/120= 400k sclock, 12Tq&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;** PROPSEG = 3, LOM = 0x0, LBUF = 0x0, TSYNC = 0x0, SAMP = 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;** RJW = 3, PSEG1 = 4, PSEG2 = 4,PRESDIV = 120&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;*/&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;pFlexCANReg-&amp;gt;CTRL1 = (&lt;STRONG&gt;0&lt;/STRONG&gt; | FLEXCAN_CTRL_PROPSEG(2) | FLEXCAN_CTRL_RJW(2)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;| FLEXCAN_CTRL_PSEG1(3) | FLEXCAN_CTRL_PSEG2(3)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;| FLEXCAN_CTRL_PRESDIV(119));&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 13:42:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286771#M11123</guid>
      <dc:creator>AaronsCook</dc:creator>
      <dc:date>2014-01-02T13:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286772#M11124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The CANx_CTRL1 register [CLKSRC] bit can only be written in Disable mode as it is blocked by hardware in other modes.&lt;/P&gt;&lt;P&gt;And you will find in &amp;lt;can.c&amp;gt; file line 128 with below code to exit the Disable mode (Exit from this mode is done by negating the MDIS bit in the MCR Register.):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable CAN module&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFlexCANReg-&amp;gt;MCR |= FLEXCAN_MCR_FRZ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // enable HALT feature&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFlexCANReg-&amp;gt;MCR &amp;amp;= ~FLEXCAN_MCR_MDIS; &lt;/P&gt;&lt;P&gt;So the code in configure bit rate does not modify CANx_CTRL1 register [CLKSRC] bit.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 02:38:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286772#M11124</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2014-01-03T02:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286773#M11125</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;Oh I see.&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 03:27:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286773#M11125</guid>
      <dc:creator>AaronsCook</dc:creator>
      <dc:date>2014-01-03T03:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286774#M11126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Hui_Ma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I test the CAN in the debug mode, it away report the CAN error which include Bit1 error,Bit0 error,Form error,and Stuffing error.&lt;/P&gt;&lt;P&gt;I open the CAN error, CAN bus off, Tx &amp;amp; Rx Waring interrupt in the CTL1 and Set break-point in the code.&lt;/P&gt;&lt;P&gt;Then I find that when I finish initialize the CAN, it will generate CAN error interrupt.&lt;/P&gt;&lt;P&gt;In addition, I clear the bit in ESR1 in the coed but it always generate CAN error interrupt because it always has Bit1 error,Bit0 error,Form error,and Stuffing error. I feel it can't clear the error, it always be set.&lt;/P&gt;&lt;P&gt;I don't know if these errors has bad effect on the data transfer on the CAN bus?&lt;/P&gt;&lt;P&gt;But now I feel I always lost message when use the MB interrupt-receive mode in these condition.&lt;/P&gt;&lt;P&gt;May be the poll-receive mode is better than interrupt-receive mode?&lt;/P&gt;&lt;P&gt;This the test picture.&lt;/P&gt;&lt;P&gt;Please kindly help me analysis the bug. Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42095i3F6E478BA26B8B17/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42096i8D2DCC7055D14AE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 15:17:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286774#M11126</guid>
      <dc:creator>AaronsCook</dc:creator>
      <dc:date>2014-01-03T15:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286775#M11127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that could caused by the CAN node with different baud rate and bit rate. Customer need to check the baud rate setting and bit timing setting.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 08:33:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286775#M11127</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2014-01-06T08:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286776#M11128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I test the can_loopback_code KINETIS_SC_100MHz's FlexCAN demo.I&amp;nbsp; tried to change&amp;nbsp; the code by writing the CAN first using UART5 and then reading it to check the transmitted character in the console&lt;A href="https://community.nxp.com/thread/376784"&gt;flexcan testing in TWR-K60F120M&lt;/A&gt;.Here i have used PTA13/12&amp;nbsp; for FlexCAN0 by connecting TXD and RXD pins in TWR-K60F120M tower module.But the code is not working at all.What may be the reason??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;sruthy uk&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 05:38:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286776#M11128</guid>
      <dc:creator>sruthyuk</dc:creator>
      <dc:date>2015-10-06T05:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286777#M11129</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;For the &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; can_loopback_code KINETIS_SC_100MHz's FlexCAN demo is based on Kinetis_100MHz product family, it need to modify related setting, such as MCG setting to make the FlexCAN module works.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Please download the Kinetis 120MHz bare metal sample code from &lt;A href="http://www.freescale.com/webapp/sps/download/license.jsp?colCode=KINETIS_120MHZ_SC&amp;amp;location=null&amp;amp;fpsp=1&amp;amp;WT_TYPE=Snippets,%20Boot%20Code,%20Headers,%20Monitors,%20etc.&amp;amp;WT_VENDOR=FREESCALE&amp;amp;WT_FILE_FORMAT=zip&amp;amp;WT_ASSET=Downloads&amp;amp;fileExt=.zip&amp;amp;Parent_nodeId=1326817898002720905982&amp;amp;Parent_pageType=product"&gt;here&lt;/A&gt; and use that &amp;lt;make_new_ project&amp;gt; batch to create an platform project to develop related FlexCAN application.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Wish it helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&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, 08 Oct 2015 09:00:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286777#M11129</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2015-10-08T09:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286778#M11130</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;Whether i can do the flexcan testing in the KDS project itself??What modifications had to be done in the &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;can_loopback_code &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;KINETIS_SC_100MHz's &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;FlexCAN demo to test the CAN??Is there MCG settings provided in any of the code files in can_loopback project??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;sruthy uk&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 12:07:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286778#M11130</guid>
      <dc:creator>sruthyuk</dc:creator>
      <dc:date>2015-10-08T12:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286779#M11131</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 tested can loopback mode and its working fine.how can i test can communication between two can nodes in two different tower board???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;sruthy uk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2015 09:06:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286779#M11131</guid>
      <dc:creator>sruthyuk</dc:creator>
      <dc:date>2015-11-09T09:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286780#M11132</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;The FlexCAN module's Loop-Back mode:&lt;/P&gt;&lt;P&gt;The module enters this mode when the LPB field in the Control 1 Register is asserted. In this mode, FlexCAN performs an internal loop back that can be used for self-test operation. The bit stream output of the transmitter is internally fed back to the receiver input. The Rx CAN input pin is ignored and the Tx CAN output goes to&lt;/P&gt;&lt;P&gt;the recessive state (logic '1'). FlexCAN behaves as it normally does when transmitting and treats its own transmitted message as a message received from a remote node. In this mode, FlexCAN ignores the bit sent during the ACK slot in the CAN frame acknowledge field to ensure proper reception of its own message. Both transmit and receive interrupts are generated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There doesn't need to connect CAN TXD with RXD pin, which is internal loop back .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reference code, please check my previous thread answer attached K60_100MHz source code, which using the same FlexCAN module with K60_120MHz product.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&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, 10 Nov 2015 08:14:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286780#M11132</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2015-11-10T08:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286781#M11133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;Is there any sample code to refer me for testing two CAN module communication?? Here I have already tested both CAN0 &amp;amp; CAN1 modules in TWR-K60F120M using loopback mode and its working fine.Now i am trying to test communication between these CAN modules like CAN0 used for transmitting data and CAN1 for receiving that data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards&lt;/P&gt;&lt;P&gt;sruthy uk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Dec 2015 15:41:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286781#M11133</guid>
      <dc:creator>sruthyuk</dc:creator>
      <dc:date>2015-12-05T15:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286782#M11134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;While i tried to test CAN in loopback mode both the transmit and receive interrupts are generated and routines were executed. But when i tested CAN networks by connecting two CAN nodes interrupt routines are not executing even if the IMASK bit is enabled for message buffer. How can i test the interrupt routines??&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;sruthy uk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 09:23:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286782#M11134</guid>
      <dc:creator>sruthyuk</dc:creator>
      <dc:date>2016-03-15T09:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286783#M11135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might guess you don't have a 'net 60 ohms' between the CAN differential wires from the transceivers on the two now-interconnected-nodes?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 18:15:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286783#M11135</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2016-03-15T18:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286784#M11136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Yes you r right.i am not using any net 60 ohm across these bus lines.What is the purpose for using it?? i have attached the schematic of transceiver circuit. For testing communication between two CAN nodes i interconnected CANH pins and CANL pins of both transceivers.Also i can view the transmitted signals from CAN0 on Receiver pin of second transceiver in CAN1 for reception.But still CAN1 interrupt&amp;nbsp; is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;sruthy uk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 04:30:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286784#M11136</guid>
      <dc:creator>sruthyuk</dc:creator>
      <dc:date>2016-03-16T04:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem for FlexCAN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286785#M11137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In one sense the 'ideal bus' is 120ohms, terminated at both ends with such 120ohms, as a 'true transmission line'.&amp;nbsp; BUT more importantly for CAN, the drivers are 'open collector/emitter' and can only create a + differential voltage in what is called the 'dominant' state, and the RETURN to 'near 0V differential' for the 'recessive state' is supplied ENTIRELY by said resistors.&amp;nbsp; The net resistance MUST be there, although for a 'short collection of wires' (&amp;lt;2m overall for 250Kb/s) it can just be one 50 to 70 ohm resistance 'anywhere'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 12:22:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-for-FlexCAN/m-p/286785#M11137</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2016-03-16T12:22:54Z</dc:date>
    </item>
  </channel>
</rss>

