<?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: output compare waveform generation - MC9s12C32</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197385#M7888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;You don't have to enable the interrupts for the flags in TFLG1 to be set when the compare happens.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;All I did was change your while loop to:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;    while(!(TFLG1 &amp;amp; 0x40))    {      if (TFLG1 &amp;amp; 0x08)         Timer3++;            if (TFLG1 &amp;amp; 0x10)         Timer4++;            if (TFLG1 &amp;amp; 0x20)         Timer5++;            if (TFLG1 &amp;amp; 0x40)         Timer6++;             }&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Timer3-6 are volatile unsigned chars (volatile to make sure they were placed in RAM to be easy to monitor).&amp;nbsp; Timer4 flag and Timer3 flag will be the same value at the end of the while because the counts are very close (5 bus cycles different).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;There are alot of unnecessary things in the code, you should only need to initialize&amp;nbsp;many of the register once, you disable interrupts from within a function called by an ISR.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Feb 2008 23:04:33 GMT</pubDate>
    <dc:creator>allawtterb</dc:creator>
    <dc:date>2008-02-29T23:04:33Z</dc:date>
    <item>
      <title>output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197375#M7878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using a MC9s12C32 evaluation board. My timer is alreay configured for overflow inteerupt. I want to use the TImer OC3, 4, 5 and 6 channels to generate output waveform. This waveform geneartion is very time crictical so i am disabling the overflow interrupt but i couldnot reset the TCNT register to know exeactly where my waveform generation started and when it ended. Is there a way to do this. Has anybody done this before.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any inputs will be very highly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Added p/n to subject.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by NLFSJ on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2008-02-27&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;06:10 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 05:40:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197375#M7878</guid>
      <dc:creator>pirate</dc:creator>
      <dc:date>2008-02-28T05:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197376#M7879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Not exactly sure what you mean&amp;nbsp; "I need to know when it started", but if you read the TCNT and take that&amp;nbsp; count to be the starting point, you would know when it started.&lt;BR /&gt;&lt;BR /&gt;As for when it ends, you get interrupts when the counter matches what you set in the compare register , so I would suppose you could use that.&lt;BR /&gt;&lt;BR /&gt;It might help if you explained a bit more of the details.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 06:30:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197376#M7879</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-02-28T06:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197377#M7880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi&lt;BR /&gt;&lt;BR /&gt;I am guessing that what you really want to do is control when the edges occur relative to "now" whatever that might be .&amp;nbsp; You dont need to reset the TCNT to do this.&amp;nbsp; You can set up your first edge to occur at a time relative to "now" by, for example, setting OCMPn = TCNT + T_EDGE_DELAY; (use the real register names), where T_EDGE_DELAY is the time from "now" to the first edge. If you want the following edges to be precise and relative to the preceding edge then you do something like OCMPn += T_EDGE2_DELAY; in the ISR for the output compare.&lt;BR /&gt;&lt;BR /&gt;If "now" is an input signal that you have fed into an input capture then you can set your output compare time to be a defined time relative to the captured time stamp.&lt;BR /&gt;&lt;BR /&gt;Is this the sort of thing you want to to? Hope this helps&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Colin&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 15:46:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197377#M7880</guid>
      <dc:creator>colinh</dc:creator>
      <dc:date>2008-02-28T15:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197378#M7881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Below is the code for what i am trying to acheive..The problem i am having is i see all the compare evnts happen to be at the same time. for example in OC3-init() if i am waiting for OC3 event all the other events happen at that time. and if i am waiting for OC6 event all the other events happen with OC6. Can you guys let me know what am i doing wrong?&lt;BR /&gt;&lt;BR /&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;TOF_init();&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; MODRR = 0x00;&amp;nbsp; //set port T as timer outputs&lt;BR /&gt;&amp;nbsp; DDRT = 0xFF;&lt;BR /&gt;&amp;nbsp; PTT = 0x50;&lt;BR /&gt;&amp;nbsp; EnableInterrupts;&lt;BR /&gt;&amp;nbsp; for(;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;void TOF_init(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; TSCR1 = 0x80;&amp;nbsp;&amp;nbsp; // Enable TCNT, 4MHz in run mode&lt;BR /&gt;&amp;nbsp; TSCR2 = 0x80;&amp;nbsp;&amp;nbsp; // TCNT prescale, TOI arm&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;/* Bottom three bits of TSCR2 (PR2,PR1,PR0) determine TCNT period&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; divide&amp;nbsp; BootMode(24MHz)&amp;nbsp;&amp;nbsp;&amp;nbsp; Run Mode (4MHz)&lt;BR /&gt;000&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 42ns&amp;nbsp; TOF&amp;nbsp; 2.73ms&amp;nbsp; 250ns TOF 16.384ms&lt;BR /&gt;001&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 84ns&amp;nbsp; TOF&amp;nbsp; 5.46ms&amp;nbsp; 500ns TOF 32.768ms&lt;BR /&gt;010&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp; 167ns&amp;nbsp; TOF&amp;nbsp; 10.9ms&amp;nbsp;&amp;nbsp;&amp;nbsp; 1us TOF 65.536ms&amp;nbsp; &amp;nbsp;&lt;BR /&gt;011&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp; 333ns&amp;nbsp; TOF&amp;nbsp; 21.8ms &amp;nbsp;&amp;nbsp; &amp;nbsp; 2us TOF 131.072ms&lt;BR /&gt;100&amp;nbsp; 16&amp;nbsp;&amp;nbsp;&amp;nbsp; 667ns&amp;nbsp; TOF&amp;nbsp; 43.7ms &amp;nbsp;&amp;nbsp; &amp;nbsp; 4us TOF 262.144ns&lt;BR /&gt;101&amp;nbsp; 32&amp;nbsp;&amp;nbsp; 1.33us&amp;nbsp; TOF&amp;nbsp; 87.4ms&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 8us TOF 524.288ms&lt;BR /&gt;110&amp;nbsp; 64&amp;nbsp;&amp;nbsp; 2.67us&amp;nbsp; TOF 174.8ms&amp;nbsp;&amp;nbsp; 16us TOF 1.048576s&lt;BR /&gt;111 128&amp;nbsp;&amp;nbsp; 5.33us&amp;nbsp; TOF 349.5ms&amp;nbsp;&amp;nbsp; 32us TOF 2.097152s */&lt;BR /&gt;&amp;nbsp; TFLG2 = 0x80;&amp;nbsp;&amp;nbsp; // initially clear TOF&lt;BR /&gt;&amp;nbsp; usTimer31to16 = 0;&lt;BR /&gt;}&lt;BR /&gt;__interrupt void TOF_Interrupt(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usTimer31to16++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (usTimer31to16 == 0xFFFF)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usTimer31to16 = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (usTimer31to16 == 2)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&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; usTimer31to16 = 0;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&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; acquire_data();&lt;BR /&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;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp; TFLG2 = 0x80;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // acknowledge TOF&lt;BR /&gt;}&lt;BR /&gt;void OC3_Init(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned short&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usTCNT;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTT = (PTT | 0x01);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TFLG1 = 0x78;&amp;nbsp;&amp;nbsp; // clear timer capture&amp;nbsp; interrupt register&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; TSCR1 = 0x00;&amp;nbsp;&amp;nbsp; //timer disable&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TIOS |= 0x78;&amp;nbsp;&amp;nbsp; // activate TC6-&amp;gt;3 as output compare&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSCR2 = 0x00;&amp;nbsp;&amp;nbsp; // TCNT prescale, Disable Timer overflow interrupt&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TIE&amp;nbsp; |= 0x78;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; C6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C3&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; 1 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; LOW&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HIGH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOW&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HIGH&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCTL1 =&amp;nbsp;&amp;nbsp; 0x2E;&amp;nbsp; //change state&amp;nbsp; OC 6-4&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCTL2 =&amp;nbsp;&amp;nbsp; 0xC0; //change state&amp;nbsp; OC 3&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //get the current TCNT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; usTCNT = TCNT;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //setup the waveform to start sometime in the future&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TC3 = usTCNT + 100;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TC4 = usTCNT + 105;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TC5 = usTCNT + 700;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TC6 = usTCNT + 1100;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; TSCR1 = 0x80; //timer enable&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!(TFLG1 &amp;amp; 0x40))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TFLG1 = 0x78;&amp;nbsp;&amp;nbsp;&amp;nbsp; // clear timer capture&amp;nbsp; interrupt register&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSCR2 = 0x80;&amp;nbsp;&amp;nbsp; // enable Timer overflow interrupt&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTT = (PTT &amp;amp; 0x01);&lt;BR /&gt;}&lt;BR /&gt;void acquire_data(void)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DisableInterrupts;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OC3_Init(); //enables timer for output compare mode&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TIOS =0x00; //disable out put compare&lt;BR /&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;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTT = 0x50;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EnableInterrupts;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!!!!!!!!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 04:34:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197378#M7881</guid>
      <dc:creator>pirate</dc:creator>
      <dc:date>2008-02-29T04:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197379#M7882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I don't know what you are trying to achieve with the posted code.&amp;nbsp; It seems that you are waiting for the timer overflow interrupt to occur twice&amp;nbsp;then setting channels 3-6 to set/clear pins.&amp;nbsp; You wait for the last output compare to happen then exit and repeat the whole process again.&amp;nbsp; What exactly are you trying to do?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 06:06:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197379#M7882</guid>
      <dc:creator>allawtterb</dc:creator>
      <dc:date>2008-02-29T06:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197380#M7883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I want to generate the a waveform on the OC3-6 channels periodically....but my problem is that all the events OC3 to OC-6 happen at the sametime. Instead of happening at different times. My question is why is the output compare event for all the 4 channels happening at the samtime. if you look at the TC3-6 registers they should happen at different times. Right now i am waiting for the TC6 event to occur....so all the events happen at TC6 and i lieave the function after TC6 event. If i wait for TC3 event all the events happen at TC3 and the function is exited.&lt;BR /&gt;&lt;BR /&gt;Again my question is why is not there is a time difference in the triggering of all the four channels?&lt;BR /&gt;&lt;BR /&gt;Thanks!!!!!!&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 06:18:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197380#M7883</guid>
      <dc:creator>pirate</dc:creator>
      <dc:date>2008-02-29T06:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197381#M7884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;How have you verified this? Running this through the simulator here they occur as they should, all at different times.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 06:51:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197381#M7884</guid>
      <dc:creator>allawtterb</dc:creator>
      <dc:date>2008-02-29T06:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197382#M7885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I am using the technological arts MC9S12C32 Evaluation Board. I am monitoring channels OC3-6 on an oscillloscope. I drive Port T line 0 high when i enter the routine and and drive it low when i exit to know when the OC3_Init() routine started and ended.&lt;BR /&gt;&lt;BR /&gt;Can you please tell me how did you verify that its working?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 22:06:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197382#M7885</guid>
      <dc:creator>pirate</dc:creator>
      <dc:date>2008-02-29T22:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197383#M7886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Do you have somewhere interrupt handlers for all OC3-OC6? In OC3_Init you are enabling OC3-OC6 interrupts:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;TIE&amp;nbsp; |= 0x78;&lt;BR /&gt;&lt;BR /&gt;, but I see no OC3-OC6 ISR's.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 22:21:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197383#M7886</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-02-29T22:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197384#M7887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;No i dont have any interrupt handlers for channels OC-3 to OC-6. I am enabling those channels as interrupt sources because i want the TFLG1 register bits for these channels to be set so that i can wait for these events in the same routine itself...&lt;BR /&gt;&lt;BR /&gt;I have tried the same routine without enabling those interrupts but still the result was not different.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 22:26:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197384#M7887</guid>
      <dc:creator>pirate</dc:creator>
      <dc:date>2008-02-29T22:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197385#M7888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;You don't have to enable the interrupts for the flags in TFLG1 to be set when the compare happens.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;All I did was change your while loop to:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;    while(!(TFLG1 &amp;amp; 0x40))    {      if (TFLG1 &amp;amp; 0x08)         Timer3++;            if (TFLG1 &amp;amp; 0x10)         Timer4++;            if (TFLG1 &amp;amp; 0x20)         Timer5++;            if (TFLG1 &amp;amp; 0x40)         Timer6++;             }&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Timer3-6 are volatile unsigned chars (volatile to make sure they were placed in RAM to be easy to monitor).&amp;nbsp; Timer4 flag and Timer3 flag will be the same value at the end of the while because the counts are very close (5 bus cycles different).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;There are alot of unnecessary things in the code, you should only need to initialize&amp;nbsp;many of the register once, you disable interrupts from within a function called by an ISR.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 23:04:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197385#M7888</guid>
      <dc:creator>allawtterb</dc:creator>
      <dc:date>2008-02-29T23:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197386#M7889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I am not initilaising the OC3-6 interrupts anymore and have moved the acquire_data function outside the interrupt routine.&lt;BR /&gt;what is the increment in the while loop doing... I dont know what r u incrementing in the while loop.&lt;BR /&gt;can you please explain?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Mar 2008 00:10:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197386#M7889</guid>
      <dc:creator>pirate</dc:creator>
      <dc:date>2008-03-01T00:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197387#M7890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;It is testing the flag for each channel, if the flag is set (the compare has become true) it increments a variable.&amp;nbsp; All this shows is that the flags get set at different times as after the while loops complete Timer3 and 4 will have the same value but the others have different values.&amp;nbsp; The flags don't all become set at the same time, if they did Timer3,4,5 and 6 would all contain the same value at the end of the while loop.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Mar 2008 00:35:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197387#M7890</guid>
      <dc:creator>allawtterb</dc:creator>
      <dc:date>2008-03-01T00:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197388#M7891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I tried this in the simulator and i get same values for Timer3,Timer4 and different values for timer5 and timer 6.But still the waveforms on the GPIO line for these OC3-6 channels start at the same time.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Mar 2008 02:29:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197388#M7891</guid>
      <dc:creator>pirate</dc:creator>
      <dc:date>2008-03-01T02:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197389#M7892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;attached is a document that describes the problem in more deatil.&lt;BR /&gt;&lt;BR /&gt;Thanks!!!!&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by pirate on &lt;SPAN class="date_text"&gt;2008-03-04&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;07:58 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 03:56:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197389#M7892</guid>
      <dc:creator>pirate</dc:creator>
      <dc:date>2008-03-05T03:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197390#M7893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Hi&lt;BR /&gt;&lt;BR /&gt;Its a bit hard to see exactly whats going on - I would suggest setting a breakpoint on&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt; while(!(TFLG1 &amp;amp; 0x40))&lt;/P&gt;and see what the contents of TFLG is the first time you hit this.&amp;nbsp; (BTW - It is good practice to clear pending interrupt flags during an init routine - you had this but have now commented it out)&lt;BR /&gt;&lt;BR /&gt;I assume the register OC7M is all 0, or that OC7 is not being enabled somewhere else in your code?&lt;BR /&gt;&lt;BR /&gt;Personally I dont like chopping and changing between output compare and direct control as some of the finer details of how this will work in all cases is not always clear in the documents. If you need to force an immediate value onto the pin then use the CFORC register.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Arial"&gt;Out of curiousity, what triggers the call to &lt;SPAN&gt;&lt;FONT face="Arial"&gt;acquire_data in the code you documented&lt;/FONT&gt;?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;Regards&lt;BR /&gt;Colin&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 09:41:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197390#M7893</guid>
      <dc:creator>colinh</dc:creator>
      <dc:date>2008-03-05T09:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197391#M7894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;An Input switch press triggers the call to acquire_data......&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 22:17:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197391#M7894</guid>
      <dc:creator>pirate</dc:creator>
      <dc:date>2008-03-05T22:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197392#M7895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;The problem is you disable OC pins by clearing TIOS register. When you enable TIOS again, OC triggers are in the state you left them after last waveform. To put OC pins in initial state, you should reconfigure output compares from set to clear logic and vice versa, then write to CFORC to force to state you just programmed. Suggested code:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;// TCTL1/TCTL2 OM/OL bit defines#define COMPOFF   0#define COMPTOGG  1#define COMPCLEAR 2#define COMPSET   3// Somewhere you enable timer and configure TIOS register once//   // timer channels 6-3 are output compares//   TIOS |= (1&amp;lt;&amp;lt;6) | (1&amp;lt;&amp;lt;5) | (1&amp;lt;&amp;lt;4) | (1&amp;lt;&amp;lt;3);//void ForceInitialState(void){   // initial OC levels   TCTL12 = (COMPSET &amp;lt;&amp;lt; 2*6) | (COMPCLR &amp;lt;&amp;lt; 2*5) | (COMPSET &amp;lt;&amp;lt; 2*4) | (COMPCLR &amp;lt;&amp;lt; 2*3);   // force initial OC levels   CFORC = (1&amp;lt;&amp;lt;6) | (1&amp;lt;&amp;lt;5) | (1&amp;lt;&amp;lt;4) | (1&amp;lt;&amp;lt;3);}void StartWaveform(void){short usTCNT;   usTCNT = TCNT;   TC3 = usTCNT + 100;   TC4 = usTCNT + 105;   TC5 = usTCNT + 700;   TC6 = usTCNT + 1100;   // clear flags   TFLG1 = (1&amp;lt;&amp;lt;6) | (1&amp;lt;&amp;lt;5) | (1&amp;lt;&amp;lt;4) | (1&amp;lt;&amp;lt;3);   // switch to target OC levels   TCTL12 = (COMPCLR &amp;lt;&amp;lt; 2*6) | (COMPSET &amp;lt;&amp;lt; 2*5) | (COMPCLR &amp;lt;&amp;lt; 2*4) | (COMPSET &amp;lt;&amp;lt; 2*3);   // Since you aren't using interrupts, here you may wait for longest   // OC6 compare   while( !(TFLG1 &amp;amp; (1&amp;lt;&amp;lt;6)) );}&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 15:03:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197392#M7895</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-03-06T15:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197393#M7896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Not sure if I agree with this diagnosis - No more than a few instruction cycles before clearing TIOS to 0, TFLG1 is written with 0x78 thereby clearing the flags.&amp;nbsp; So hypothetically anyway we shouldn't be seeing these flags set when we come back into the routine next time around.&lt;BR /&gt;&lt;BR /&gt;Nonetheless I agree with the approach in the suggested code.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 17:37:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197393#M7896</guid>
      <dc:creator>colinh</dc:creator>
      <dc:date>2008-03-06T17:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: output compare waveform generation - MC9s12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197394#M7897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;That should work once, maybe. I think pirate is calling OC3_Init periodically. After wait for OC6 flag is done, he exits to acquire_data, where he clears TIOS. Then the process repeats but noone clears output compare pin triggers. It's not enough to clear flags, something should be done around TCTL1/TCTL2.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 17:45:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/output-compare-waveform-generation-MC9s12C32/m-p/197394#M7897</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-03-06T17:45:26Z</dc:date>
    </item>
  </channel>
</rss>

