<?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: MM912F634 input capture problem</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265943#M9854</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your reply ，I have modify it as you did but the problem still exist ，the input capture flag still be 0 all time，and can't generate interrupt ，i don't know why。。。。。&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Nov 2013 14:05:50 GMT</pubDate>
    <dc:creator>贵阳封</dc:creator>
    <dc:date>2013-11-08T14:05:50Z</dc:date>
    <item>
      <title>MM912F634 input capture problem</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265941#M9852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I followed the datasheet carefully and set the value of related register,but when active edge happened ,no input capture interrupt was occurred even the input capture interrupt flag was not detected,my main routine was listed below Thanks for your help。&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void main(void) {&lt;/P&gt;&lt;P&gt;volatile char rsr, vsr, srr;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/* D2D Init */&lt;/P&gt;&lt;P&gt;&amp;nbsp; D2DCTL1&amp;nbsp; = 0x8F;&amp;nbsp; // IRQ enable, max timeout&lt;/P&gt;&lt;P&gt;&amp;nbsp; D2DCTL0&amp;nbsp; = 0x80;&amp;nbsp; // D2D enable, 4Bit, !Stop in Wait, D2DCLK=BUS&lt;/P&gt;&lt;P&gt;&amp;nbsp; D2DSTAT0 = 0x80;&amp;nbsp; // Clear D2D Errors&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; rsr = bRSR;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Copy/Clear RSR&lt;/P&gt;&lt;P&gt;&amp;nbsp; vsr = bVSR;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Copy/Clear VSR&lt;/P&gt;&lt;P&gt;&amp;nbsp; srr = bSRR;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Copy/Clear SRR&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bCTR0 =&amp;nbsp; TRIM0;&amp;nbsp;&amp;nbsp; // Copy Trim Information to Analog Die&lt;/P&gt;&lt;P&gt;&amp;nbsp; bCTR1 =&amp;nbsp; TRIM1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bCTR2 =&amp;nbsp; TRIM2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bCTR2 =&amp;nbsp; 0x1E;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Max VREG-Overvoltage Threshold Trim&lt;/P&gt;&lt;P&gt;&amp;nbsp; bCTR3 =&amp;nbsp; TRIM3;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bLSCEN = 0x05;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable LS Control&lt;/P&gt;&lt;P&gt;&amp;nbsp; //bLSCR = 0x00;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Activate LS&lt;/P&gt;&lt;P&gt;&amp;nbsp; //bHSCR = 0x00;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Activate HS&lt;/P&gt;&lt;P&gt;/* -------------------------------------------------------------- */&lt;/P&gt;&lt;P&gt;&amp;nbsp; //CRGCTL0_OSCEN=1;//内部时钟32K&lt;/P&gt;&lt;P&gt;&amp;nbsp; //CRGCTL0_BCLKS=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bPTBC1=0X70;//PTB配置为输入口加上拉&lt;/P&gt;&lt;P&gt;&amp;nbsp; bPTBC2=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bTIOS=0X0F; //IO通道配置输入捕捉&lt;/P&gt;&lt;P&gt;&amp;nbsp; bACCR=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bTCTL2=0X3F;//上跳沿捕捉&lt;/P&gt;&lt;P&gt;&amp;nbsp; bTIE=0X07; // 捕捉中断使能&lt;/P&gt;&lt;P&gt;&amp;nbsp; bTCNT=0; //10ms&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; bTSCR2=0X80; // 时钟溢出中断使能&lt;/P&gt;&lt;P&gt;&amp;nbsp; bTSCR1|=0X80; //计时使能/计时器标志清除使能 &lt;/P&gt;&lt;P&gt;&amp;nbsp; EnableInterrupts; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; for(;;) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; M=bPTB;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; N=bTIOS;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(bTFLG1!=0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bHSCR=0X01 ; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; U=bTFLG1;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; } //for(;;)&amp;nbsp; &lt;/P&gt;&lt;P&gt;} //main&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338906"&gt;main.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338906"&gt;Quest_Test.prm.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338906"&gt;calango.h.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338906"&gt;MC9S12I32.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 06:37:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265941#M9852</guid>
      <dc:creator>贵阳封</dc:creator>
      <dc:date>2013-11-08T06:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: MM912F634 input capture problem</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265942#M9853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;I shortly checked your code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Probably main issue: bTIOS=0X0F; //IO&lt;/SPAN&gt;&lt;SPAN style="font-family: 'MS Gothic';"&gt;通道配置&lt;/SPAN&gt;&lt;SPAN style="font-family: MingLiU;"&gt;输入捕&lt;/SPAN&gt;&lt;SPAN style="font-family: 'MS Gothic';"&gt;捉&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;You set all timer channels to output compare mode. Please change TIOS settings to 0x00.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Note: TCNT is free running counter, you can write to this register only in special mode (during debugging).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 13:41:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265942#M9853</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2013-11-08T13:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: MM912F634 input capture problem</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265943#M9854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your reply ，I have modify it as you did but the problem still exist ，the input capture flag still be 0 all time，and can't generate interrupt ，i don't know why。。。。。&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 14:05:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265943#M9854</guid>
      <dc:creator>贵阳封</dc:creator>
      <dc:date>2013-11-08T14:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: MM912F634 input capture problem</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265944#M9855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you have QQ or MSN,could we communicate online？my QQ 471949374 &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 14:13:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265944#M9855</guid>
      <dc:creator>贵阳封</dc:creator>
      <dc:date>2013-11-08T14:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: MM912F634 input capture problem</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265945#M9856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;You enabled interrupt (bTIE=0X07; // &lt;/SPAN&gt;&lt;SPAN style="font-family: 'MS Gothic';"&gt;捕捉中断使能&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;), unfortunately I didn’t found any interrupt routine for TC0~TC3 in &lt;/SPAN&gt;&lt;SPAN lang="CS" style="font-family: 'Cambria','serif';"&gt;y&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;our files. Please define interrupt routines or disable interrupt (you already tested TFLG1 in main loop.)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 14:37:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265945#M9856</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2013-11-08T14:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: MM912F634 input capture problem</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265946#M9857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(bTFLG1!=0)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bHSCR=0X01 ;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; U=bTFLG1;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;these are the test code for TFLG1, I test it from int U,&amp;nbsp; if i have no interrupt routine, once interrupt flag was detected the debug software will report error ,but now no error report and the TFLG1 interrupt flag still be 0 all the time even i trigger the PTB0 PTB1 PTB2...........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 14:52:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM912F634-input-capture-problem/m-p/265946#M9857</guid>
      <dc:creator>贵阳封</dc:creator>
      <dc:date>2013-11-08T14:52:30Z</dc:date>
    </item>
  </channel>
</rss>

