<?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>Processor Expert SoftwareのトピックS32 LIN Component</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/S32-LIN-Component/m-p/726775#M4098</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 try to use the LIN component of the processor expert, but I have some questions regarding the documentation and the usage of the component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;/* Global variables */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;uint16_t timerCounterValue[2] = {0u};&lt;/DIV&gt;&lt;DIV class=""&gt;uint16_t timerOverflowInterruptCount = 0u;&lt;/DIV&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;/* Callback function to get time interval in nano seconds */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;uint32_t timerGetTimeIntervalCallback0(uint32_t *ns)&lt;/DIV&gt;&lt;DIV class=""&gt;{&lt;/DIV&gt;&lt;DIV class=""&gt;timerCounterValue[1] = (uint16_t)(ftmBase-&amp;gt;CNT);&lt;/DIV&gt;&lt;DIV class=""&gt;*ns = ((uint32_t)(timerCounterValue[1] + timerOverflowInterruptCount*65536u - timerCounterValue[0]))*1000 / TIMER_1US;&lt;/DIV&gt;&lt;DIV class=""&gt;timerOverflowInterruptCount = 0U;&lt;/DIV&gt;&lt;DIV class=""&gt;timerCounterValue[0] = timerCounterValue[1];&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;return&lt;/SPAN&gt; 0U;&lt;/DIV&gt;&lt;DIV class=""&gt;}&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I don't get the usage of this callback function, it always returns zero, are the global vars polled by the driver?&lt;/P&gt;&lt;P&gt;Must this function be called by an timer interrupt? And if yes, wich is the necessary intervall 0.1µs? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to use the flexTimer1 for the LIN stack, but I haven’t found any corresponding part for „ftmBase-&amp;gt;CNT“.&lt;/P&gt;&lt;P&gt;I assume that at this point the current timer value is read.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;And the define TIMER_1US is just a placeholder for the nano second calculation, depending on the max timer value?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;It would be appreciated if someone can give me a hint.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Dec 2017 16:48:16 GMT</pubDate>
    <dc:creator>philippkolb</dc:creator>
    <dc:date>2017-12-15T16:48:16Z</dc:date>
    <item>
      <title>S32 LIN Component</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/S32-LIN-Component/m-p/726775#M4098</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 try to use the LIN component of the processor expert, but I have some questions regarding the documentation and the usage of the component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;/* Global variables */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;uint16_t timerCounterValue[2] = {0u};&lt;/DIV&gt;&lt;DIV class=""&gt;uint16_t timerOverflowInterruptCount = 0u;&lt;/DIV&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;/* Callback function to get time interval in nano seconds */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;uint32_t timerGetTimeIntervalCallback0(uint32_t *ns)&lt;/DIV&gt;&lt;DIV class=""&gt;{&lt;/DIV&gt;&lt;DIV class=""&gt;timerCounterValue[1] = (uint16_t)(ftmBase-&amp;gt;CNT);&lt;/DIV&gt;&lt;DIV class=""&gt;*ns = ((uint32_t)(timerCounterValue[1] + timerOverflowInterruptCount*65536u - timerCounterValue[0]))*1000 / TIMER_1US;&lt;/DIV&gt;&lt;DIV class=""&gt;timerOverflowInterruptCount = 0U;&lt;/DIV&gt;&lt;DIV class=""&gt;timerCounterValue[0] = timerCounterValue[1];&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;return&lt;/SPAN&gt; 0U;&lt;/DIV&gt;&lt;DIV class=""&gt;}&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I don't get the usage of this callback function, it always returns zero, are the global vars polled by the driver?&lt;/P&gt;&lt;P&gt;Must this function be called by an timer interrupt? And if yes, wich is the necessary intervall 0.1µs? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to use the flexTimer1 for the LIN stack, but I haven’t found any corresponding part for „ftmBase-&amp;gt;CNT“.&lt;/P&gt;&lt;P&gt;I assume that at this point the current timer value is read.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;And the define TIMER_1US is just a placeholder for the nano second calculation, depending on the max timer value?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;It would be appreciated if someone can give me a hint.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 16:48:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/S32-LIN-Component/m-p/726775#M4098</guid>
      <dc:creator>philippkolb</dc:creator>
      <dc:date>2017-12-15T16:48:16Z</dc:date>
    </item>
  </channel>
</rss>

