<?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>S12 / MagniV Microcontrollers中的主题 LIN init and rx interrupt function</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LIN-init-and-rx-interrupt-function/m-p/678006#M14189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello all:&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;it's my first time to do LIN communciation, I have questions about LIN INIT configuraiton.(my controller is MC9S12ZVLRM&amp;nbsp;)&lt;/P&gt;&lt;P&gt;1. after&amp;nbsp;I configure my LIN init code like this, software&amp;nbsp; will crash. here are my LIN init code.&lt;/P&gt;&lt;P&gt;void SCI_Init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;s_ptrSciReg-&amp;gt;SCICR1 = SCICR1_PE_MASK |SCICR1_MSCI;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*enable parity */&amp;nbsp;&amp;nbsp;&lt;BR /&gt;s_ptrSciReg-&amp;gt;SCICR2 = (SCICR2_RIE_MASK | SCICR2_TE_MASK | SCICR2_RE_MASK);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;s_ptrSciReg-&amp;gt;SCIBDH =&amp;nbsp;0x06u&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*bautrate is 19200*/&lt;BR /&gt;&amp;nbsp;s_ptrSciReg-&amp;gt;SCIBDL = 0x83u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;s_ptrSciReg-&amp;gt;SCISR2 = SCISR2_AMAP_MASK;&amp;nbsp; /*use the alternative register*/&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;SCIRegPtr-&amp;gt;SCIACR1 = SCIACR1_BKDIE_MASK;&amp;nbsp;&amp;nbsp; /*BKDIF interrupt requests enabled*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;SCIRegPtr-&amp;gt;SCIACR2 = SCIACR2_BKDFE_MASK;&amp;nbsp;&amp;nbsp; /*BKDIF interrupt requests enabled*/&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;my software crashed when i configure the LIN Init like above. So how to use the alternative control register ? if i only need &amp;nbsp;LIN module work as slave node, should I configure alternative control register?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. i modified my above code to this:&lt;/P&gt;&lt;P&gt;void SCI_Init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;s_ptrSciReg-&amp;gt;SCICR1 =SCICR1_M;&amp;nbsp;&lt;/P&gt;&lt;P&gt;s_ptrSciReg-&amp;gt;SCICR2 = (SCICR2_RIE_MASK | SCICR2_TE_MASK | SCICR2_RE_MASK);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;s_ptrSciReg-&amp;gt;SCIBDH =&amp;nbsp;0x06u&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*bautrate is 19200*/&lt;BR /&gt;&amp;nbsp;s_ptrSciReg-&amp;gt;SCIBDL = 0x83u&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;then my software didn't crash&amp;nbsp;anymore, but when i use canoe to send out LIN message to my SCU, when the break filed was received, SCI receive states Frame Error Flag bit&amp;nbsp;is true. how to deal with this? i think it's reasonable that the break data should be Error Flag. Am i right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Jul 2017 06:31:18 GMT</pubDate>
    <dc:creator>evahe</dc:creator>
    <dc:date>2017-07-21T06:31:18Z</dc:date>
    <item>
      <title>LIN init and rx interrupt function</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LIN-init-and-rx-interrupt-function/m-p/678006#M14189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello all:&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;it's my first time to do LIN communciation, I have questions about LIN INIT configuraiton.(my controller is MC9S12ZVLRM&amp;nbsp;)&lt;/P&gt;&lt;P&gt;1. after&amp;nbsp;I configure my LIN init code like this, software&amp;nbsp; will crash. here are my LIN init code.&lt;/P&gt;&lt;P&gt;void SCI_Init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;s_ptrSciReg-&amp;gt;SCICR1 = SCICR1_PE_MASK |SCICR1_MSCI;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*enable parity */&amp;nbsp;&amp;nbsp;&lt;BR /&gt;s_ptrSciReg-&amp;gt;SCICR2 = (SCICR2_RIE_MASK | SCICR2_TE_MASK | SCICR2_RE_MASK);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;s_ptrSciReg-&amp;gt;SCIBDH =&amp;nbsp;0x06u&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*bautrate is 19200*/&lt;BR /&gt;&amp;nbsp;s_ptrSciReg-&amp;gt;SCIBDL = 0x83u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;s_ptrSciReg-&amp;gt;SCISR2 = SCISR2_AMAP_MASK;&amp;nbsp; /*use the alternative register*/&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;SCIRegPtr-&amp;gt;SCIACR1 = SCIACR1_BKDIE_MASK;&amp;nbsp;&amp;nbsp; /*BKDIF interrupt requests enabled*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;SCIRegPtr-&amp;gt;SCIACR2 = SCIACR2_BKDFE_MASK;&amp;nbsp;&amp;nbsp; /*BKDIF interrupt requests enabled*/&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;my software crashed when i configure the LIN Init like above. So how to use the alternative control register ? if i only need &amp;nbsp;LIN module work as slave node, should I configure alternative control register?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. i modified my above code to this:&lt;/P&gt;&lt;P&gt;void SCI_Init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;s_ptrSciReg-&amp;gt;SCICR1 =SCICR1_M;&amp;nbsp;&lt;/P&gt;&lt;P&gt;s_ptrSciReg-&amp;gt;SCICR2 = (SCICR2_RIE_MASK | SCICR2_TE_MASK | SCICR2_RE_MASK);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;s_ptrSciReg-&amp;gt;SCIBDH =&amp;nbsp;0x06u&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*bautrate is 19200*/&lt;BR /&gt;&amp;nbsp;s_ptrSciReg-&amp;gt;SCIBDL = 0x83u&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;then my software didn't crash&amp;nbsp;anymore, but when i use canoe to send out LIN message to my SCU, when the break filed was received, SCI receive states Frame Error Flag bit&amp;nbsp;is true. how to deal with this? i think it's reasonable that the break data should be Error Flag. Am i right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 06:31:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LIN-init-and-rx-interrupt-function/m-p/678006#M14189</guid>
      <dc:creator>evahe</dc:creator>
      <dc:date>2017-07-21T06:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: LIN init and rx interrupt function</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LIN-init-and-rx-interrupt-function/m-p/678007#M14190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How does the software crash?&lt;/P&gt;&lt;P&gt;You can check the Lin Driver &lt;A href="http://www.nxp.com/downloads/en/device-drivers/FSL_LIN_2.X_STACK.zip"&gt;LIN2.x and SAE J2602 Stack&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2017 12:19:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LIN-init-and-rx-interrupt-function/m-p/678007#M14190</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2017-07-24T12:19:27Z</dc:date>
    </item>
  </channel>
</rss>

