<?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: MPC5744P CTU ERRCMP error flag in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CTU-ERRCMP-error-flag/m-p/651738#M6827</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maite&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Dec 2016 14:27:46 GMT</pubDate>
    <dc:creator>maitesierra</dc:creator>
    <dc:date>2016-12-07T14:27:46Z</dc:date>
    <item>
      <title>MPC5744P CTU ERRCMP error flag</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CTU-ERRCMP-error-flag/m-p/651734#M6823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are working with MPC5744P and we have got an&amp;nbsp;error flag (ERRCMP flag in CTU_EFR register) which appears&amp;nbsp;as soon as we initialize&amp;nbsp;CTU. The configured trigger signal for the CTU is I1_RE which corresponds&amp;nbsp; with FlexPWM0 submodule 0&amp;nbsp; VAL0. If we change TGSCCR register to 4801 or less value (&amp;lt; &lt;SPAN style="font-size: small;"&gt;FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SUB&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;VAL1&lt;/SPAN&gt;), ERRCMP error flag&amp;nbsp;is set&amp;nbsp;when CTU is initialized and once per PWM cycle. But&amp;nbsp; if we change TGSCCR value to&amp;nbsp;5000 (or &amp;gt; &lt;SPAN style="font-size: small;"&gt;FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SUB&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;VAL1)&lt;/SPAN&gt;&amp;nbsp;ERRCMP error flag is set just&amp;nbsp;when CTU is initiated.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way of avoiding this error first time CTU is initalized?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Main program, we initialize CTU first&amp;nbsp;and then we initialize FlexPWM as you can see in&amp;nbsp;included functions at the end of the message.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;Maite&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &lt;STRONG&gt;CTU_Init&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;TGSISR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000004; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// I1_RE (Input1: FlexPWM0 SubMod0 VAL0 VAL2 VAL4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;THCR1&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000061; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//Enable &lt;SPAN style="text-decoration: underline;"&gt;Triger&lt;/SPAN&gt; 0 and set to ADC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;TCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 1; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// For triggering single conversion on ADC0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;TGSCCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 5000; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//&amp;nbsp;end value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;TGSCRR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// &lt;SPAN style="text-decoration: underline;"&gt;initial value&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;TGSCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x0100; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Toggle mode for external trigger&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//===== Set ADC messages 2 CHANNELS=====&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;FTH&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000001; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// set FIFO 0 threshold to 1, overflow is set when 2 results comes Max 8 bits&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CLR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x4000; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Command 0 - first command in command sequence, sample ADC1-CH0, result to FIFO0 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CLR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[1].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x0001; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Command 1 - next command in command sequence,sample ADC1-CH1, result to FIFO0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CLR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[2].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x4000; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// stop the sequence, first command of second sequence which is not started &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CLR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SU&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 1; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// ADC_1 ch0 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CLR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[1].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SU&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 1; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// ADC_1 ch1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;FCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000004; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// FIFO 0 threshold overflow interrupt enable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x0003; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// General reload and TGS input selection reload&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;(CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;EFR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;ERRCMP&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; == 1) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp; CTU_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;EFR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;ERRCMP&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 1; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp; SIUL2.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;GPDO&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[LED1].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = ~SIUL2.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;GPDO&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[LED1].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &lt;STRONG&gt;FlexPWM_Init&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;OUTEN&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x110; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----&amp;nbsp; control register ---&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SUB&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CTRL1&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x0400;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SUB&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CTRL2&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x0000; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SUB&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;TCTRL&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x0001; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// VAL0 &lt;SPAN style="text-decoration: underline;"&gt;reg&lt;/SPAN&gt; determine OUT_TRIG0 generation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//----- INIT, VAL0, VAL1, VAL2, VAL3 -----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SUB&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;INIT&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// &lt;SPAN style="text-decoration: underline;"&gt;init value&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SUB&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;VAL1&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 4802; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//&amp;nbsp;end value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SUB&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;VAL2&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// PWM A0 rising edge&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SUB&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;VAL3&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 800; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// PWM A0 falling edge&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SUB&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;VAL0&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----&amp;nbsp; interrupt enable register ---&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SUB&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[0].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;INTEN&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;R&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x1000; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//reload &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//========== LDOK (reload) &amp;amp; RUN (run PWMs) =========&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;MCTRL&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;LDOK&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x1; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//submodule 0 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;FlexPWM_0.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;MCTRL&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;RUN&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x1; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Submodule 0&amp;nbsp;PWM0 generator enabled&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2016 14:32:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CTU-ERRCMP-error-flag/m-p/651734#M6823</guid>
      <dc:creator>maitesierra</dc:creator>
      <dc:date>2016-12-05T14:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P CTU ERRCMP error flag</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CTU-ERRCMP-error-flag/m-p/651735#M6824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maite,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This flag is set each time the CTU becomes clocked. See this info from the RM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12078iA3E2748569BAD787/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So just clear this flag during initialization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 10:22:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CTU-ERRCMP-error-flag/m-p/651735#M6824</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-12-06T10:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P CTU ERRCMP error flag</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CTU-ERRCMP-error-flag/m-p/651736#M6825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. We are working with reference manual Rev 5 which do not include this paragraph. Could you include&amp;nbsp;Rev 6 pdf&amp;nbsp;from the reference manual in this post please? As it is imposible to get it from web (web link is not working well as it goes to Rev 5 from reference manual)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.nxp.com/products/automotive-products/microcontrollers-and-processors/32-bit-power-architecture/ultra-reliable-mpc57xx-32-bit-automotive-industrial-microcontrollers-mcus/ultra-reliable-mpc574xp-mcu-for-automotive-industrial-safety-applications:MPC574xP?tab=Documentation_Tab"&gt;http://www.nxp.com/products/automotive-products/microcontrollers-and-processors/32-bit-power-architecture/ultra-reliable-mpc57xx-32-bit-automotive-industrial-microcontrollers-mcus/ultra-reliable-mpc574xp-mcu-for-automotive-industrial-safety-applications:MPC574xP?tab=Documentation_Tab&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Maite&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 10:05:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CTU-ERRCMP-error-flag/m-p/651736#M6825</guid>
      <dc:creator>maitesierra</dc:creator>
      <dc:date>2016-12-07T10:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P CTU ERRCMP error flag</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CTU-ERRCMP-error-flag/m-p/651737#M6826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see attached...&lt;/P&gt;&lt;P&gt;the link will be fixed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 12:21:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CTU-ERRCMP-error-flag/m-p/651737#M6826</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-12-07T12:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P CTU ERRCMP error flag</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CTU-ERRCMP-error-flag/m-p/651738#M6827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maite&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 14:27:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CTU-ERRCMP-error-flag/m-p/651738#M6827</guid>
      <dc:creator>maitesierra</dc:creator>
      <dc:date>2016-12-07T14:27:46Z</dc:date>
    </item>
  </channel>
</rss>

