<?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中的主题 Re: MC912DG128A - HC12 Timer</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148948#M4135</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Yes, it's not a bug. According to the docs, timer prescaler&amp;nbsp;changes not immediately after you write prescaler bits, but at TCNT=0bXXXXXXXXX0000000.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Maybe it's possible to set prescaler first, then enable the timer. Since after reset TCNT is 0, maybe prescaler could be enabled for first 127 ticks? I don't remember if it's possible to change prescaler while timer is disabled.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Sep 2007 20:40:53 GMT</pubDate>
    <dc:creator>kef</dc:creator>
    <dc:date>2007-09-24T20:40:53Z</dc:date>
    <item>
      <title>MC912DG128A - HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148939#M4126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;i have a problem with the timer counter.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;DIV class="text_smallest"&gt;int variable1, variable2;&lt;/DIV&gt;&lt;PRE&gt;timerinit();while(1){variable1=TCNT;&amp;nbsp; //save the TimerCounterRegister TCNT in variable1variable2=TCNT;&amp;nbsp; //...}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;The Timer has a resolution of 1µs. Now the problem: in the first cycle of the loop the difference between variable1 and variable2 is 6µs. from the second cycle the difference is only 1µs or 0µs. the reason of 0 is probably that the resolution is to big. But why 6µs in the first cycle? Do you&amp;nbsp;have any idea?&amp;nbsp;Thank you!&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;--&lt;BR /&gt;Alban Edit: Please always include FSL Part Number in Message Subject line.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by Alban on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2007-09-22&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;09:06 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:50:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148939#M4126</guid>
      <dc:creator>hc12prog</dc:creator>
      <dc:date>2020-10-29T08:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148940#M4127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Hello&lt;BR /&gt;&lt;BR /&gt;HC12 what ?&lt;BR /&gt;Sure it is not S12 ?&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please &lt;B&gt;always&lt;/B&gt; include FSL Part Number in Message Subject line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by Alban on &lt;SPAN class="date_text"&gt;2007-09-22&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;07:26 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Sep 2007 01:25:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148940#M4127</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-09-23T01:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: MC912DG128A - HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148941#M4128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;what means FSL? i&amp;nbsp;use the MC912DG128A&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can you explain the problem?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--&lt;BR /&gt;Alban Edit: Please always include FSL Part Number in Message Subject line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by Alban on &lt;SPAN class="date_text"&gt;2007-09-22&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;09:07 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Sep 2007 03:03:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148941#M4128</guid>
      <dc:creator>hc12prog</dc:creator>
      <dc:date>2007-09-23T03:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: MC912DG128A - HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148942#M4129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;FSL means Freescale. This terms comes from the fact that people like Three Letters Accronysms.&lt;BR /&gt;FSL was also the share symbol at the New York Stock Exchange.&lt;BR /&gt;It is not anymore as FSL became private last year.&lt;BR /&gt;&lt;BR /&gt;I haven't worked on HC12 enough to remember the TIM by heart.&lt;BR /&gt;Maybe someone else will be more helpful.&lt;BR /&gt;&lt;BR /&gt;I edited messages so it shows the part number. This will help device experts to help you.&lt;BR /&gt;This will also avoid confusion as most of peole now think about S12 automatically (also called HCS12).&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Alban.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Sep 2007 03:11:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148942#M4129</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-09-23T03:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: MC912DG128A - HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148943#M4130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;hc12prog,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;are interrupts enabled?&amp;nbsp;Some interrupt could fire between two TCNT readings.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 14:04:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148943#M4130</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2007-09-24T14:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: MC912DG128A - HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148944#M4131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;no, there are no interrupts. i show yo the complete source, but the source do not important things. I want to test some functions of the HC12 only. As Output&amp;nbsp;at may terminal&amp;nbsp;I see the curious phenomenon, that TCNT Register has the following values: a1=38; a2=44; a3=50;....;ax=122; ax+1=128; ax+2=129,ax+3=129;.... until TCNT=128 the variables change with add 6, but then with add1. Why? I find in the Manual the following text by the TCNT-Register discribtion, can this be the reason?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;"&lt;FONT face="Arial"&gt;The 16-bit main timer is an up counter. A full access for the counter register should take place in one clock cycle. A separate read/write for high byte and low byte will give a different result than accessing them as a word.&lt;/FONT&gt;&lt;P align="left"&gt;&lt;FONT face="Arial"&gt;Read anytime.&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Arial"&gt;Write has no meaning or effect in the normal mode; only writable in special modes (SMODN = 0). The period of the first count after a write to the TCNT registers may be a different size because the write is not synchronized with the prescaler clock."&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;#include "stdlib.h"#include "stdio.h"#include "912d128.h"#include "sci.h"volatile int a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23;void main(){ // Timer Setup TSCR   = 0x80; // Timer enable TMSK2  = 0x03; // Prescaler = 8 (1tick all 1µs) SCI0Init(); while(1)  {    a1=TCNT;   a2=TCNT;   a3=TCNT;   a4=TCNT;   a5=TCNT;   a6=TCNT;   a7=TCNT;   a8=TCNT;   a9=TCNT;   a10=TCNT;   a11=TCNT;   a12=TCNT;   a13=TCNT;   a14=TCNT;   a15=TCNT;   a16=TCNT;   a17=TCNT;   a18=TCNT;   a19=TCNT;   a20=TCNT;   a21=TCNT;   a22=TCNT;   a23=TCNT;   SCI_OutString("x");   SCI_OutUDec(a1);   SCI_OutString("y");   SCI_OutUDec(a2);   SCI_OutString("z");   SCI_OutUDec(a3);   SCI_OutString("zz");   SCI_OutUDec(a4);   SCI_OutString("y");   SCI_OutUDec(a5);   SCI_OutString("z");   SCI_OutUDec(a6);   SCI_OutString("zz");   SCI_OutUDec(a7);   SCI_OutString("y");   SCI_OutUDec(a8);   SCI_OutString("z");   SCI_OutUDec(a9);   SCI_OutString("zz");   SCI_OutUDec(a10);   SCI_OutString("y");   SCI_OutUDec(a11);   SCI_OutString("z");   SCI_OutUDec(a12);   SCI_OutString("zz");   SCI_OutUDec(a13);   SCI_OutString("y");   SCI_OutUDec(a14);   SCI_OutString("z");   SCI_OutUDec(a15);   SCI_OutString("zz");   SCI_OutUDec(a16);    SCI_OutString("y");   SCI_OutUDec(a17);   SCI_OutString("z");   SCI_OutUDec(a18);   SCI_OutString("zz");   SCI_OutUDec(a19);   SCI_OutString("zz");   SCI_OutUDec(a20);    SCI_OutString("y");   SCI_OutUDec(a21);   SCI_OutString("z");   SCI_OutUDec(a22);   SCI_OutString("zz");   SCI_OutUDec(a23);  }}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:50:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148944#M4131</guid>
      <dc:creator>hc12prog</dc:creator>
      <dc:date>2020-10-29T08:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: MC912DG128A - HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148945#M4132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;In most of the cases it isn't safe to assume that the TCNT is running in sync with your code. The phenomenon you describe has nothing to do with 8-bit access though, since you are only doing 16-bit access.&lt;BR /&gt;&lt;BR /&gt;What's causing the delay in this case is hard to tell. Perhaps you are running the program through a debugger/BDM? In that case the realtime will naturally be affected in unpredicted ways: the debugger might do all kind of weird stuff in the background that you don't see.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 18:04:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148945#M4132</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2007-09-24T18:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: MC912DG128A - HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148946#M4133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;hc12prog,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Looks like you found&amp;nbsp;timer bug. 912D60A and 9S12D64 ECT do behave like you noticed. I confirm that in normal mode:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1) enabling the timer and 2)&amp;nbsp;setting timer prescaller to divide by 8, - new timer prescaler (divide by 8) doesn't apply until TCNT reaches 128.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by kef on &lt;SPAN class="date_text"&gt;2007-09-24&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:24 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="time_text"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="time_text"&gt;oops, thought it's a bug, but here is a notice in ECT docs, both 912D60A and S12 :&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN class="time_text"&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BLOCKQUOTE&gt;&lt;P align="left"&gt;The newly selected prescale factor will not take effect until the next synchronized edge where all prescale counter stages equal zero.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P align="left"&gt;So behaviour is expected&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by kef on &lt;SPAN class="date_text"&gt;2007-09-24&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:34 PM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by kef on &lt;SPAN class="date_text"&gt;2007-09-24&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:34 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 18:20:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148946#M4133</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2007-09-24T18:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: MC912DG128A - HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148947#M4134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thank you for the answer,&lt;/DIV&gt;&lt;DIV&gt;also it is no bug, right? and it is the right behavior for the HC12-Timer, which I discribe or is there another mistake?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 20:09:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148947#M4134</guid>
      <dc:creator>hc12prog</dc:creator>
      <dc:date>2007-09-24T20:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: MC912DG128A - HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148948#M4135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Yes, it's not a bug. According to the docs, timer prescaler&amp;nbsp;changes not immediately after you write prescaler bits, but at TCNT=0bXXXXXXXXX0000000.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Maybe it's possible to set prescaler first, then enable the timer. Since after reset TCNT is 0, maybe prescaler could be enabled for first 127 ticks? I don't remember if it's possible to change prescaler while timer is disabled.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 20:40:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148948#M4135</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2007-09-24T20:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: MC912DG128A - HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148949#M4136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Okay, thank you. I will test it.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 21:09:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148949#M4136</guid>
      <dc:creator>hc12prog</dc:creator>
      <dc:date>2007-09-24T21:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: MC912DG128A - HC12 Timer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148950#M4137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I tried to setup timer prescaler first, then enable the timer. Doing this for S12 ECT makes new prescaler active even in first 128 timer ticks. S12 setup:&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;TSCR2 = 0x03;&lt;/FONT&gt; &lt;FONT color="#008000" size="2"&gt;// Prescaler = 8 (1tick all 1µs)&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;TSCR1 = 0x80;&lt;/FONT&gt; &lt;FONT color="#008000" size="2"&gt;// Timer enable&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Doing the same with 912D60A ECT doesn't work.&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;TMSK2 = 0x03;&lt;FONT color="#008000" size="2"&gt;&lt;FONT size="2"&gt;&amp;nbsp; // write prescaler&lt;FONT size="2"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;TSCR = 0x80;&lt;FONT color="#008000" size="2"&gt;&lt;FONT size="2"&gt;&lt;FONT color="#008000" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // enable timer&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I mean that in D60A, the write of non default prescaler to TMSK2 is granted but doesn't apply until 128 timer ticks&lt;FONT size="2"&gt;&lt;FONT color="#008000" size="2"&gt;&lt;FONT size="2"&gt;.&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2007 13:03:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC912DG128A-HC12-Timer/m-p/148950#M4137</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2007-09-25T13:03:09Z</dc:date>
    </item>
  </channel>
</rss>

