<?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: ESCI Receive problems when TIM overflow ISR is enabled in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136201#M4255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Check if the TIM overflow is too short!&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by transcend on &lt;SPAN class="date_text"&gt;2008-03-05&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:16 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Mar 2008 10:16:02 GMT</pubDate>
    <dc:creator>transcend</dc:creator>
    <dc:date>2008-03-05T10:16:02Z</dc:date>
    <item>
      <title>ESCI Receive problems when TIM overflow ISR is enabled</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136196#M4250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working with a HC908QB8. The ESCI receives without errors when the Timer ISR is disabled. If the Timer ISR is enabled, than it seems that the ESCI misses telegrams proportional to the time the ISR is called (about 5% of the messages are not recognized).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Additional Info: it is a LIN Bus application, baudrate is 9600bps, and each 100ms a frame header is send out by LIN master. I stay in the Timer ISR for about 5us.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anybody similar experience or an idea what I'm maybe doing wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:26:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136196#M4250</guid>
      <dc:creator>Otze</dc:creator>
      <dc:date>2006-11-10T22:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: ESCI Receive problems when TIM overflow ISR is enabled</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136197#M4251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Otze,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What do you use the TIM for ?&lt;/DIV&gt;&lt;DIV&gt;Is it linked to LIN ? Because &lt;STRONG&gt;the ESCI has an integrated simple Timer&lt;/STRONG&gt;.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What can happen from what you described is that your TIM ISR is &lt;STRONG&gt;too long compared to&lt;/STRONG&gt; speed of messages and you get a &lt;STRONG&gt;Buffer Overrun&lt;/STRONG&gt;. It means you get a new message when you haven't read/removed the previous one from the Data Register.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If the latest is the case and you need the TIM for something else, you need to have &lt;STRONG&gt;quicker TIM ISR&lt;/STRONG&gt;.&lt;/DIV&gt;&lt;DIV&gt;Or you can also have the system having a &lt;STRONG&gt;greater bus clock&lt;/STRONG&gt; so TIM ISR time is not significant compared a a LIN message.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Note that 9600 is quite slow and easily handled by an HC08QB8 which can be a LIN Slave&amp;nbsp;node at 20kbps without the slightest glitch.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Cheers,&lt;/DIV&gt;&lt;DIV&gt;Alban.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:52:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136197#M4251</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2006-11-10T22:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: ESCI Receive problems when TIM overflow ISR is enabled</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136198#M4252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello Alban,&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply. I just need this timer to increment some counter variable which I use to trigger some action in my main-loop when a counter value is reached.&lt;BR /&gt;For the timer routine itself: I stay in this ISR for about 5 microseconds, and a bit time is about 104 microseconds at 9600bps, and a byte takes about 1ms, so I don't think that I miss a received byte because I'm stucking in the timer ISR.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 23:08:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136198#M4252</guid>
      <dc:creator>Otze</dc:creator>
      <dc:date>2006-11-10T23:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: ESCI Receive problems when TIM overflow ISR is enabled</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136199#M4253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi again,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you don't get out of the ISR it is likely that you didn't clear the Interrupt Flag properly.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When it is set, it generates an interrupt event.&lt;/DIV&gt;&lt;DIV&gt;As long as you don't acknowledge it, you will go back to the interrupt.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Check TxSC_TOF bit&lt;/DIV&gt;&lt;BLOCKQUOTE dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;DIV&gt;&lt;B&gt;&lt;FONT face="Helvetica-Bold" size="3"&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;P align="left"&gt;&lt;B&gt;&lt;FONT face="Helvetica-Bold" size="3"&gt;TOF — TIM Overflow Flag Bit&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT face="Helvetica" size="3"&gt;&lt;/FONT&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="3"&gt;This read/write flag is set when the TIM counter resets reaches the modulo value programmed in the TIM counter modulo registers. Clear TOF by reading the TIM status and control register when TOF is set and then writing a 0 to TOF. If another TIM overflow occurs before the clearing sequence is complete, then writing 0 to TOF has no effect. Therefore, a TOF interrupt request cannot be lost due to inadvertent clearing of TOF. Reset clears the TOF bit. Writing a 1 to TOF has no effect.&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="3"&gt;1 = TIM counter has reached modulo value&lt;BR /&gt;0 = TIM counter has not reached modulo value&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;Enjoy,&lt;/DIV&gt;&lt;DIV&gt;Alban.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 23:28:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136199#M4253</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2006-11-10T23:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: ESCI Receive problems when TIM overflow ISR is enabled</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136200#M4254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Alban,&lt;BR /&gt;&lt;BR /&gt;this was a misunderstanding. Of course, I get out of the ISR. I just wanted to say that I don't think that the ISR is so long that I miss a received byte.&lt;BR /&gt;Here is the code itself:&lt;BR /&gt;&lt;BR /&gt;interrupt void ISR_TimerOF()&lt;BR /&gt;{&lt;BR /&gt;/* variable declaration */&lt;BR /&gt;uint8_t ucDummy;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* clear the overflow flag */&lt;BR /&gt;ucDummy = TSC; /* 1st step: read the status register */&lt;BR /&gt;TSC_TOF = 0; /* 2nd step: reset the TOF */&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* set the flag resp. increment the counters */&lt;BR /&gt;gucTimerFlag = 1;&lt;BR /&gt;gusCounterOpHour++;&lt;BR /&gt;gusCounterDiagnose++;&lt;BR /&gt;gusTimeSinceLastSynchBreak++;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Just to remember: without Timer ISR, I receive every byte. With the Timer ISR enabled, I miss approx. 5% of the telegrams.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Otze&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 14:44:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136200#M4254</guid>
      <dc:creator>Otze</dc:creator>
      <dc:date>2006-11-13T14:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: ESCI Receive problems when TIM overflow ISR is enabled</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136201#M4255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Check if the TIM overflow is too short!&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by transcend on &lt;SPAN class="date_text"&gt;2008-03-05&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:16 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:16:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/ESCI-Receive-problems-when-TIM-overflow-ISR-is-enabled/m-p/136201#M4255</guid>
      <dc:creator>transcend</dc:creator>
      <dc:date>2008-03-05T10:16:02Z</dc:date>
    </item>
  </channel>
</rss>

