<?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>MPC5xxxのトピックRe: MPC5604 - is there any sample code available for FlexCAN Listen Only Mode to receive CAN Frames</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/633940#M5996</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;If LOM bit is asserted in Freeze mode, the FlexCAN module enters Listen-Only Mode.&lt;/P&gt;&lt;P&gt;Transmission is disabled, all error counters are frozen and the module operates in a CAN Error Passive mode. Only messages acknowledged by another CAN station will be received. If FlexCAN detects a message that has not been acknowledged, it will flag a BIT0 error, as if it was trying to acknowledge the message. RX interrupts are functional in LOM mode normally.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached if simple example I did for TRK-MPC5606B. CAN0 is used to send message, CAN1 to receive it with a help of RXFIFO.&lt;/P&gt;&lt;P&gt;I have added CAN2 to work in LOM mode to receive all standard ID to MB0 and extended IDs to MB1. Interrupt is enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Nov 2016 09:03:07 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2016-11-07T09:03:07Z</dc:date>
    <item>
      <title>MPC5604 - is there any sample code available for FlexCAN Listen Only Mode to receive CAN Frames</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/633939#M5995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;does CAN Receive interrupt works in LOM mode also?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 04:54:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/633939#M5995</guid>
      <dc:creator>naveenlingampel</dc:creator>
      <dc:date>2016-11-07T04:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5604 - is there any sample code available for FlexCAN Listen Only Mode to receive CAN Frames</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/633940#M5996</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;If LOM bit is asserted in Freeze mode, the FlexCAN module enters Listen-Only Mode.&lt;/P&gt;&lt;P&gt;Transmission is disabled, all error counters are frozen and the module operates in a CAN Error Passive mode. Only messages acknowledged by another CAN station will be received. If FlexCAN detects a message that has not been acknowledged, it will flag a BIT0 error, as if it was trying to acknowledge the message. RX interrupts are functional in LOM mode normally.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached if simple example I did for TRK-MPC5606B. CAN0 is used to send message, CAN1 to receive it with a help of RXFIFO.&lt;/P&gt;&lt;P&gt;I have added CAN2 to work in LOM mode to receive all standard ID to MB0 and extended IDs to MB1. Interrupt is enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 09:03:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/633940#M5996</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-11-07T09:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5604 - is there any sample code available for FlexCAN Listen Only Mode to receive CAN Frames</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/633941#M5997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;Petr Stancik.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;Assuming that there are only two nodes. one configured in LOM mode and the other in Normal mode transmitting a periodic message.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;since there are no other nodes to ACK the message transmitted by Normal mode, will the node in LOM mode will just&amp;nbsp;&lt;SPAN style="color: #51626f;"&gt;flag a BIT0 error or will it&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;flag a BIT0 error as well as receive the message in the configured MB.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;I am yet to get my evaluation board to do this. will post again once i have the board.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;Thanks for your input.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 10:19:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/633941#M5997</guid>
      <dc:creator>naveenlingampel</dc:creator>
      <dc:date>2016-11-07T10:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5604 - is there any sample code available for FlexCAN Listen Only Mode to receive CAN Frames</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/633942#M5998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will get just a Bit error. No message is received.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 11:36:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/633942#M5998</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-11-07T11:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5604 - is there any sample code available for FlexCAN Listen Only Mode to receive CAN Frames</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/1226831#M17296</link>
      <description>&lt;P&gt;Hi,Peter:I transplant the 5606B code you offered to MPC5604B and it works well,Buff[9] for Tx and Buff[5] for Rx function with the same CAN0 channel.Then I adjust the Buff[6] to Buff[5],unfortunately,The Rx does not work.&lt;/P&gt;&lt;P&gt;(1)Buff[6] and Buff[5] shares the same interrupt vector ,No.69--Flexcan_Buff_04_07&lt;/P&gt;&lt;P&gt;(2) CAN_0.IMRL.R = 0x00000040; // enable BUF06I interrupt&lt;/P&gt;&lt;P&gt;(3)if(CAN_0.IFRL.B.BUF06I)&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;/* upon receiving the interrupt flag */&lt;BR /&gt;&lt;BR /&gt;/* check the ID field */&lt;BR /&gt;/* not really needed in this example */&lt;BR /&gt;/* useful in case when multiple IDs are received&lt;BR /&gt;* by the FIFO (Rx mask feature) */&lt;BR /&gt;temp = CAN_0.BUF[6].ID.R;&lt;BR /&gt;//if(( 0x12340000 ) != temp)&lt;BR /&gt;//{&lt;BR /&gt;/* error ! trap here.&lt;BR /&gt;* we have configured this MB to receive&lt;BR /&gt;* just ID 0x12340000 and not another */&lt;BR /&gt;// while(1) {}&lt;BR /&gt;// }&lt;BR /&gt;&lt;BR /&gt;rxlength = (uint8_t) CAN_0.BUF[6].CS.B.LENGTH;&lt;BR /&gt;&lt;BR /&gt;/* read the received data */&lt;BR /&gt;for (j=0; j&amp;lt;rxlength; j++)&lt;BR /&gt;{&lt;BR /&gt;RxDATA[j] = CAN_0.BUF[6].DATA.B[j];&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;u8_rxdata=CAN_0.BUF[6].DATA.B[0];&lt;BR /&gt;&lt;BR /&gt;temp = CAN_0.TIMER.R; /* Read TIMER to unlock message buffers */&lt;BR /&gt;&lt;BR /&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; //CAN_0.IFRL.R = 0x00000020; /* clear the BUF05I bit - bit 5 */&lt;BR /&gt;CAN_0.IFRL.R = 0x00000040;/* clear the BUF06I bit - bit 6 */&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am puzzled with it,can you offer me some help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 06:10:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/1226831#M17296</guid>
      <dc:creator>tongxiaohui</dc:creator>
      <dc:date>2021-02-05T06:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5604 - is there any sample code available for FlexCAN Listen Only Mode to receive CAN Frames</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/1226832#M17297</link>
      <description>&lt;P&gt;Hi,Peter:I transplant the 5606B code you offered to MPC5604B and it works well,Buff[9] for Tx and Buff[5] for Rx function with the same CAN0 channel.Then I adjust the Buff[6] to Buff[5],unfortunately,The Rx does not work.&lt;/P&gt;&lt;P&gt;(1)Buff[6] and Buff[5] shares the same interrupt vector ,No.69--Flexcan_Buff_04_07&lt;/P&gt;&lt;P&gt;(2) CAN_0.IMRL.R = 0x00000040; // enable BUF06I interrupt&lt;/P&gt;&lt;P&gt;(3)if(CAN_0.IFRL.B.BUF06I)&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;/* upon receiving the interrupt flag */&lt;BR /&gt;&lt;BR /&gt;/* check the ID field */&lt;BR /&gt;/* not really needed in this example */&lt;BR /&gt;/* useful in case when multiple IDs are received&lt;BR /&gt;* by the FIFO (Rx mask feature) */&lt;BR /&gt;temp = CAN_0.BUF[6].ID.R;&lt;BR /&gt;//if(( 0x12340000 ) != temp)&lt;BR /&gt;//{&lt;BR /&gt;/* error ! trap here.&lt;BR /&gt;* we have configured this MB to receive&lt;BR /&gt;* just ID 0x12340000 and not another */&lt;BR /&gt;// while(1) {}&lt;BR /&gt;// }&lt;BR /&gt;&lt;BR /&gt;rxlength = (uint8_t) CAN_0.BUF[6].CS.B.LENGTH;&lt;BR /&gt;&lt;BR /&gt;/* read the received data */&lt;BR /&gt;for (j=0; j&amp;lt;rxlength; j++)&lt;BR /&gt;{&lt;BR /&gt;RxDATA[j] = CAN_0.BUF[6].DATA.B[j];&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;u8_rxdata=CAN_0.BUF[6].DATA.B[0];&lt;BR /&gt;&lt;BR /&gt;temp = CAN_0.TIMER.R; /* Read TIMER to unlock message buffers */&lt;BR /&gt;&lt;BR /&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; //CAN_0.IFRL.R = 0x00000020; /* clear the BUF05I bit - bit 5 */&lt;BR /&gt;CAN_0.IFRL.R = 0x00000040;/* clear the BUF06I bit - bit 6 */&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am puzzled with it,can you offer me some help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 06:12:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5604-is-there-any-sample-code-available-for-FlexCAN-Listen/m-p/1226832#M17297</guid>
      <dc:creator>tongxiaohui</dc:creator>
      <dc:date>2021-02-05T06:12:51Z</dc:date>
    </item>
  </channel>
</rss>

