<?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: MPC5604B      How to implement the LIN bus communication function??? in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5604B-How-to-implement-the-LIN-bus-communication-function/m-p/701809#M8871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #2e3033; background-color: #eef0f2; font-size: 12px;"&gt;Do you have&lt;SPAN style="color: #51626f; background-color: #ffffff; font-size: 14px;"&gt; &amp;nbsp;MPC5604B Flex CAN &amp;nbsp;communication demo&amp;nbsp;&lt;/SPAN&gt;?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Aug 2017 03:27:23 GMT</pubDate>
    <dc:creator>鑫洋金</dc:creator>
    <dc:date>2017-08-24T03:27:23Z</dc:date>
    <item>
      <title>MPC5604B      How to implement the LIN bus communication function???</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5604B-How-to-implement-the-LIN-bus-communication-function/m-p/701806#M8868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/******************************************************** &lt;BR /&gt;【平 台】龙丘MPC多功能开发板&lt;BR /&gt;【编 写】龙丘&lt;BR /&gt;【Designed】by Chiu Sir&lt;BR /&gt;&lt;SPAN&gt;【E-mail 】&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:chiusir@yahoo.cn"&gt;chiusir@yahoo.cn&lt;/A&gt;&lt;BR /&gt;【软件版本】V1.0&lt;BR /&gt;【最后更新】2011年11月08日&lt;BR /&gt;【相关信息参考下列地址】&lt;BR /&gt;&lt;SPAN&gt;【网 站】&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lqist.cn" rel="nofollow" target="_blank"&gt;http://www.lqist.cn&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;【淘宝店铺】&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fshop36265907.taobao.com" rel="nofollow" target="_blank"&gt;http://shop36265907.taobao.com&lt;/A&gt;&lt;BR /&gt;------------------------------------------------&lt;BR /&gt;【dev.env.】Code Warrior 2.9&lt;BR /&gt;【Target 】MPC5604B/P&lt;BR /&gt;【内部晶振】 khz&lt;BR /&gt;【外部晶振】8MHz&lt;BR /&gt;【总线频率】64MHz&lt;BR /&gt;*/&lt;BR /&gt;/* main.c: LINFlex program for MPC56xxB */&lt;BR /&gt;/* Description: Transmit one message from FlexCAN 0 buf. 0 to FlexCAN C buf. 1 */&lt;BR /&gt;/* Oct 30 2009 S Mihalik - initial version */&lt;BR /&gt;/* Mar 14 2010 SM - modified initModesAndClock, updated header file */&lt;/P&gt;&lt;P&gt;#include "MPC5604B_0M27V_0102.h" /* Use proper header file */&lt;/P&gt;&lt;P&gt;void initModesAndClks(void) {&lt;BR /&gt; ME.MER.R = 0x0000001D; /* Enable DRUN, RUN0, SAFE, RESET modes */&lt;BR /&gt; /* Initialize PLL before turning it on: */&lt;BR /&gt;/* Use 1 of the next 2 lines depending on crystal frequency: */&lt;BR /&gt; CGM.FMPLL_CR.R = 0x02400100; /* 8 MHz xtal: Set PLL0 to 64 MHz */ &lt;BR /&gt;/*CGM.FMPLL_CR.R = 0x12400100;*/ /* 40 MHz xtal: Set PLL0 to 64 MHz */ &lt;BR /&gt; ME.RUN[0].R = 0x001F0074; /* RUN0 cfg: 16MHzIRCON,OSC0ON,PLL0ON,syclk=PLL */&lt;BR /&gt; ME.RUNPC[1].R = 0x00000010; /* Peri. Cfg. 1 settings: only run in RUN0 mode */&lt;BR /&gt; ME.PCTL[48].R = 0x01; /* MPC56xxB/P/S LINFlex 0: select ME.RUNPC[1] */ &lt;BR /&gt; ME.PCTL[68].R = 0x01; /* MPC56xxB/S SIUL: select ME.RUNPC[0] */ &lt;BR /&gt; /* Mode Transition to enter RUN0 mode: */&lt;BR /&gt; ME.MCTL.R = 0x40005AF0; /* Enter RUN0 Mode &amp;amp; Key */&lt;BR /&gt; ME.MCTL.R = 0x4000A50F; /* Enter RUN0 Mode &amp;amp; Inverted Key */ &lt;BR /&gt; while (ME.GS.B.S_MTRANS) {} /* Wait for mode transition to complete */ &lt;BR /&gt; /* Note: could wait here using timer and/or I_TC IRQ */&lt;BR /&gt; while(ME.GS.B.S_CURRENTMODE != 4) {} /* Verify RUN0 is the current mode */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void initPeriClkGen(void) {&lt;BR /&gt; CGM.SC_DC[0].R = 0x80; /* MPC56xxB/S: Enable peri set 1 sysclk divided by 1 */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void disableWatchdog(void) {&lt;BR /&gt; SWT.SR.R = 0x0000c520; /* Write keys to clear soft lock bit */&lt;BR /&gt; SWT.SR.R = 0x0000d928; &lt;BR /&gt; SWT.CR.R = 0x8000010A; /* Clear watchdog enable (WEN) */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void initLINFLEX_1 (void) {&lt;/P&gt;&lt;P&gt;LINFLEX_1.LINIBRR.B.DIV_M= 416; /* Mantissa baud rate divider component */&lt;BR /&gt; LINFLEX_1.LINFBRR.B.DIV_F = 16; /* Fraction baud rate divider comonent */&lt;BR /&gt; LINFLEX_1.LINCR1.R= 0x00000310; /* Configure module as LIN master &amp;amp; header */&lt;BR /&gt; SIU.PCR[38].R = 0x0400; /* MPC56xxB: Configure port c6 as LIN1TX */&lt;BR /&gt; SIU.PCR[39].R = 0x0103; /* MPC56xxB: Configure port c7 as LIN1RX */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void transmitLINframe (void) {&lt;BR /&gt; &lt;BR /&gt; LINFLEX_1.BIDR.R = 'a'; /* Init header: ID=0x35, 8 B, Tx, enh. cksum*/ &lt;BR /&gt; &lt;BR /&gt;}&lt;BR /&gt;void delayms(int ms)&lt;BR /&gt;{ &lt;BR /&gt; int ii,jj;&lt;BR /&gt; if (ms&amp;lt;1) ms=1;&lt;BR /&gt; for(ii=0;ii&amp;lt;ms;ii++)&lt;BR /&gt; for(jj=0;jj&amp;lt;3338;jj++); // &lt;BR /&gt;}&lt;BR /&gt;void main(void) {&lt;BR /&gt; volatile uint32_t IdleCtr = 0; &lt;BR /&gt; &lt;BR /&gt; initModesAndClks(); /* Initialize mode entries */&lt;BR /&gt; initPeriClkGen(); /* Initialize peripheral clock generation for LINFlex */&lt;BR /&gt; disableWatchdog(); /* Disable watchdog */&lt;BR /&gt; initLINFLEX_1(); /* Initialize FLEXCAN 0 as master */&lt;BR /&gt; transmitLINframe(); /* Transmit one frame from master */&lt;BR /&gt; while (1) &lt;BR /&gt; {&lt;BR /&gt; IdleCtr++;&lt;BR /&gt; transmitLINframe(); &lt;BR /&gt; delayms(500);&lt;BR /&gt; } /* Idle loop: increment counter */&lt;BR /&gt;} &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Aug 2017 00:40:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5604B-How-to-implement-the-LIN-bus-communication-function/m-p/701806#M8868</guid>
      <dc:creator>鑫洋金</dc:creator>
      <dc:date>2017-08-19T00:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5604B      How to implement the LIN bus communication function???</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5604B-How-to-implement-the-LIN-bus-communication-function/m-p/701807#M8869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #2e3033; background-color: #eef0f2; font-size: 12px;"&gt;&lt;SPAN&gt;My email address is &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:918793695@qq.com"&gt;918793695@qq.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Aug 2017 00:41:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5604B-How-to-implement-the-LIN-bus-communication-function/m-p/701807#M8869</guid>
      <dc:creator>鑫洋金</dc:creator>
      <dc:date>2017-08-19T00:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5604B      How to implement the LIN bus communication function???</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5604B-How-to-implement-the-LIN-bus-communication-function/m-p/701808#M8870</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;you can refer to this example &lt;A href="https://community.nxp.com/docs/DOC-102526"&gt;https://community.nxp.com/docs/DOC-102526&lt;/A&gt;&amp;nbsp;&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>Tue, 22 Aug 2017 06:58:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5604B-How-to-implement-the-LIN-bus-communication-function/m-p/701808#M8870</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2017-08-22T06:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5604B      How to implement the LIN bus communication function???</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5604B-How-to-implement-the-LIN-bus-communication-function/m-p/701809#M8871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #2e3033; background-color: #eef0f2; font-size: 12px;"&gt;Do you have&lt;SPAN style="color: #51626f; background-color: #ffffff; font-size: 14px;"&gt; &amp;nbsp;MPC5604B Flex CAN &amp;nbsp;communication demo&amp;nbsp;&lt;/SPAN&gt;?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 03:27:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5604B-How-to-implement-the-LIN-bus-communication-function/m-p/701809#M8871</guid>
      <dc:creator>鑫洋金</dc:creator>
      <dc:date>2017-08-24T03:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5604B      How to implement the LIN bus communication function???</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5604B-How-to-implement-the-LIN-bus-communication-function/m-p/701810#M8872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #2e3033; background-color: #eef0f2; font-size: 12px;"&gt;Can I add your Whatsapp account ?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 04:01:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5604B-How-to-implement-the-LIN-bus-communication-function/m-p/701810#M8872</guid>
      <dc:creator>鑫洋金</dc:creator>
      <dc:date>2017-08-24T04:01:20Z</dc:date>
    </item>
  </channel>
</rss>

